MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  difxp Structured version   Visualization version   GIF version

Theorem difxp 6154
Description: Difference of Cartesian products, expressed in terms of a union of Cartesian products of differences. (Contributed by Jeff Madsen, 2-Sep-2009.) (Revised by Mario Carneiro, 26-Jun-2014.) (Proof shortened by Wolf Lammen, 16-May-2025.)
Assertion
Ref Expression
difxp ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) = (((𝐶 ∖ 𝐴) × 𝐷) ∪ (𝐶 × (𝐷 ∖ 𝐵)))

Proof of Theorem difxp
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 difss 4083 . . 3 ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ⊆ (𝐶 × 𝐷)
2 relxp 5669 . . 3 Rel (𝐶 × 𝐷)
3 relss 5758 . . 3 (((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ⊆ (𝐶 × 𝐷) → (Rel (𝐶 × 𝐷) → Rel ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵))))
41, 2, 3mp2 9 . 2 Rel ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵))
5 relxp 5669 . . 3 Rel ((𝐶 ∖ 𝐴) × 𝐷)
6 relxp 5669 . . 3 Rel (𝐶 × (𝐷 ∖ 𝐵))
7 relun 5789 . . 3 (Rel (((𝐶 ∖ 𝐴) × 𝐷) ∪ (𝐶 × (𝐷 ∖ 𝐵))) ↔ (Rel ((𝐶 ∖ 𝐴) × 𝐷) ∧ Rel (𝐶 × (𝐷 ∖ 𝐵))))
85, 6, 7mpbir2an 724 . 2 Rel (((𝐶 ∖ 𝐴) × 𝐷) ∪ (𝐶 × (𝐷 ∖ 𝐵)))
9 ianor 997 . . . . . 6 (¬ (𝑥 ∈ 𝐴 ∧ 𝑦 ∈ 𝐵) ↔ (¬ 𝑥 ∈ 𝐴 ∨ ¬ 𝑦 ∈ 𝐵))
109anbi2i 635 . . . . 5 (((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ (𝑥 ∈ 𝐴 ∧ 𝑦 ∈ 𝐵)) ↔ ((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ (¬ 𝑥 ∈ 𝐴 ∨ ¬ 𝑦 ∈ 𝐵)))
11 andi 1025 . . . . 5 (((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ (¬ 𝑥 ∈ 𝐴 ∨ ¬ 𝑦 ∈ 𝐵)) ↔ (((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ 𝑥 ∈ 𝐴) ∨ ((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ 𝑦 ∈ 𝐵)))
1210, 11bitri 278 . . . 4 (((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ (𝑥 ∈ 𝐴 ∧ 𝑦 ∈ 𝐵)) ↔ (((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ 𝑥 ∈ 𝐴) ∨ ((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ 𝑦 ∈ 𝐵)))
13 opelxp 5687 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ↔ (𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷))
14 opelxp 5687 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥 ∈ 𝐴 ∧ 𝑦 ∈ 𝐵))
1514notbii 323 . . . . 5 (¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ ¬ (𝑥 ∈ 𝐴 ∧ 𝑦 ∈ 𝐵))
1613, 15anbi12i 640 . . . 4 ((⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) ↔ ((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ (𝑥 ∈ 𝐴 ∧ 𝑦 ∈ 𝐵)))
17 opelxp 5687 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ ((𝐶 ∖ 𝐴) × 𝐷) ↔ (𝑥 ∈ (𝐶 ∖ 𝐴) ∧ 𝑦 ∈ 𝐷))
18 eldif 3909 . . . . . . 7 (𝑥 ∈ (𝐶 ∖ 𝐴) ↔ (𝑥 ∈ 𝐶 ∧ ¬ 𝑥 ∈ 𝐴))
1918anbi1i 636 . . . . . 6 ((𝑥 ∈ (𝐶 ∖ 𝐴) ∧ 𝑦 ∈ 𝐷) ↔ ((𝑥 ∈ 𝐶 ∧ ¬ 𝑥 ∈ 𝐴) ∧ 𝑦 ∈ 𝐷))
20 an32 659 . . . . . 6 (((𝑥 ∈ 𝐶 ∧ ¬ 𝑥 ∈ 𝐴) ∧ 𝑦 ∈ 𝐷) ↔ ((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ 𝑥 ∈ 𝐴))
2117, 19, 203bitri 300 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ ((𝐶 ∖ 𝐴) × 𝐷) ↔ ((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ 𝑥 ∈ 𝐴))
22 eldif 3909 . . . . . . 7 (𝑦 ∈ (𝐷 ∖ 𝐵) ↔ (𝑦 ∈ 𝐷 ∧ ¬ 𝑦 ∈ 𝐵))
2322anbi2i 635 . . . . . 6 ((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ (𝐷 ∖ 𝐵)) ↔ (𝑥 ∈ 𝐶 ∧ (𝑦 ∈ 𝐷 ∧ ¬ 𝑦 ∈ 𝐵)))
24 opelxp 5687 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷 ∖ 𝐵)) ↔ (𝑥 ∈ 𝐶 ∧ 𝑦 ∈ (𝐷 ∖ 𝐵)))
25 anass 474 . . . . . 6 (((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ 𝑦 ∈ 𝐵) ↔ (𝑥 ∈ 𝐶 ∧ (𝑦 ∈ 𝐷 ∧ ¬ 𝑦 ∈ 𝐵)))
2623, 24, 253bitr4i 306 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷 ∖ 𝐵)) ↔ ((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ 𝑦 ∈ 𝐵))
2721, 26orbi12i 928 . . . 4 ((⟨𝑥, 𝑦⟩ ∈ ((𝐶 ∖ 𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷 ∖ 𝐵))) ↔ (((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ 𝑥 ∈ 𝐴) ∨ ((𝑥 ∈ 𝐶 ∧ 𝑦 ∈ 𝐷) ∧ ¬ 𝑦 ∈ 𝐵)))
2812, 16, 273bitr4i 306 . . 3 ((⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) ↔ (⟨𝑥, 𝑦⟩ ∈ ((𝐶 ∖ 𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷 ∖ 𝐵))))
29 eldif 3909 . . 3 (⟨𝑥, 𝑦⟩ ∈ ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ↔ (⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
30 elun 4100 . . 3 (⟨𝑥, 𝑦⟩ ∈ (((𝐶 ∖ 𝐴) × 𝐷) ∪ (𝐶 × (𝐷 ∖ 𝐵))) ↔ (⟨𝑥, 𝑦⟩ ∈ ((𝐶 ∖ 𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷 ∖ 𝐵))))
3128, 29, 303bitr4i 306 . 2 (⟨𝑥, 𝑦⟩ ∈ ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ↔ ⟨𝑥, 𝑦⟩ ∈ (((𝐶 ∖ 𝐴) × 𝐷) ∪ (𝐶 × (𝐷 ∖ 𝐵))))
324, 8, 31eqrelriiv 5766 1 ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) = (((𝐶 ∖ 𝐴) × 𝐷) ∪ (𝐶 × (𝐷 ∖ 𝐵)))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  ¬ wn 3   ∧ wa 401   ∨ wo 861   = wceq 1570   ∈ wcel 2145   ∖ cdif 3896   ∪ cun 3897   ⊆ wss 3899  ⟨cop 4590   × cxp 5649  Rel wrel 5656
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1943  ax-6 2000  ax-7 2041  ax-8 2147  ax-9 2155  ax-ext 2733  ax-sep 5249  ax-pr 5391
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-sb 2100  df-clab 2740  df-cleq 2753  df-clel 2836  df-ral 3078  df-rex 3088  df-rab 3414  df-v 3453  df-dif 3902  df-un 3904  df-in 3906  df-ss 3916  df-nul 4280  df-if 4483  df-sn 4585  df-pr 4587  df-op 4591  df-opab 5168  df-xp 5657  df-rel 5658
This theorem is used by:  difxp1  6155  difxp2  6156  evlslem4  22365  txcld  23902  suppovss  33256  elrgspnlem2  33786  elrgspnsubrunlem2  33791
  Copyright terms: Public domain W3C validator