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

Theorem xpord2lem 8215
Description: Lemma for Cartesian product ordering. Calculate the value of the Cartesian product relation. (Contributed by Scott Fenton, 19-Aug-2024.)
Hypothesis
Ref Expression
xpord2.1 𝑇 = {⟨𝑥, 𝑦⟩ ∣ (𝑥 ∈ (𝐴 × 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ (((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ∧ ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ∧ 𝑥 ≠ 𝑦))}
Assertion
Ref Expression
xpord2lem (⟨𝑎, 𝑏⟩𝑇⟨𝑐, 𝑑⟩ ↔ ((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵) ∧ ((𝑎𝑅𝑐 ∨ 𝑎 = 𝑐) ∧ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑) ∧ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑))))
Distinct variable groups:   𝑥,𝐴,𝑦   𝑥,𝐵,𝑦   𝑥,𝑎,𝑦   𝑥,𝑏,𝑦   𝑥,𝑐,𝑦   𝑥,𝑑,𝑦   𝑥,𝑅,𝑦   𝑥,𝑆,𝑦
Allowed substitution hints:   𝐴(𝑎, 𝑏, 𝑐, 𝑑)   𝐵(𝑎, 𝑏, 𝑐, 𝑑)   𝑅(𝑎, 𝑏, 𝑐, 𝑑)   𝑆(𝑎, 𝑏, 𝑐, 𝑑)   𝑇(𝑥, 𝑦, 𝑎, 𝑏, 𝑐, 𝑑)

Proof of Theorem xpord2lem
StepHypRef Expression
1 opex 5447 . 2 ⟨𝑎, 𝑏⟩ ∈ V
2 opex 5447 . 2 ⟨𝑐, 𝑑⟩ ∈ V
3 eleq1 2863 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (𝑥 ∈ (𝐴 × 𝐵) ↔ ⟨𝑎, 𝑏⟩ ∈ (𝐴 × 𝐵)))
4 opelxp 5702 . . . 4 (⟨𝑎, 𝑏⟩ ∈ (𝐴 × 𝐵) ↔ (𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵))
53, 4bitrdi 290 . . 3 (𝑥 = ⟨𝑎, 𝑏⟩ → (𝑥 ∈ (𝐴 × 𝐵) ↔ (𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵)))
6 vex 3465 . . . . . . 7 𝑎 ∈ V
7 vex 3465 . . . . . . 7 𝑏 ∈ V
86, 7op1std 8064 . . . . . 6 (𝑥 = ⟨𝑎, 𝑏⟩ → (1st ‘𝑥) = 𝑎)
98breq1d 5126 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((1st ‘𝑥)𝑅(1st ‘𝑦) ↔ 𝑎𝑅(1st ‘𝑦)))
108eqeq1d 2776 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((1st ‘𝑥) = (1st ‘𝑦) ↔ 𝑎 = (1st ‘𝑦)))
119, 10orbi12d 932 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ↔ (𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦))))
126, 7op2ndd 8065 . . . . . 6 (𝑥 = ⟨𝑎, 𝑏⟩ → (2nd ‘𝑥) = 𝑏)
1312breq1d 5126 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ↔ 𝑏𝑆(2nd ‘𝑦)))
1412eqeq1d 2776 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((2nd ‘𝑥) = (2nd ‘𝑦) ↔ 𝑏 = (2nd ‘𝑦)))
1513, 14orbi12d 932 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ↔ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦))))
16 neeq1 3032 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (𝑥 ≠ 𝑦 ↔ ⟨𝑎, 𝑏⟩ ≠ 𝑦))
1711, 15, 163anbi123d 1467 . . 3 (𝑥 = ⟨𝑎, 𝑏⟩ → ((((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ∧ ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ∧ 𝑥 ≠ 𝑦) ↔ ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦)))
185, 173anbi13d 1469 . 2 (𝑥 = ⟨𝑎, 𝑏⟩ → ((𝑥 ∈ (𝐴 × 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ (((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ∧ ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ∧ 𝑥 ≠ 𝑦)) ↔ ((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦))))
19 eleq1 2863 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑦 ∈ (𝐴 × 𝐵) ↔ ⟨𝑐, 𝑑⟩ ∈ (𝐴 × 𝐵)))
20 opelxp 5702 . . . 4 (⟨𝑐, 𝑑⟩ ∈ (𝐴 × 𝐵) ↔ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵))
2119, 20bitrdi 290 . . 3 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑦 ∈ (𝐴 × 𝐵) ↔ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵)))
22 vex 3465 . . . . . . 7 𝑐 ∈ V
23 vex 3465 . . . . . . 7 𝑑 ∈ V
2422, 23op1std 8064 . . . . . 6 (𝑦 = ⟨𝑐, 𝑑⟩ → (1st ‘𝑦) = 𝑐)
2524breq2d 5128 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑎𝑅(1st ‘𝑦) ↔ 𝑎𝑅𝑐))
2624eqeq2d 2785 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑎 = (1st ‘𝑦) ↔ 𝑎 = 𝑐))
2725, 26orbi12d 932 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ↔ (𝑎𝑅𝑐 ∨ 𝑎 = 𝑐)))
2822, 23op2ndd 8065 . . . . . 6 (𝑦 = ⟨𝑐, 𝑑⟩ → (2nd ‘𝑦) = 𝑑)
2928breq2d 5128 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑏𝑆(2nd ‘𝑦) ↔ 𝑏𝑆𝑑))
3028eqeq2d 2785 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑏 = (2nd ‘𝑦) ↔ 𝑏 = 𝑑))
3129, 30orbi12d 932 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → ((𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ↔ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑)))
32 neeq2 3033 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (⟨𝑎, 𝑏⟩ ≠ 𝑦 ↔ ⟨𝑎, 𝑏⟩ ≠ ⟨𝑐, 𝑑⟩))
336, 7opthne 5466 . . . . 5 (⟨𝑎, 𝑏⟩ ≠ ⟨𝑐, 𝑑⟩ ↔ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑))
3432, 33bitrdi 290 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → (⟨𝑎, 𝑏⟩ ≠ 𝑦 ↔ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑)))
3527, 31, 343anbi123d 1467 . . 3 (𝑦 = ⟨𝑐, 𝑑⟩ → (((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦) ↔ ((𝑎𝑅𝑐 ∨ 𝑎 = 𝑐) ∧ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑) ∧ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑))))
3621, 353anbi23d 1470 . 2 (𝑦 = ⟨𝑐, 𝑑⟩ → (((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦)) ↔ ((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵) ∧ ((𝑎𝑅𝑐 ∨ 𝑎 = 𝑐) ∧ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑) ∧ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑)))))
37 xpord2.1 . 2 𝑇 = {⟨𝑥, 𝑦⟩ ∣ (𝑥 ∈ (𝐴 × 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ (((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ∧ ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ∧ 𝑥 ≠ 𝑦))}
381, 2, 18, 36, 37brab 5533 1 (⟨𝑎, 𝑏⟩𝑇⟨𝑐, 𝑑⟩ ↔ ((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵) ∧ ((𝑎𝑅𝑐 ∨ 𝑎 = 𝑐) ∧ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑) ∧ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑))))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   ↔ wb 209   ∧ wa 401   ∨ wo 861   ∧ w3a 1104   = wceq 1572   ∈ wcel 2156   ≠ wne 2970  ⟨cop 4848   class class class wbr 5116  {copab 5181   × cxp 5664  ‘cfv 6579  1st c1st 8052  2nd c2nd 8053
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1834  ax-4 1848  ax-5 1951  ax-6 2009  ax-7 2050  ax-8 2158  ax-9 2166  ax-10 2189  ax-11 2206  ax-12 2225  ax-ext 2746  ax-sep 5263  ax-nul 5274  ax-pr 5406  ax-un 7802
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3an 1106  df-tru 1575  df-fal 1585  df-ex 1819  df-nf 1823  df-sb 2110  df-mo 2576  df-eu 2606  df-clab 2753  df-cleq 2766  df-clel 2850  df-nfc 2924  df-ne 2971  df-ral 3092  df-rex 3102  df-rab 3424  df-v 3463  df-ss 3908  df-dif 4057  df-in 4101  df-un 4161  df-nul 4289  df-if 4493  df-sn 4596  df-pr 4598  df-op 4849  df-uni 4881  df-br 5117  df-opab 5182  df-mpt 5201  df-id 5561  df-xp 5672  df-rel 5673  df-cnv 5674  df-co 5675  df-dm 5676  df-rn 5677  df-iota 6533  df-fun 6581  df-fv 6587  df-1st 8054  df-2nd 8055
This theorem is used by:  poxp2  8216  frxp2  8217  xpord2pred  8218
  Copyright terms: Public domain W3C validator