# Metamath Proof Explorer

## Theorem dfun2

Description: An alternate definition of the union of two classes in terms of class difference, requiring no dummy variables. Along with dfin2 and dfss4 it shows we can express union, intersection, and subset directly in terms of the single "primitive" operation \ (class difference). (Contributed by NM, 10-Jun-2004)

Ref Expression
Assertion dfun2 ( 𝐴𝐵 ) = ( V ∖ ( ( V ∖ 𝐴 ) ∖ 𝐵 ) )

### Proof

Step Hyp Ref Expression
1 vex 𝑥 ∈ V
2 eldif ( 𝑥 ∈ ( V ∖ 𝐴 ) ↔ ( 𝑥 ∈ V ∧ ¬ 𝑥𝐴 ) )
3 1 2 mpbiran ( 𝑥 ∈ ( V ∖ 𝐴 ) ↔ ¬ 𝑥𝐴 )
4 3 anbi1i ( ( 𝑥 ∈ ( V ∖ 𝐴 ) ∧ ¬ 𝑥𝐵 ) ↔ ( ¬ 𝑥𝐴 ∧ ¬ 𝑥𝐵 ) )
5 eldif ( 𝑥 ∈ ( ( V ∖ 𝐴 ) ∖ 𝐵 ) ↔ ( 𝑥 ∈ ( V ∖ 𝐴 ) ∧ ¬ 𝑥𝐵 ) )
6 ioran ( ¬ ( 𝑥𝐴𝑥𝐵 ) ↔ ( ¬ 𝑥𝐴 ∧ ¬ 𝑥𝐵 ) )
7 4 5 6 3bitr4i ( 𝑥 ∈ ( ( V ∖ 𝐴 ) ∖ 𝐵 ) ↔ ¬ ( 𝑥𝐴𝑥𝐵 ) )
8 7 con2bii ( ( 𝑥𝐴𝑥𝐵 ) ↔ ¬ 𝑥 ∈ ( ( V ∖ 𝐴 ) ∖ 𝐵 ) )
9 eldif ( 𝑥 ∈ ( V ∖ ( ( V ∖ 𝐴 ) ∖ 𝐵 ) ) ↔ ( 𝑥 ∈ V ∧ ¬ 𝑥 ∈ ( ( V ∖ 𝐴 ) ∖ 𝐵 ) ) )
10 1 9 mpbiran ( 𝑥 ∈ ( V ∖ ( ( V ∖ 𝐴 ) ∖ 𝐵 ) ) ↔ ¬ 𝑥 ∈ ( ( V ∖ 𝐴 ) ∖ 𝐵 ) )
11 8 10 bitr4i ( ( 𝑥𝐴𝑥𝐵 ) ↔ 𝑥 ∈ ( V ∖ ( ( V ∖ 𝐴 ) ∖ 𝐵 ) ) )
12 11 uneqri ( 𝐴𝐵 ) = ( V ∖ ( ( V ∖ 𝐴 ) ∖ 𝐵 ) )