Metamath Proof Explorer


Theorem difin2

Description: Represent a class difference as an intersection with a larger difference. (Contributed by Jeff Madsen, 2-Sep-2009)

Ref Expression
Assertion difin2
|- ( A C_ C -> ( A \ B ) = ( ( C \ B ) i^i A ) )

Proof

Step Hyp Ref Expression
1 ssel
 |-  ( A C_ C -> ( x e. A -> x e. C ) )
2 1 pm4.71d
 |-  ( A C_ C -> ( x e. A <-> ( x e. A /\ x e. C ) ) )
3 2 anbi1d
 |-  ( A C_ C -> ( ( x e. A /\ -. x e. B ) <-> ( ( x e. A /\ x e. C ) /\ -. x e. B ) ) )
4 eldif
 |-  ( x e. ( A \ B ) <-> ( x e. A /\ -. x e. B ) )
5 elin
 |-  ( x e. ( ( C \ B ) i^i A ) <-> ( x e. ( C \ B ) /\ x e. A ) )
6 eldif
 |-  ( x e. ( C \ B ) <-> ( x e. C /\ -. x e. B ) )
7 6 anbi1i
 |-  ( ( x e. ( C \ B ) /\ x e. A ) <-> ( ( x e. C /\ -. x e. B ) /\ x e. A ) )
8 ancom
 |-  ( ( ( x e. C /\ -. x e. B ) /\ x e. A ) <-> ( x e. A /\ ( x e. C /\ -. x e. B ) ) )
9 anass
 |-  ( ( ( x e. A /\ x e. C ) /\ -. x e. B ) <-> ( x e. A /\ ( x e. C /\ -. x e. B ) ) )
10 8 9 bitr4i
 |-  ( ( ( x e. C /\ -. x e. B ) /\ x e. A ) <-> ( ( x e. A /\ x e. C ) /\ -. x e. B ) )
11 5 7 10 3bitri
 |-  ( x e. ( ( C \ B ) i^i A ) <-> ( ( x e. A /\ x e. C ) /\ -. x e. B ) )
12 3 4 11 3bitr4g
 |-  ( A C_ C -> ( x e. ( A \ B ) <-> x e. ( ( C \ B ) i^i A ) ) )
13 12 eqrdv
 |-  ( A C_ C -> ( A \ B ) = ( ( C \ B ) i^i A ) )