Metamath Proof Explorer


Theorem eqoreldif

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 ⊢ B ∈ C → A ∈ C ↔ A = B ∨ A ∈ C ∖ B

Proof

Step Hyp Ref Expression
1 simpl ⊢ A ∈ C ∧ ¬ A = B → A ∈ C
2 elsni ⊢ A ∈ B → A = B
3 2 con3i ⊢ ¬ A = B → ¬ A ∈ B
4 3 adantl ⊢ A ∈ C ∧ ¬ A = B → ¬ A ∈ B
5 1 4 eldifd ⊢ A ∈ C ∧ ¬ A = B → A ∈ C ∖ B
6 5 ex ⊢ A ∈ C → ¬ A = B → A ∈ C ∖ B
7 6 orrd ⊢ A ∈ C → A = B ∨ A ∈ C ∖ B
8 eleq1a ⊢ B ∈ C → A = B → A ∈ C
9 eldifi ⊢ A ∈ C ∖ B → A ∈ C
10 9 a1i ⊢ B ∈ C → A ∈ C ∖ B → A ∈ C
11 8 10 jaod ⊢ B ∈ C → A = B ∨ A ∈ C ∖ B → A ∈ C
12 7 11 impbid2 ⊢ B ∈ C → A ∈ C ↔ A = B ∨ A ∈ C ∖ B