Metamath Proof Explorer


Theorem undif4

Description: Distribute union over difference. (Contributed by NM, 17-May-1998) (Proof shortened by Andrew Salmon, 26-Jun-2011)

Ref Expression
Assertion undif4 ( ( 𝐴𝐶 ) = ∅ → ( 𝐴 ∪ ( 𝐵𝐶 ) ) = ( ( 𝐴𝐵 ) ∖ 𝐶 ) )

Proof

Step Hyp Ref Expression
1 pm2.621 ( ( 𝑥𝐴 → ¬ 𝑥𝐶 ) → ( ( 𝑥𝐴 ∨ ¬ 𝑥𝐶 ) → ¬ 𝑥𝐶 ) )
2 olc ( ¬ 𝑥𝐶 → ( 𝑥𝐴 ∨ ¬ 𝑥𝐶 ) )
3 1 2 impbid1 ( ( 𝑥𝐴 → ¬ 𝑥𝐶 ) → ( ( 𝑥𝐴 ∨ ¬ 𝑥𝐶 ) ↔ ¬ 𝑥𝐶 ) )
4 3 anbi2d ( ( 𝑥𝐴 → ¬ 𝑥𝐶 ) → ( ( ( 𝑥𝐴𝑥𝐵 ) ∧ ( 𝑥𝐴 ∨ ¬ 𝑥𝐶 ) ) ↔ ( ( 𝑥𝐴𝑥𝐵 ) ∧ ¬ 𝑥𝐶 ) ) )
5 eldif ( 𝑥 ∈ ( 𝐵𝐶 ) ↔ ( 𝑥𝐵 ∧ ¬ 𝑥𝐶 ) )
6 5 orbi2i ( ( 𝑥𝐴𝑥 ∈ ( 𝐵𝐶 ) ) ↔ ( 𝑥𝐴 ∨ ( 𝑥𝐵 ∧ ¬ 𝑥𝐶 ) ) )
7 ordi ( ( 𝑥𝐴 ∨ ( 𝑥𝐵 ∧ ¬ 𝑥𝐶 ) ) ↔ ( ( 𝑥𝐴𝑥𝐵 ) ∧ ( 𝑥𝐴 ∨ ¬ 𝑥𝐶 ) ) )
8 6 7 bitri ( ( 𝑥𝐴𝑥 ∈ ( 𝐵𝐶 ) ) ↔ ( ( 𝑥𝐴𝑥𝐵 ) ∧ ( 𝑥𝐴 ∨ ¬ 𝑥𝐶 ) ) )
9 elun ( 𝑥 ∈ ( 𝐴𝐵 ) ↔ ( 𝑥𝐴𝑥𝐵 ) )
10 9 anbi1i ( ( 𝑥 ∈ ( 𝐴𝐵 ) ∧ ¬ 𝑥𝐶 ) ↔ ( ( 𝑥𝐴𝑥𝐵 ) ∧ ¬ 𝑥𝐶 ) )
11 4 8 10 3bitr4g ( ( 𝑥𝐴 → ¬ 𝑥𝐶 ) → ( ( 𝑥𝐴𝑥 ∈ ( 𝐵𝐶 ) ) ↔ ( 𝑥 ∈ ( 𝐴𝐵 ) ∧ ¬ 𝑥𝐶 ) ) )
12 elun ( 𝑥 ∈ ( 𝐴 ∪ ( 𝐵𝐶 ) ) ↔ ( 𝑥𝐴𝑥 ∈ ( 𝐵𝐶 ) ) )
13 eldif ( 𝑥 ∈ ( ( 𝐴𝐵 ) ∖ 𝐶 ) ↔ ( 𝑥 ∈ ( 𝐴𝐵 ) ∧ ¬ 𝑥𝐶 ) )
14 11 12 13 3bitr4g ( ( 𝑥𝐴 → ¬ 𝑥𝐶 ) → ( 𝑥 ∈ ( 𝐴 ∪ ( 𝐵𝐶 ) ) ↔ 𝑥 ∈ ( ( 𝐴𝐵 ) ∖ 𝐶 ) ) )
15 14 alimi ( ∀ 𝑥 ( 𝑥𝐴 → ¬ 𝑥𝐶 ) → ∀ 𝑥 ( 𝑥 ∈ ( 𝐴 ∪ ( 𝐵𝐶 ) ) ↔ 𝑥 ∈ ( ( 𝐴𝐵 ) ∖ 𝐶 ) ) )
16 disj1 ( ( 𝐴𝐶 ) = ∅ ↔ ∀ 𝑥 ( 𝑥𝐴 → ¬ 𝑥𝐶 ) )
17 dfcleq ( ( 𝐴 ∪ ( 𝐵𝐶 ) ) = ( ( 𝐴𝐵 ) ∖ 𝐶 ) ↔ ∀ 𝑥 ( 𝑥 ∈ ( 𝐴 ∪ ( 𝐵𝐶 ) ) ↔ 𝑥 ∈ ( ( 𝐴𝐵 ) ∖ 𝐶 ) ) )
18 15 16 17 3imtr4i ( ( 𝐴𝐶 ) = ∅ → ( 𝐴 ∪ ( 𝐵𝐶 ) ) = ( ( 𝐴𝐵 ) ∖ 𝐶 ) )