Metamath Proof Explorer


Theorem difab

Description: Difference of two class abstractions. (Contributed by NM, 23-Oct-2004) (Proof shortened by Andrew Salmon, 26-Jun-2011)

Ref Expression
Assertion difab ( { 𝑥𝜑 } ∖ { 𝑥𝜓 } ) = { 𝑥 ∣ ( 𝜑 ∧ ¬ 𝜓 ) }

Proof

Step Hyp Ref Expression
1 df-clab ( 𝑦 ∈ { 𝑥 ∣ ( 𝜑 ∧ ¬ 𝜓 ) } ↔ [ 𝑦 / 𝑥 ] ( 𝜑 ∧ ¬ 𝜓 ) )
2 sban ( [ 𝑦 / 𝑥 ] ( 𝜑 ∧ ¬ 𝜓 ) ↔ ( [ 𝑦 / 𝑥 ] 𝜑 ∧ [ 𝑦 / 𝑥 ] ¬ 𝜓 ) )
3 df-clab ( 𝑦 ∈ { 𝑥𝜑 } ↔ [ 𝑦 / 𝑥 ] 𝜑 )
4 3 bicomi ( [ 𝑦 / 𝑥 ] 𝜑𝑦 ∈ { 𝑥𝜑 } )
5 sbn ( [ 𝑦 / 𝑥 ] ¬ 𝜓 ↔ ¬ [ 𝑦 / 𝑥 ] 𝜓 )
6 df-clab ( 𝑦 ∈ { 𝑥𝜓 } ↔ [ 𝑦 / 𝑥 ] 𝜓 )
7 5 6 xchbinxr ( [ 𝑦 / 𝑥 ] ¬ 𝜓 ↔ ¬ 𝑦 ∈ { 𝑥𝜓 } )
8 4 7 anbi12i ( ( [ 𝑦 / 𝑥 ] 𝜑 ∧ [ 𝑦 / 𝑥 ] ¬ 𝜓 ) ↔ ( 𝑦 ∈ { 𝑥𝜑 } ∧ ¬ 𝑦 ∈ { 𝑥𝜓 } ) )
9 1 2 8 3bitrri ( ( 𝑦 ∈ { 𝑥𝜑 } ∧ ¬ 𝑦 ∈ { 𝑥𝜓 } ) ↔ 𝑦 ∈ { 𝑥 ∣ ( 𝜑 ∧ ¬ 𝜓 ) } )
10 9 difeqri ( { 𝑥𝜑 } ∖ { 𝑥𝜓 } ) = { 𝑥 ∣ ( 𝜑 ∧ ¬ 𝜓 ) }