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
|- ( { x | ph } \ { x | ps } ) = { x | ( ph /\ -. ps ) }

Proof

Step Hyp Ref Expression
1 df-clab
 |-  ( y e. { x | ( ph /\ -. ps ) } <-> [ y / x ] ( ph /\ -. ps ) )
2 sban
 |-  ( [ y / x ] ( ph /\ -. ps ) <-> ( [ y / x ] ph /\ [ y / x ] -. ps ) )
3 df-clab
 |-  ( y e. { x | ph } <-> [ y / x ] ph )
4 3 bicomi
 |-  ( [ y / x ] ph <-> y e. { x | ph } )
5 sbn
 |-  ( [ y / x ] -. ps <-> -. [ y / x ] ps )
6 df-clab
 |-  ( y e. { x | ps } <-> [ y / x ] ps )
7 5 6 xchbinxr
 |-  ( [ y / x ] -. ps <-> -. y e. { x | ps } )
8 4 7 anbi12i
 |-  ( ( [ y / x ] ph /\ [ y / x ] -. ps ) <-> ( y e. { x | ph } /\ -. y e. { x | ps } ) )
9 1 2 8 3bitrri
 |-  ( ( y e. { x | ph } /\ -. y e. { x | ps } ) <-> y e. { x | ( ph /\ -. ps ) } )
10 9 difeqri
 |-  ( { x | ph } \ { x | ps } ) = { x | ( ph /\ -. ps ) }