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

Theorem difxp 5477
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.)
Assertion
Ref Expression
difxp ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) = (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵)))

Proof of Theorem difxp
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 difss 3699 . . 3 ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ⊆ (𝐶 × 𝐷)
2 relxp 5150 . . 3 Rel (𝐶 × 𝐷)
3 relss 5129 . . 3 (((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ⊆ (𝐶 × 𝐷) → (Rel (𝐶 × 𝐷) → Rel ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵))))
41, 2, 3mp2 9 . 2 Rel ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵))
5 relxp 5150 . . 3 Rel ((𝐶𝐴) × 𝐷)
6 relxp 5150 . . 3 Rel (𝐶 × (𝐷𝐵))
7 relun 5158 . . 3 (Rel (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵))) ↔ (Rel ((𝐶𝐴) × 𝐷) ∧ Rel (𝐶 × (𝐷𝐵))))
85, 6, 7mpbir2an 957 . 2 Rel (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵)))
9 ianor 508 . . . . . 6 (¬ (𝑥𝐴𝑦𝐵) ↔ (¬ 𝑥𝐴 ∨ ¬ 𝑦𝐵))
109anbi2i 726 . . . . 5 (((𝑥𝐶𝑦𝐷) ∧ ¬ (𝑥𝐴𝑦𝐵)) ↔ ((𝑥𝐶𝑦𝐷) ∧ (¬ 𝑥𝐴 ∨ ¬ 𝑦𝐵)))
11 andi 907 . . . . 5 (((𝑥𝐶𝑦𝐷) ∧ (¬ 𝑥𝐴 ∨ ¬ 𝑦𝐵)) ↔ (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴) ∨ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵)))
1210, 11bitri 263 . . . 4 (((𝑥𝐶𝑦𝐷) ∧ ¬ (𝑥𝐴𝑦𝐵)) ↔ (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴) ∨ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵)))
13 opelxp 5070 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ↔ (𝑥𝐶𝑦𝐷))
14 opelxp 5070 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
1514notbii 309 . . . . 5 (¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ ¬ (𝑥𝐴𝑦𝐵))
1613, 15anbi12i 729 . . . 4 ((⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ (𝑥𝐴𝑦𝐵)))
17 opelxp 5070 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ↔ (𝑥 ∈ (𝐶𝐴) ∧ 𝑦𝐷))
18 eldif 3550 . . . . . . . 8 (𝑥 ∈ (𝐶𝐴) ↔ (𝑥𝐶 ∧ ¬ 𝑥𝐴))
1918anbi1i 727 . . . . . . 7 ((𝑥 ∈ (𝐶𝐴) ∧ 𝑦𝐷) ↔ ((𝑥𝐶 ∧ ¬ 𝑥𝐴) ∧ 𝑦𝐷))
20 an32 835 . . . . . . 7 (((𝑥𝐶 ∧ ¬ 𝑥𝐴) ∧ 𝑦𝐷) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴))
2119, 20bitri 263 . . . . . 6 ((𝑥 ∈ (𝐶𝐴) ∧ 𝑦𝐷) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴))
2217, 21bitri 263 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴))
23 eldif 3550 . . . . . . 7 (𝑦 ∈ (𝐷𝐵) ↔ (𝑦𝐷 ∧ ¬ 𝑦𝐵))
2423anbi2i 726 . . . . . 6 ((𝑥𝐶𝑦 ∈ (𝐷𝐵)) ↔ (𝑥𝐶 ∧ (𝑦𝐷 ∧ ¬ 𝑦𝐵)))
25 opelxp 5070 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵)) ↔ (𝑥𝐶𝑦 ∈ (𝐷𝐵)))
26 anass 679 . . . . . 6 (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵) ↔ (𝑥𝐶 ∧ (𝑦𝐷 ∧ ¬ 𝑦𝐵)))
2724, 25, 263bitr4i 291 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵)) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵))
2822, 27orbi12i 542 . . . 4 ((⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵))) ↔ (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴) ∨ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵)))
2912, 16, 283bitr4i 291 . . 3 ((⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) ↔ (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵))))
30 eldif 3550 . . 3 (⟨𝑥, 𝑦⟩ ∈ ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ↔ (⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
31 elun 3715 . . 3 (⟨𝑥, 𝑦⟩ ∈ (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵))) ↔ (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵))))
3229, 30, 313bitr4i 291 . 2 (⟨𝑥, 𝑦⟩ ∈ ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ↔ ⟨𝑥, 𝑦⟩ ∈ (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵))))
334, 8, 32eqrelriiv 5137 1 ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) = (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wo 382  wa 383   = wceq 1475  wcel 1977  cdif 3537  cun 3538  wss 3540  cop 4131   × cxp 5036  Rel wrel 5043
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1713  ax-4 1728  ax-5 1827  ax-6 1875  ax-7 1922  ax-9 1986  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590  ax-sep 4709  ax-nul 4717  ax-pr 4833
This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-3an 1033  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ral 2901  df-rex 2902  df-rab 2905  df-v 3175  df-dif 3543  df-un 3545  df-in 3547  df-ss 3554  df-nul 3875  df-if 4037  df-sn 4126  df-pr 4128  df-op 4132  df-opab 4644  df-xp 5044  df-rel 5045
This theorem is referenced by:  difxp1  5478  difxp2  5479  evlslem4  19329  txcld  21216
  Copyright terms: Public domain W3C validator