Metamath Proof Explorer


Theorem indifdi

Description: Distribute intersection over difference. (Contributed by BTernaryTau, 14-Aug-2024)

Ref Expression
Assertion indifdi ( 𝐴 ∩ ( 𝐵𝐶 ) ) = ( ( 𝐴𝐵 ) ∖ ( 𝐴𝐶 ) )

Proof

Step Hyp Ref Expression
1 elin ( 𝑥 ∈ ( 𝐴 ∩ ( 𝐵𝐶 ) ) ↔ ( 𝑥𝐴𝑥 ∈ ( 𝐵𝐶 ) ) )
2 eldif ( 𝑥 ∈ ( 𝐵𝐶 ) ↔ ( 𝑥𝐵 ∧ ¬ 𝑥𝐶 ) )
3 2 anbi2i ( ( 𝑥𝐴𝑥 ∈ ( 𝐵𝐶 ) ) ↔ ( 𝑥𝐴 ∧ ( 𝑥𝐵 ∧ ¬ 𝑥𝐶 ) ) )
4 abai ( ( 𝑥𝐴 ∧ ¬ 𝑥𝐶 ) ↔ ( 𝑥𝐴 ∧ ( 𝑥𝐴 → ¬ 𝑥𝐶 ) ) )
5 4 anbi2i ( ( 𝑥𝐵 ∧ ( 𝑥𝐴 ∧ ¬ 𝑥𝐶 ) ) ↔ ( 𝑥𝐵 ∧ ( 𝑥𝐴 ∧ ( 𝑥𝐴 → ¬ 𝑥𝐶 ) ) ) )
6 an12 ( ( 𝑥𝐴 ∧ ( 𝑥𝐵 ∧ ¬ 𝑥𝐶 ) ) ↔ ( 𝑥𝐵 ∧ ( 𝑥𝐴 ∧ ¬ 𝑥𝐶 ) ) )
7 eldif ( 𝑥 ∈ ( ( 𝐴𝐵 ) ∖ ( 𝐴𝐶 ) ) ↔ ( 𝑥 ∈ ( 𝐴𝐵 ) ∧ ¬ 𝑥 ∈ ( 𝐴𝐶 ) ) )
8 elin ( 𝑥 ∈ ( 𝐴𝐵 ) ↔ ( 𝑥𝐴𝑥𝐵 ) )
9 8 bicomi ( ( 𝑥𝐴𝑥𝐵 ) ↔ 𝑥 ∈ ( 𝐴𝐵 ) )
10 imnan ( ( 𝑥𝐴 → ¬ 𝑥𝐶 ) ↔ ¬ ( 𝑥𝐴𝑥𝐶 ) )
11 elin ( 𝑥 ∈ ( 𝐴𝐶 ) ↔ ( 𝑥𝐴𝑥𝐶 ) )
12 10 11 xchbinxr ( ( 𝑥𝐴 → ¬ 𝑥𝐶 ) ↔ ¬ 𝑥 ∈ ( 𝐴𝐶 ) )
13 9 12 anbi12i ( ( ( 𝑥𝐴𝑥𝐵 ) ∧ ( 𝑥𝐴 → ¬ 𝑥𝐶 ) ) ↔ ( 𝑥 ∈ ( 𝐴𝐵 ) ∧ ¬ 𝑥 ∈ ( 𝐴𝐶 ) ) )
14 an21 ( ( ( 𝑥𝐴𝑥𝐵 ) ∧ ( 𝑥𝐴 → ¬ 𝑥𝐶 ) ) ↔ ( 𝑥𝐵 ∧ ( 𝑥𝐴 ∧ ( 𝑥𝐴 → ¬ 𝑥𝐶 ) ) ) )
15 7 13 14 3bitr2i ( 𝑥 ∈ ( ( 𝐴𝐵 ) ∖ ( 𝐴𝐶 ) ) ↔ ( 𝑥𝐵 ∧ ( 𝑥𝐴 ∧ ( 𝑥𝐴 → ¬ 𝑥𝐶 ) ) ) )
16 5 6 15 3bitr4i ( ( 𝑥𝐴 ∧ ( 𝑥𝐵 ∧ ¬ 𝑥𝐶 ) ) ↔ 𝑥 ∈ ( ( 𝐴𝐵 ) ∖ ( 𝐴𝐶 ) ) )
17 1 3 16 3bitri ( 𝑥 ∈ ( 𝐴 ∩ ( 𝐵𝐶 ) ) ↔ 𝑥 ∈ ( ( 𝐴𝐵 ) ∖ ( 𝐴𝐶 ) ) )
18 17 eqriv ( 𝐴 ∩ ( 𝐵𝐶 ) ) = ( ( 𝐴𝐵 ) ∖ ( 𝐴𝐶 ) )