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

Theorem xpord2lem 8152
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 5432 . 2 ⟨𝑎, 𝑏⟩ ∈ V
2 opex 5432 . 2 ⟨𝑐, 𝑑⟩ ∈ V
3 eleq1 2849 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (𝑥 ∈ (𝐴 × 𝐵) ↔ ⟨𝑎, 𝑏⟩ ∈ (𝐴 × 𝐵)))
4 opelxp 5687 . . . 4 (⟨𝑎, 𝑏⟩ ∈ (𝐴 × 𝐵) ↔ (𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵))
53, 4bitrdi 290 . . 3 (𝑥 = ⟨𝑎, 𝑏⟩ → (𝑥 ∈ (𝐴 × 𝐵) ↔ (𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵)))
6 vex 3455 . . . . . . 7 𝑎 ∈ V
7 vex 3455 . . . . . . 7 𝑏 ∈ V
86, 7op1std 8009 . . . . . 6 (𝑥 = ⟨𝑎, 𝑏⟩ → (1st ‘𝑥) = 𝑎)
98breq1d 5113 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((1st ‘𝑥)𝑅(1st ‘𝑦) ↔ 𝑎𝑅(1st ‘𝑦)))
108eqeq1d 2763 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((1st ‘𝑥) = (1st ‘𝑦) ↔ 𝑎 = (1st ‘𝑦)))
119, 10orbi12d 932 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ↔ (𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦))))
126, 7op2ndd 8010 . . . . . 6 (𝑥 = ⟨𝑎, 𝑏⟩ → (2nd ‘𝑥) = 𝑏)
1312breq1d 5113 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ↔ 𝑏𝑆(2nd ‘𝑦)))
1412eqeq1d 2763 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((2nd ‘𝑥) = (2nd ‘𝑦) ↔ 𝑏 = (2nd ‘𝑦)))
1513, 14orbi12d 932 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ↔ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦))))
16 neeq1 3018 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (𝑥 ≠ 𝑦 ↔ ⟨𝑎, 𝑏⟩ ≠ 𝑦))
1711, 15, 163anbi123d 1464 . . 3 (𝑥 = ⟨𝑎, 𝑏⟩ → ((((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ∧ ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ∧ 𝑥 ≠ 𝑦) ↔ ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦)))
185, 173anbi13d 1466 . 2 (𝑥 = ⟨𝑎, 𝑏⟩ → ((𝑥 ∈ (𝐴 × 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ (((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ∧ ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ∧ 𝑥 ≠ 𝑦)) ↔ ((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦))))
19 eleq1 2849 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑦 ∈ (𝐴 × 𝐵) ↔ ⟨𝑐, 𝑑⟩ ∈ (𝐴 × 𝐵)))
20 opelxp 5687 . . . 4 (⟨𝑐, 𝑑⟩ ∈ (𝐴 × 𝐵) ↔ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵))
2119, 20bitrdi 290 . . 3 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑦 ∈ (𝐴 × 𝐵) ↔ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵)))
22 vex 3455 . . . . . . 7 𝑐 ∈ V
23 vex 3455 . . . . . . 7 𝑑 ∈ V
2422, 23op1std 8009 . . . . . 6 (𝑦 = ⟨𝑐, 𝑑⟩ → (1st ‘𝑦) = 𝑐)
2524breq2d 5115 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑎𝑅(1st ‘𝑦) ↔ 𝑎𝑅𝑐))
2624eqeq2d 2772 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑎 = (1st ‘𝑦) ↔ 𝑎 = 𝑐))
2725, 26orbi12d 932 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ↔ (𝑎𝑅𝑐 ∨ 𝑎 = 𝑐)))
2822, 23op2ndd 8010 . . . . . 6 (𝑦 = ⟨𝑐, 𝑑⟩ → (2nd ‘𝑦) = 𝑑)
2928breq2d 5115 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑏𝑆(2nd ‘𝑦) ↔ 𝑏𝑆𝑑))
3028eqeq2d 2772 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑏 = (2nd ‘𝑦) ↔ 𝑏 = 𝑑))
3129, 30orbi12d 932 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → ((𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ↔ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑)))
32 neeq2 3019 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (⟨𝑎, 𝑏⟩ ≠ 𝑦 ↔ ⟨𝑎, 𝑏⟩ ≠ ⟨𝑐, 𝑑⟩))
336, 7opthne 5451 . . . . 5 (⟨𝑎, 𝑏⟩ ≠ ⟨𝑐, 𝑑⟩ ↔ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑))
3432, 33bitrdi 290 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → (⟨𝑎, 𝑏⟩ ≠ 𝑦 ↔ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑)))
3527, 31, 343anbi123d 1464 . . 3 (𝑦 = ⟨𝑐, 𝑑⟩ → (((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦) ↔ ((𝑎𝑅𝑐 ∨ 𝑎 = 𝑐) ∧ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑) ∧ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑))))
3621, 353anbi23d 1467 . 2 (𝑦 = ⟨𝑐, 𝑑⟩ → (((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦)) ↔ ((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵) ∧ ((𝑎𝑅𝑐 ∨ 𝑎 = 𝑐) ∧ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑) ∧ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑)))))
37 xpord2.1 . 2 𝑇 = {⟨𝑥, 𝑦⟩ ∣ (𝑥 ∈ (𝐴 × 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ (((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ∧ ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ∧ 𝑥 ≠ 𝑦))}
381, 2, 18, 36, 37brab 5518 1 (⟨𝑎, 𝑏⟩𝑇⟨𝑐, 𝑑⟩ ↔ ((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵) ∧ ((𝑎𝑅𝑐 ∨ 𝑎 = 𝑐) ∧ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑) ∧ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑))))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   ↔ wb 209   ∧ wa 401   ∨ wo 861   ∧ w3a 1103   = wceq 1570   ∈ wcel 2145   ≠ wne 2956  ⟨cop 4590   class class class wbr 5103  {copab 5167   × cxp 5649  ‘cfv 6537  1st c1st 7997  2nd c2nd 7998
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-10 2178  ax-11 2194  ax-12 2213  ax-ext 2733  ax-sep 5249  ax-nul 5260  ax-pr 5391  ax-un 7749
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-nf 1817  df-sb 2100  df-mo 2565  df-eu 2595  df-clab 2740  df-cleq 2753  df-clel 2836  df-nfc 2910  df-ne 2957  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-uni 4868  df-br 5104  df-opab 5168  df-mpt 5187  df-id 5546  df-xp 5657  df-rel 5658  df-cnv 5659  df-co 5660  df-dm 5661  df-rn 5662  df-iota 6493  df-fun 6539  df-fv 6545  df-1st 7999  df-2nd 8000
This theorem is used by:  poxp2  8153  frxp2  8154  xpord2pred  8155
  Copyright terms: Public domain W3C validator