This is an inofficial mirror of http://metamath.tirix.org for personal testing of a visualizer extension only.
Description: An element of a set is either equal to another element of the set or a member of the difference of the set and the singleton containing the other element. (Contributed by AV, 25-Aug-2020) (Proof shortened by JJ, 23-Jul-2021)
| Ref | Expression | ||
|---|---|---|---|
| Assertion | eqoreldif | ⊢ ( 𝐵 ∈ 𝐶 → ( 𝐴 ∈ 𝐶 ↔ ( 𝐴 = 𝐵 ∨ 𝐴 ∈ ( 𝐶 ∖ { 𝐵 } ) ) ) ) |
| Step | Hyp | Ref | Expression |
|---|---|---|---|
| 1 | simpl | ⊢ ( ( 𝐴 ∈ 𝐶 ∧ ¬ 𝐴 = 𝐵 ) → 𝐴 ∈ 𝐶 ) | |
| 2 | elsni | ⊢ ( 𝐴 ∈ { 𝐵 } → 𝐴 = 𝐵 ) | |
| 3 | 2 | con3i | ⊢ ( ¬ 𝐴 = 𝐵 → ¬ 𝐴 ∈ { 𝐵 } ) |
| 4 | 3 | adantl | ⊢ ( ( 𝐴 ∈ 𝐶 ∧ ¬ 𝐴 = 𝐵 ) → ¬ 𝐴 ∈ { 𝐵 } ) |
| 5 | 1 4 | eldifd | ⊢ ( ( 𝐴 ∈ 𝐶 ∧ ¬ 𝐴 = 𝐵 ) → 𝐴 ∈ ( 𝐶 ∖ { 𝐵 } ) ) |
| 6 | 5 | ex | ⊢ ( 𝐴 ∈ 𝐶 → ( ¬ 𝐴 = 𝐵 → 𝐴 ∈ ( 𝐶 ∖ { 𝐵 } ) ) ) |
| 7 | 6 | orrd | ⊢ ( 𝐴 ∈ 𝐶 → ( 𝐴 = 𝐵 ∨ 𝐴 ∈ ( 𝐶 ∖ { 𝐵 } ) ) ) |
| 8 | eleq1a | ⊢ ( 𝐵 ∈ 𝐶 → ( 𝐴 = 𝐵 → 𝐴 ∈ 𝐶 ) ) | |
| 9 | eldifi | ⊢ ( 𝐴 ∈ ( 𝐶 ∖ { 𝐵 } ) → 𝐴 ∈ 𝐶 ) | |
| 10 | 9 | a1i | ⊢ ( 𝐵 ∈ 𝐶 → ( 𝐴 ∈ ( 𝐶 ∖ { 𝐵 } ) → 𝐴 ∈ 𝐶 ) ) |
| 11 | 8 10 | jaod | ⊢ ( 𝐵 ∈ 𝐶 → ( ( 𝐴 = 𝐵 ∨ 𝐴 ∈ ( 𝐶 ∖ { 𝐵 } ) ) → 𝐴 ∈ 𝐶 ) ) |
| 12 | 7 11 | impbid2 | ⊢ ( 𝐵 ∈ 𝐶 → ( 𝐴 ∈ 𝐶 ↔ ( 𝐴 = 𝐵 ∨ 𝐴 ∈ ( 𝐶 ∖ { 𝐵 } ) ) ) ) |