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

Theorem xpord2lem 8196
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 5439 . 2 ⟨𝑎, 𝑏⟩ ∈ V
2 opex 5439 . 2 ⟨𝑐, 𝑑⟩ ∈ V
3 eleq1 2852 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (𝑥 ∈ (𝐴 × 𝐵) ↔ ⟨𝑎, 𝑏⟩ ∈ (𝐴 × 𝐵)))
4 opelxp 5694 . . . 4 (⟨𝑎, 𝑏⟩ ∈ (𝐴 × 𝐵) ↔ (𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵))
53, 4bitrdi 290 . . 3 (𝑥 = ⟨𝑎, 𝑏⟩ → (𝑥 ∈ (𝐴 × 𝐵) ↔ (𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵)))
6 vex 3458 . . . . . . 7 𝑎 ∈ V
7 vex 3458 . . . . . . 7 𝑏 ∈ V
86, 7op1std 8045 . . . . . 6 (𝑥 = ⟨𝑎, 𝑏⟩ → (1st ‘𝑥) = 𝑎)
98breq1d 5118 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((1st ‘𝑥)𝑅(1st ‘𝑦) ↔ 𝑎𝑅(1st ‘𝑦)))
108eqeq1d 2765 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((1st ‘𝑥) = (1st ‘𝑦) ↔ 𝑎 = (1st ‘𝑦)))
119, 10orbi12d 932 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ↔ (𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦))))
126, 7op2ndd 8046 . . . . . 6 (𝑥 = ⟨𝑎, 𝑏⟩ → (2nd ‘𝑥) = 𝑏)
1312breq1d 5118 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ↔ 𝑏𝑆(2nd ‘𝑦)))
1412eqeq1d 2765 . . . . 5 (𝑥 = ⟨𝑎, 𝑏⟩ → ((2nd ‘𝑥) = (2nd ‘𝑦) ↔ 𝑏 = (2nd ‘𝑦)))
1513, 14orbi12d 932 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ↔ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦))))
16 neeq1 3021 . . . 4 (𝑥 = ⟨𝑎, 𝑏⟩ → (𝑥 ≠ 𝑦 ↔ ⟨𝑎, 𝑏⟩ ≠ 𝑦))
1711, 15, 163anbi123d 1465 . . 3 (𝑥 = ⟨𝑎, 𝑏⟩ → ((((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ∧ ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ∧ 𝑥 ≠ 𝑦) ↔ ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦)))
185, 173anbi13d 1467 . 2 (𝑥 = ⟨𝑎, 𝑏⟩ → ((𝑥 ∈ (𝐴 × 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ (((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ∧ ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ∧ 𝑥 ≠ 𝑦)) ↔ ((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦))))
19 eleq1 2852 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑦 ∈ (𝐴 × 𝐵) ↔ ⟨𝑐, 𝑑⟩ ∈ (𝐴 × 𝐵)))
20 opelxp 5694 . . . 4 (⟨𝑐, 𝑑⟩ ∈ (𝐴 × 𝐵) ↔ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵))
2119, 20bitrdi 290 . . 3 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑦 ∈ (𝐴 × 𝐵) ↔ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵)))
22 vex 3458 . . . . . . 7 𝑐 ∈ V
23 vex 3458 . . . . . . 7 𝑑 ∈ V
2422, 23op1std 8045 . . . . . 6 (𝑦 = ⟨𝑐, 𝑑⟩ → (1st ‘𝑦) = 𝑐)
2524breq2d 5120 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑎𝑅(1st ‘𝑦) ↔ 𝑎𝑅𝑐))
2624eqeq2d 2774 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑎 = (1st ‘𝑦) ↔ 𝑎 = 𝑐))
2725, 26orbi12d 932 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ↔ (𝑎𝑅𝑐 ∨ 𝑎 = 𝑐)))
2822, 23op2ndd 8046 . . . . . 6 (𝑦 = ⟨𝑐, 𝑑⟩ → (2nd ‘𝑦) = 𝑑)
2928breq2d 5120 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑏𝑆(2nd ‘𝑦) ↔ 𝑏𝑆𝑑))
3028eqeq2d 2774 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (𝑏 = (2nd ‘𝑦) ↔ 𝑏 = 𝑑))
3129, 30orbi12d 932 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → ((𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ↔ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑)))
32 neeq2 3022 . . . . 5 (𝑦 = ⟨𝑐, 𝑑⟩ → (⟨𝑎, 𝑏⟩ ≠ 𝑦 ↔ ⟨𝑎, 𝑏⟩ ≠ ⟨𝑐, 𝑑⟩))
336, 7opthne 5458 . . . . 5 (⟨𝑎, 𝑏⟩ ≠ ⟨𝑐, 𝑑⟩ ↔ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑))
3432, 33bitrdi 290 . . . 4 (𝑦 = ⟨𝑐, 𝑑⟩ → (⟨𝑎, 𝑏⟩ ≠ 𝑦 ↔ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑)))
3527, 31, 343anbi123d 1465 . . 3 (𝑦 = ⟨𝑐, 𝑑⟩ → (((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦) ↔ ((𝑎𝑅𝑐 ∨ 𝑎 = 𝑐) ∧ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑) ∧ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑))))
3621, 353anbi23d 1468 . 2 (𝑦 = ⟨𝑐, 𝑑⟩ → (((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ ((𝑎𝑅(1st ‘𝑦) ∨ 𝑎 = (1st ‘𝑦)) ∧ (𝑏𝑆(2nd ‘𝑦) ∨ 𝑏 = (2nd ‘𝑦)) ∧ ⟨𝑎, 𝑏⟩ ≠ 𝑦)) ↔ ((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵) ∧ ((𝑎𝑅𝑐 ∨ 𝑎 = 𝑐) ∧ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑) ∧ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑)))))
37 xpord2.1 . 2 𝑇 = {⟨𝑥, 𝑦⟩ ∣ (𝑥 ∈ (𝐴 × 𝐵) ∧ 𝑦 ∈ (𝐴 × 𝐵) ∧ (((1st ‘𝑥)𝑅(1st ‘𝑦) ∨ (1st ‘𝑥) = (1st ‘𝑦)) ∧ ((2nd ‘𝑥)𝑆(2nd ‘𝑦) ∨ (2nd ‘𝑥) = (2nd ‘𝑦)) ∧ 𝑥 ≠ 𝑦))}
381, 2, 18, 36, 37brab 5525 1 (⟨𝑎, 𝑏⟩𝑇⟨𝑐, 𝑑⟩ ↔ ((𝑎 ∈ 𝐴 ∧ 𝑏 ∈ 𝐵) ∧ (𝑐 ∈ 𝐴 ∧ 𝑑 ∈ 𝐵) ∧ ((𝑎𝑅𝑐 ∨ 𝑎 = 𝑐) ∧ (𝑏𝑆𝑑 ∨ 𝑏 = 𝑑) ∧ (𝑎 ≠ 𝑐 ∨ 𝑏 ≠ 𝑑))))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:   ↔ wb 209   ∧ wa 401   ∨ wo 861   ∧ w3a 1103   = wceq 1570   ∈ wcel 2147   ≠ wne 2959  ⟨cop 4840   class class class wbr 5108  {copab 5173   × cxp 5656  ‘cfv 6566  1st c1st 8033  2nd c2nd 8034
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 1945  ax-6 2002  ax-7 2043  ax-8 2149  ax-9 2157  ax-10 2180  ax-11 2197  ax-12 2216  ax-ext 2735  ax-sep 5255  ax-nul 5266  ax-pr 5398  ax-un 7783
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 2102  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2839  df-nfc 2913  df-ne 2960  df-ral 3081  df-rex 3091  df-rab 3417  df-v 3456  df-ss 3901  df-dif 4050  df-in 4094  df-un 4154  df-nul 4282  df-if 4486  df-sn 4589  df-pr 4591  df-op 4841  df-uni 4873  df-br 5109  df-opab 5174  df-mpt 5193  df-id 5553  df-xp 5664  df-rel 5665  df-cnv 5666  df-co 5667  df-dm 5668  df-rn 5669  df-iota 6520  df-fun 6568  df-fv 6574  df-1st 8035  df-2nd 8036
This theorem is used by:  poxp2  8197  frxp2  8198  xpord2pred  8199
  Copyright terms: Public domain W3C validator