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

Theorem lterpq 9752
Description: Compatibility of ordering on equivalent fractions. (Contributed by Mario Carneiro, 9-May-2013.) (New usage is discouraged.)
Assertion
Ref Expression
lterpq (𝐴 <pQ 𝐵 ↔ ([Q]‘𝐴) <Q ([Q]‘𝐵))

Proof of Theorem lterpq
Dummy variables 𝑥 𝑦 𝑧 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 df-ltpq 9692 . . . 4 <pQ = {⟨𝑥, 𝑦⟩ ∣ ((𝑥 ∈ (N × N) ∧ 𝑦 ∈ (N × N)) ∧ ((1st𝑥) ·N (2nd𝑦)) <N ((1st𝑦) ·N (2nd𝑥)))}
2 opabssxp 5164 . . . 4 {⟨𝑥, 𝑦⟩ ∣ ((𝑥 ∈ (N × N) ∧ 𝑦 ∈ (N × N)) ∧ ((1st𝑥) ·N (2nd𝑦)) <N ((1st𝑦) ·N (2nd𝑥)))} ⊆ ((N × N) × (N × N))
31, 2eqsstri 3620 . . 3 <pQ ⊆ ((N × N) × (N × N))
43brel 5138 . 2 (𝐴 <pQ 𝐵 → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
5 ltrelnq 9708 . . . 4 <Q ⊆ (Q × Q)
65brel 5138 . . 3 (([Q]‘𝐴) <Q ([Q]‘𝐵) → (([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q))
7 elpqn 9707 . . . 4 (([Q]‘𝐴) ∈ Q → ([Q]‘𝐴) ∈ (N × N))
8 elpqn 9707 . . . 4 (([Q]‘𝐵) ∈ Q → ([Q]‘𝐵) ∈ (N × N))
9 nqerf 9712 . . . . . . 7 [Q]:(N × N)⟶Q
109fdmi 6019 . . . . . 6 dom [Q] = (N × N)
11 0nelxp 5113 . . . . . 6 ¬ ∅ ∈ (N × N)
1210, 11ndmfvrcl 6186 . . . . 5 (([Q]‘𝐴) ∈ (N × N) → 𝐴 ∈ (N × N))
1310, 11ndmfvrcl 6186 . . . . 5 (([Q]‘𝐵) ∈ (N × N) → 𝐵 ∈ (N × N))
1412, 13anim12i 589 . . . 4 ((([Q]‘𝐴) ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N)) → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
157, 8, 14syl2an 494 . . 3 ((([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
166, 15syl 17 . 2 (([Q]‘𝐴) <Q ([Q]‘𝐵) → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
17 xp1st 7158 . . . . 5 (𝐴 ∈ (N × N) → (1st𝐴) ∈ N)
18 xp2nd 7159 . . . . 5 (𝐵 ∈ (N × N) → (2nd𝐵) ∈ N)
19 mulclpi 9675 . . . . 5 (((1st𝐴) ∈ N ∧ (2nd𝐵) ∈ N) → ((1st𝐴) ·N (2nd𝐵)) ∈ N)
2017, 18, 19syl2an 494 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((1st𝐴) ·N (2nd𝐵)) ∈ N)
21 ltmpi 9686 . . . 4 (((1st𝐴) ·N (2nd𝐵)) ∈ N → (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) <N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴))) ↔ (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵)))) <N (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴))))))
2220, 21syl 17 . . 3 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) <N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴))) ↔ (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵)))) <N (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴))))))
23 nqercl 9713 . . . 4 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ Q)
24 nqercl 9713 . . . 4 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ Q)
25 ordpinq 9725 . . . 4 ((([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (([Q]‘𝐴) <Q ([Q]‘𝐵) ↔ ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) <N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴)))))
2623, 24, 25syl2an 494 . . 3 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) <Q ([Q]‘𝐵) ↔ ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) <N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴)))))
27 1st2nd2 7165 . . . . . 6 (𝐴 ∈ (N × N) → 𝐴 = ⟨(1st𝐴), (2nd𝐴)⟩)
28 1st2nd2 7165 . . . . . 6 (𝐵 ∈ (N × N) → 𝐵 = ⟨(1st𝐵), (2nd𝐵)⟩)
2927, 28breqan12d 4639 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 <pQ 𝐵 ↔ ⟨(1st𝐴), (2nd𝐴)⟩ <pQ ⟨(1st𝐵), (2nd𝐵)⟩))
30 ordpipq 9724 . . . . 5 (⟨(1st𝐴), (2nd𝐴)⟩ <pQ ⟨(1st𝐵), (2nd𝐵)⟩ ↔ ((1st𝐴) ·N (2nd𝐵)) <N ((1st𝐵) ·N (2nd𝐴)))
3129, 30syl6bb 276 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 <pQ 𝐵 ↔ ((1st𝐴) ·N (2nd𝐵)) <N ((1st𝐵) ·N (2nd𝐴))))
32 xp1st 7158 . . . . . . 7 (([Q]‘𝐴) ∈ (N × N) → (1st ‘([Q]‘𝐴)) ∈ N)
3323, 7, 323syl 18 . . . . . 6 (𝐴 ∈ (N × N) → (1st ‘([Q]‘𝐴)) ∈ N)
34 xp2nd 7159 . . . . . . 7 (([Q]‘𝐵) ∈ (N × N) → (2nd ‘([Q]‘𝐵)) ∈ N)
3524, 8, 343syl 18 . . . . . 6 (𝐵 ∈ (N × N) → (2nd ‘([Q]‘𝐵)) ∈ N)
36 mulclpi 9675 . . . . . 6 (((1st ‘([Q]‘𝐴)) ∈ N ∧ (2nd ‘([Q]‘𝐵)) ∈ N) → ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ∈ N)
3733, 35, 36syl2an 494 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ∈ N)
38 ltmpi 9686 . . . . 5 (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ∈ N → (((1st𝐴) ·N (2nd𝐵)) <N ((1st𝐵) ·N (2nd𝐴)) ↔ (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐴) ·N (2nd𝐵))) <N (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐵) ·N (2nd𝐴)))))
3937, 38syl 17 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (((1st𝐴) ·N (2nd𝐵)) <N ((1st𝐵) ·N (2nd𝐴)) ↔ (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐴) ·N (2nd𝐵))) <N (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐵) ·N (2nd𝐴)))))
40 mulcompi 9678 . . . . . 6 (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐴) ·N (2nd𝐵))) = (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))))
4140a1i 11 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐴) ·N (2nd𝐵))) = (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵)))))
42 nqerrel 9714 . . . . . . . . 9 (𝐴 ∈ (N × N) → 𝐴 ~Q ([Q]‘𝐴))
4323, 7syl 17 . . . . . . . . . 10 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ (N × N))
44 enqbreq2 9702 . . . . . . . . . 10 ((𝐴 ∈ (N × N) ∧ ([Q]‘𝐴) ∈ (N × N)) → (𝐴 ~Q ([Q]‘𝐴) ↔ ((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) = ((1st ‘([Q]‘𝐴)) ·N (2nd𝐴))))
4543, 44mpdan 701 . . . . . . . . 9 (𝐴 ∈ (N × N) → (𝐴 ~Q ([Q]‘𝐴) ↔ ((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) = ((1st ‘([Q]‘𝐴)) ·N (2nd𝐴))))
4642, 45mpbid 222 . . . . . . . 8 (𝐴 ∈ (N × N) → ((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) = ((1st ‘([Q]‘𝐴)) ·N (2nd𝐴)))
4746eqcomd 2627 . . . . . . 7 (𝐴 ∈ (N × N) → ((1st ‘([Q]‘𝐴)) ·N (2nd𝐴)) = ((1st𝐴) ·N (2nd ‘([Q]‘𝐴))))
48 nqerrel 9714 . . . . . . . 8 (𝐵 ∈ (N × N) → 𝐵 ~Q ([Q]‘𝐵))
4924, 8syl 17 . . . . . . . . 9 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ (N × N))
50 enqbreq2 9702 . . . . . . . . 9 ((𝐵 ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N)) → (𝐵 ~Q ([Q]‘𝐵) ↔ ((1st𝐵) ·N (2nd ‘([Q]‘𝐵))) = ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵))))
5149, 50mpdan 701 . . . . . . . 8 (𝐵 ∈ (N × N) → (𝐵 ~Q ([Q]‘𝐵) ↔ ((1st𝐵) ·N (2nd ‘([Q]‘𝐵))) = ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵))))
5248, 51mpbid 222 . . . . . . 7 (𝐵 ∈ (N × N) → ((1st𝐵) ·N (2nd ‘([Q]‘𝐵))) = ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵)))
5347, 52oveqan12d 6634 . . . . . 6 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (((1st ‘([Q]‘𝐴)) ·N (2nd𝐴)) ·N ((1st𝐵) ·N (2nd ‘([Q]‘𝐵)))) = (((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵))))
54 mulcompi 9678 . . . . . . 7 (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐵) ·N (2nd𝐴))) = (((1st𝐵) ·N (2nd𝐴)) ·N ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))))
55 fvex 6168 . . . . . . . 8 (1st𝐵) ∈ V
56 fvex 6168 . . . . . . . 8 (2nd𝐴) ∈ V
57 fvex 6168 . . . . . . . 8 (1st ‘([Q]‘𝐴)) ∈ V
58 mulcompi 9678 . . . . . . . 8 (𝑥 ·N 𝑦) = (𝑦 ·N 𝑥)
59 mulasspi 9679 . . . . . . . 8 ((𝑥 ·N 𝑦) ·N 𝑧) = (𝑥 ·N (𝑦 ·N 𝑧))
60 fvex 6168 . . . . . . . 8 (2nd ‘([Q]‘𝐵)) ∈ V
6155, 56, 57, 58, 59, 60caov411 6831 . . . . . . 7 (((1st𝐵) ·N (2nd𝐴)) ·N ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵)))) = (((1st ‘([Q]‘𝐴)) ·N (2nd𝐴)) ·N ((1st𝐵) ·N (2nd ‘([Q]‘𝐵))))
6254, 61eqtri 2643 . . . . . 6 (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐵) ·N (2nd𝐴))) = (((1st ‘([Q]‘𝐴)) ·N (2nd𝐴)) ·N ((1st𝐵) ·N (2nd ‘([Q]‘𝐵))))
63 mulcompi 9678 . . . . . . 7 (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴)))) = (((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴))) ·N ((1st𝐴) ·N (2nd𝐵)))
64 fvex 6168 . . . . . . . 8 (1st ‘([Q]‘𝐵)) ∈ V
65 fvex 6168 . . . . . . . 8 (2nd ‘([Q]‘𝐴)) ∈ V
66 fvex 6168 . . . . . . . 8 (1st𝐴) ∈ V
67 fvex 6168 . . . . . . . 8 (2nd𝐵) ∈ V
6864, 65, 66, 58, 59, 67caov411 6831 . . . . . . 7 (((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴))) ·N ((1st𝐴) ·N (2nd𝐵))) = (((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵)))
6963, 68eqtri 2643 . . . . . 6 (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴)))) = (((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵)))
7053, 62, 693eqtr4g 2680 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐵) ·N (2nd𝐴))) = (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴)))))
7141, 70breq12d 4636 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐴) ·N (2nd𝐵))) <N (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐵) ·N (2nd𝐴))) ↔ (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵)))) <N (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴))))))
7231, 39, 713bitrd 294 . . 3 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 <pQ 𝐵 ↔ (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵)))) <N (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴))))))
7322, 26, 723bitr4rd 301 . 2 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 <pQ 𝐵 ↔ ([Q]‘𝐴) <Q ([Q]‘𝐵)))
744, 16, 73pm5.21nii 368 1 (𝐴 <pQ 𝐵 ↔ ([Q]‘𝐴) <Q ([Q]‘𝐵))
Colors of variables: wff setvar class
Syntax hints:  wb 196  wa 384   = wceq 1480  wcel 1987  cop 4161   class class class wbr 4623  {copab 4682   × cxp 5082  cfv 5857  (class class class)co 6615  1st c1st 7126  2nd c2nd 7127  Ncnpi 9626   ·N cmi 9628   <N clti 9629   <pQ cltpq 9632   ~Q ceq 9633  Qcnq 9634  [Q]cerq 9636   <Q cltq 9640
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-sep 4751  ax-nul 4759  ax-pow 4813  ax-pr 4877  ax-un 6914
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-ral 2913  df-rex 2914  df-reu 2915  df-rmo 2916  df-rab 2917  df-v 3192  df-sbc 3423  df-csb 3520  df-dif 3563  df-un 3565  df-in 3567  df-ss 3574  df-pss 3576  df-nul 3898  df-if 4065  df-pw 4138  df-sn 4156  df-pr 4158  df-tp 4160  df-op 4162  df-uni 4410  df-iun 4494  df-br 4624  df-opab 4684  df-mpt 4685  df-tr 4723  df-eprel 4995  df-id 4999  df-po 5005  df-so 5006  df-fr 5043  df-we 5045  df-xp 5090  df-rel 5091  df-cnv 5092  df-co 5093  df-dm 5094  df-rn 5095  df-res 5096  df-ima 5097  df-pred 5649  df-ord 5695  df-on 5696  df-lim 5697  df-suc 5698  df-iota 5820  df-fun 5859  df-fn 5860  df-f 5861  df-f1 5862  df-fo 5863  df-f1o 5864  df-fv 5865  df-ov 6618  df-oprab 6619  df-mpt2 6620  df-om 7028  df-1st 7128  df-2nd 7129  df-wrecs 7367  df-recs 7428  df-rdg 7466  df-1o 7520  df-oadd 7524  df-omul 7525  df-er 7702  df-ni 9654  df-mi 9656  df-lti 9657  df-ltpq 9692  df-enq 9693  df-nq 9694  df-erq 9695  df-1nq 9698  df-ltnq 9700
This theorem is referenced by:  ltanq  9753  ltmnq  9754  1lt2nq  9755
  Copyright terms: Public domain W3C validator