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

Theorem difxp 6056
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 4062 . . 3 ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ⊆ (𝐶 × 𝐷)
2 relxp 5598 . . 3 Rel (𝐶 × 𝐷)
3 relss 5682 . . 3 (((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ⊆ (𝐶 × 𝐷) → (Rel (𝐶 × 𝐷) → Rel ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵))))
41, 2, 3mp2 9 . 2 Rel ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵))
5 relxp 5598 . . 3 Rel ((𝐶𝐴) × 𝐷)
6 relxp 5598 . . 3 Rel (𝐶 × (𝐷𝐵))
7 relun 5710 . . 3 (Rel (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵))) ↔ (Rel ((𝐶𝐴) × 𝐷) ∧ Rel (𝐶 × (𝐷𝐵))))
85, 6, 7mpbir2an 707 . 2 Rel (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵)))
9 ianor 978 . . . . . 6 (¬ (𝑥𝐴𝑦𝐵) ↔ (¬ 𝑥𝐴 ∨ ¬ 𝑦𝐵))
109anbi2i 622 . . . . 5 (((𝑥𝐶𝑦𝐷) ∧ ¬ (𝑥𝐴𝑦𝐵)) ↔ ((𝑥𝐶𝑦𝐷) ∧ (¬ 𝑥𝐴 ∨ ¬ 𝑦𝐵)))
11 andi 1004 . . . . 5 (((𝑥𝐶𝑦𝐷) ∧ (¬ 𝑥𝐴 ∨ ¬ 𝑦𝐵)) ↔ (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴) ∨ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵)))
1210, 11bitri 274 . . . 4 (((𝑥𝐶𝑦𝐷) ∧ ¬ (𝑥𝐴𝑦𝐵)) ↔ (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴) ∨ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵)))
13 opelxp 5616 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ↔ (𝑥𝐶𝑦𝐷))
14 opelxp 5616 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
1514notbii 319 . . . . 5 (¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ ¬ (𝑥𝐴𝑦𝐵))
1613, 15anbi12i 626 . . . 4 ((⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ (𝑥𝐴𝑦𝐵)))
17 opelxp 5616 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ↔ (𝑥 ∈ (𝐶𝐴) ∧ 𝑦𝐷))
18 eldif 3893 . . . . . . . 8 (𝑥 ∈ (𝐶𝐴) ↔ (𝑥𝐶 ∧ ¬ 𝑥𝐴))
1918anbi1i 623 . . . . . . 7 ((𝑥 ∈ (𝐶𝐴) ∧ 𝑦𝐷) ↔ ((𝑥𝐶 ∧ ¬ 𝑥𝐴) ∧ 𝑦𝐷))
20 an32 642 . . . . . . 7 (((𝑥𝐶 ∧ ¬ 𝑥𝐴) ∧ 𝑦𝐷) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴))
2119, 20bitri 274 . . . . . 6 ((𝑥 ∈ (𝐶𝐴) ∧ 𝑦𝐷) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴))
2217, 21bitri 274 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴))
23 eldif 3893 . . . . . . 7 (𝑦 ∈ (𝐷𝐵) ↔ (𝑦𝐷 ∧ ¬ 𝑦𝐵))
2423anbi2i 622 . . . . . 6 ((𝑥𝐶𝑦 ∈ (𝐷𝐵)) ↔ (𝑥𝐶 ∧ (𝑦𝐷 ∧ ¬ 𝑦𝐵)))
25 opelxp 5616 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵)) ↔ (𝑥𝐶𝑦 ∈ (𝐷𝐵)))
26 anass 468 . . . . . 6 (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵) ↔ (𝑥𝐶 ∧ (𝑦𝐷 ∧ ¬ 𝑦𝐵)))
2724, 25, 263bitr4i 302 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵)) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵))
2822, 27orbi12i 911 . . . 4 ((⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵))) ↔ (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴) ∨ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵)))
2912, 16, 283bitr4i 302 . . 3 ((⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) ↔ (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵))))
30 eldif 3893 . . 3 (⟨𝑥, 𝑦⟩ ∈ ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ↔ (⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
31 elun 4079 . . 3 (⟨𝑥, 𝑦⟩ ∈ (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵))) ↔ (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵))))
3229, 30, 313bitr4i 302 . 2 (⟨𝑥, 𝑦⟩ ∈ ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ↔ ⟨𝑥, 𝑦⟩ ∈ (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵))))
334, 8, 32eqrelriiv 5689 1 ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) = (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wa 395  wo 843   = wceq 1539  wcel 2108  cdif 3880  cun 3881  wss 3883  cop 4564   × cxp 5578  Rel wrel 5585
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-12 2173  ax-ext 2709  ax-sep 5218  ax-nul 5225  ax-pr 5347
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-sb 2069  df-clab 2716  df-cleq 2730  df-clel 2817  df-ral 3068  df-rex 3069  df-rab 3072  df-v 3424  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-nul 4254  df-if 4457  df-sn 4559  df-pr 4561  df-op 4565  df-opab 5133  df-xp 5586  df-rel 5587
This theorem is referenced by:  difxp1  6057  difxp2  6058  evlslem4  21194  txcld  22662  suppovss  30919
  Copyright terms: Public domain W3C validator