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

Theorem difxp 5988
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 4059 . . 3 ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ⊆ (𝐶 × 𝐷)
2 relxp 5537 . . 3 Rel (𝐶 × 𝐷)
3 relss 5620 . . 3 (((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ⊆ (𝐶 × 𝐷) → (Rel (𝐶 × 𝐷) → Rel ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵))))
41, 2, 3mp2 9 . 2 Rel ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵))
5 relxp 5537 . . 3 Rel ((𝐶𝐴) × 𝐷)
6 relxp 5537 . . 3 Rel (𝐶 × (𝐷𝐵))
7 relun 5648 . . 3 (Rel (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵))) ↔ (Rel ((𝐶𝐴) × 𝐷) ∧ Rel (𝐶 × (𝐷𝐵))))
85, 6, 7mpbir2an 710 . 2 Rel (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵)))
9 ianor 979 . . . . . 6 (¬ (𝑥𝐴𝑦𝐵) ↔ (¬ 𝑥𝐴 ∨ ¬ 𝑦𝐵))
109anbi2i 625 . . . . 5 (((𝑥𝐶𝑦𝐷) ∧ ¬ (𝑥𝐴𝑦𝐵)) ↔ ((𝑥𝐶𝑦𝐷) ∧ (¬ 𝑥𝐴 ∨ ¬ 𝑦𝐵)))
11 andi 1005 . . . . 5 (((𝑥𝐶𝑦𝐷) ∧ (¬ 𝑥𝐴 ∨ ¬ 𝑦𝐵)) ↔ (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴) ∨ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵)))
1210, 11bitri 278 . . . 4 (((𝑥𝐶𝑦𝐷) ∧ ¬ (𝑥𝐴𝑦𝐵)) ↔ (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴) ∨ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵)))
13 opelxp 5555 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ↔ (𝑥𝐶𝑦𝐷))
14 opelxp 5555 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ (𝑥𝐴𝑦𝐵))
1514notbii 323 . . . . 5 (¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵) ↔ ¬ (𝑥𝐴𝑦𝐵))
1613, 15anbi12i 629 . . . 4 ((⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ (𝑥𝐴𝑦𝐵)))
17 opelxp 5555 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ↔ (𝑥 ∈ (𝐶𝐴) ∧ 𝑦𝐷))
18 eldif 3891 . . . . . . . 8 (𝑥 ∈ (𝐶𝐴) ↔ (𝑥𝐶 ∧ ¬ 𝑥𝐴))
1918anbi1i 626 . . . . . . 7 ((𝑥 ∈ (𝐶𝐴) ∧ 𝑦𝐷) ↔ ((𝑥𝐶 ∧ ¬ 𝑥𝐴) ∧ 𝑦𝐷))
20 an32 645 . . . . . . 7 (((𝑥𝐶 ∧ ¬ 𝑥𝐴) ∧ 𝑦𝐷) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴))
2119, 20bitri 278 . . . . . 6 ((𝑥 ∈ (𝐶𝐴) ∧ 𝑦𝐷) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴))
2217, 21bitri 278 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴))
23 eldif 3891 . . . . . . 7 (𝑦 ∈ (𝐷𝐵) ↔ (𝑦𝐷 ∧ ¬ 𝑦𝐵))
2423anbi2i 625 . . . . . 6 ((𝑥𝐶𝑦 ∈ (𝐷𝐵)) ↔ (𝑥𝐶 ∧ (𝑦𝐷 ∧ ¬ 𝑦𝐵)))
25 opelxp 5555 . . . . . 6 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵)) ↔ (𝑥𝐶𝑦 ∈ (𝐷𝐵)))
26 anass 472 . . . . . 6 (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵) ↔ (𝑥𝐶 ∧ (𝑦𝐷 ∧ ¬ 𝑦𝐵)))
2724, 25, 263bitr4i 306 . . . . 5 (⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵)) ↔ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵))
2822, 27orbi12i 912 . . . 4 ((⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵))) ↔ (((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑥𝐴) ∨ ((𝑥𝐶𝑦𝐷) ∧ ¬ 𝑦𝐵)))
2912, 16, 283bitr4i 306 . . 3 ((⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)) ↔ (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵))))
30 eldif 3891 . . 3 (⟨𝑥, 𝑦⟩ ∈ ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ↔ (⟨𝑥, 𝑦⟩ ∈ (𝐶 × 𝐷) ∧ ¬ ⟨𝑥, 𝑦⟩ ∈ (𝐴 × 𝐵)))
31 elun 4076 . . 3 (⟨𝑥, 𝑦⟩ ∈ (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵))) ↔ (⟨𝑥, 𝑦⟩ ∈ ((𝐶𝐴) × 𝐷) ∨ ⟨𝑥, 𝑦⟩ ∈ (𝐶 × (𝐷𝐵))))
3229, 30, 313bitr4i 306 . 2 (⟨𝑥, 𝑦⟩ ∈ ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) ↔ ⟨𝑥, 𝑦⟩ ∈ (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵))))
334, 8, 32eqrelriiv 5627 1 ((𝐶 × 𝐷) ∖ (𝐴 × 𝐵)) = (((𝐶𝐴) × 𝐷) ∪ (𝐶 × (𝐷𝐵)))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wa 399  wo 844   = wceq 1538  wcel 2111  cdif 3878  cun 3879  wss 3881  cop 4531   × cxp 5517  Rel wrel 5524
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-sep 5167  ax-nul 5174  ax-pr 5295
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ral 3111  df-rex 3112  df-v 3443  df-dif 3884  df-un 3886  df-in 3888  df-ss 3898  df-nul 4244  df-if 4426  df-sn 4526  df-pr 4528  df-op 4532  df-opab 5093  df-xp 5525  df-rel 5526
This theorem is referenced by:  difxp1  5989  difxp2  5990  evlslem4  20747  txcld  22208  suppovss  30443
  Copyright terms: Public domain W3C validator