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

Theorem lterpq 10584
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 10524 . . . 4 <pQ = {⟨𝑥, 𝑦⟩ ∣ ((𝑥 ∈ (N × N) ∧ 𝑦 ∈ (N × N)) ∧ ((1st𝑥) ·N (2nd𝑦)) <N ((1st𝑦) ·N (2nd𝑥)))}
2 opabssxp 5640 . . . 4 {⟨𝑥, 𝑦⟩ ∣ ((𝑥 ∈ (N × N) ∧ 𝑦 ∈ (N × N)) ∧ ((1st𝑥) ·N (2nd𝑦)) <N ((1st𝑦) ·N (2nd𝑥)))} ⊆ ((N × N) × (N × N))
31, 2eqsstri 3935 . . 3 <pQ ⊆ ((N × N) × (N × N))
43brel 5614 . 2 (𝐴 <pQ 𝐵 → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
5 ltrelnq 10540 . . . 4 <Q ⊆ (Q × Q)
65brel 5614 . . 3 (([Q]‘𝐴) <Q ([Q]‘𝐵) → (([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q))
7 elpqn 10539 . . . 4 (([Q]‘𝐴) ∈ Q → ([Q]‘𝐴) ∈ (N × N))
8 elpqn 10539 . . . 4 (([Q]‘𝐵) ∈ Q → ([Q]‘𝐵) ∈ (N × N))
9 nqerf 10544 . . . . . . 7 [Q]:(N × N)⟶Q
109fdmi 6557 . . . . . 6 dom [Q] = (N × N)
11 0nelxp 5585 . . . . . 6 ¬ ∅ ∈ (N × N)
1210, 11ndmfvrcl 6748 . . . . 5 (([Q]‘𝐴) ∈ (N × N) → 𝐴 ∈ (N × N))
1310, 11ndmfvrcl 6748 . . . . 5 (([Q]‘𝐵) ∈ (N × N) → 𝐵 ∈ (N × N))
1412, 13anim12i 616 . . . 4 ((([Q]‘𝐴) ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N)) → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
157, 8, 14syl2an 599 . . 3 ((([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
166, 15syl 17 . 2 (([Q]‘𝐴) <Q ([Q]‘𝐵) → (𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)))
17 xp1st 7793 . . . . 5 (𝐴 ∈ (N × N) → (1st𝐴) ∈ N)
18 xp2nd 7794 . . . . 5 (𝐵 ∈ (N × N) → (2nd𝐵) ∈ N)
19 mulclpi 10507 . . . . 5 (((1st𝐴) ∈ N ∧ (2nd𝐵) ∈ N) → ((1st𝐴) ·N (2nd𝐵)) ∈ N)
2017, 18, 19syl2an 599 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((1st𝐴) ·N (2nd𝐵)) ∈ N)
21 ltmpi 10518 . . . 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 10545 . . . 4 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ Q)
24 nqercl 10545 . . . 4 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ Q)
25 ordpinq 10557 . . . 4 ((([Q]‘𝐴) ∈ Q ∧ ([Q]‘𝐵) ∈ Q) → (([Q]‘𝐴) <Q ([Q]‘𝐵) ↔ ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) <N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴)))))
2623, 24, 25syl2an 599 . . 3 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (([Q]‘𝐴) <Q ([Q]‘𝐵) ↔ ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) <N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴)))))
27 1st2nd2 7800 . . . . . 6 (𝐴 ∈ (N × N) → 𝐴 = ⟨(1st𝐴), (2nd𝐴)⟩)
28 1st2nd2 7800 . . . . . 6 (𝐵 ∈ (N × N) → 𝐵 = ⟨(1st𝐵), (2nd𝐵)⟩)
2927, 28breqan12d 5069 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 <pQ 𝐵 ↔ ⟨(1st𝐴), (2nd𝐴)⟩ <pQ ⟨(1st𝐵), (2nd𝐵)⟩))
30 ordpipq 10556 . . . . 5 (⟨(1st𝐴), (2nd𝐴)⟩ <pQ ⟨(1st𝐵), (2nd𝐵)⟩ ↔ ((1st𝐴) ·N (2nd𝐵)) <N ((1st𝐵) ·N (2nd𝐴)))
3129, 30bitrdi 290 . . . 4 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 <pQ 𝐵 ↔ ((1st𝐴) ·N (2nd𝐵)) <N ((1st𝐵) ·N (2nd𝐴))))
32 xp1st 7793 . . . . . . 7 (([Q]‘𝐴) ∈ (N × N) → (1st ‘([Q]‘𝐴)) ∈ N)
3323, 7, 323syl 18 . . . . . 6 (𝐴 ∈ (N × N) → (1st ‘([Q]‘𝐴)) ∈ N)
34 xp2nd 7794 . . . . . . 7 (([Q]‘𝐵) ∈ (N × N) → (2nd ‘([Q]‘𝐵)) ∈ N)
3524, 8, 343syl 18 . . . . . 6 (𝐵 ∈ (N × N) → (2nd ‘([Q]‘𝐵)) ∈ N)
36 mulclpi 10507 . . . . . 6 (((1st ‘([Q]‘𝐴)) ∈ N ∧ (2nd ‘([Q]‘𝐵)) ∈ N) → ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ∈ N)
3733, 35, 36syl2an 599 . . . . 5 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ∈ N)
38 ltmpi 10518 . . . . 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 10510 . . . . . 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 10546 . . . . . . . . 9 (𝐴 ∈ (N × N) → 𝐴 ~Q ([Q]‘𝐴))
4323, 7syl 17 . . . . . . . . . 10 (𝐴 ∈ (N × N) → ([Q]‘𝐴) ∈ (N × N))
44 enqbreq2 10534 . . . . . . . . . 10 ((𝐴 ∈ (N × N) ∧ ([Q]‘𝐴) ∈ (N × N)) → (𝐴 ~Q ([Q]‘𝐴) ↔ ((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) = ((1st ‘([Q]‘𝐴)) ·N (2nd𝐴))))
4543, 44mpdan 687 . . . . . . . . 9 (𝐴 ∈ (N × N) → (𝐴 ~Q ([Q]‘𝐴) ↔ ((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) = ((1st ‘([Q]‘𝐴)) ·N (2nd𝐴))))
4642, 45mpbid 235 . . . . . . . 8 (𝐴 ∈ (N × N) → ((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) = ((1st ‘([Q]‘𝐴)) ·N (2nd𝐴)))
4746eqcomd 2743 . . . . . . 7 (𝐴 ∈ (N × N) → ((1st ‘([Q]‘𝐴)) ·N (2nd𝐴)) = ((1st𝐴) ·N (2nd ‘([Q]‘𝐴))))
48 nqerrel 10546 . . . . . . . 8 (𝐵 ∈ (N × N) → 𝐵 ~Q ([Q]‘𝐵))
4924, 8syl 17 . . . . . . . . 9 (𝐵 ∈ (N × N) → ([Q]‘𝐵) ∈ (N × N))
50 enqbreq2 10534 . . . . . . . . 9 ((𝐵 ∈ (N × N) ∧ ([Q]‘𝐵) ∈ (N × N)) → (𝐵 ~Q ([Q]‘𝐵) ↔ ((1st𝐵) ·N (2nd ‘([Q]‘𝐵))) = ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵))))
5149, 50mpdan 687 . . . . . . . 8 (𝐵 ∈ (N × N) → (𝐵 ~Q ([Q]‘𝐵) ↔ ((1st𝐵) ·N (2nd ‘([Q]‘𝐵))) = ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵))))
5248, 51mpbid 235 . . . . . . 7 (𝐵 ∈ (N × N) → ((1st𝐵) ·N (2nd ‘([Q]‘𝐵))) = ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵)))
5347, 52oveqan12d 7232 . . . . . 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 10510 . . . . . . 7 (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐵) ·N (2nd𝐴))) = (((1st𝐵) ·N (2nd𝐴)) ·N ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))))
55 fvex 6730 . . . . . . . 8 (1st𝐵) ∈ V
56 fvex 6730 . . . . . . . 8 (2nd𝐴) ∈ V
57 fvex 6730 . . . . . . . 8 (1st ‘([Q]‘𝐴)) ∈ V
58 mulcompi 10510 . . . . . . . 8 (𝑥 ·N 𝑦) = (𝑦 ·N 𝑥)
59 mulasspi 10511 . . . . . . . 8 ((𝑥 ·N 𝑦) ·N 𝑧) = (𝑥 ·N (𝑦 ·N 𝑧))
60 fvex 6730 . . . . . . . 8 (2nd ‘([Q]‘𝐵)) ∈ V
6155, 56, 57, 58, 59, 60caov411 7440 . . . . . . 7 (((1st𝐵) ·N (2nd𝐴)) ·N ((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵)))) = (((1st ‘([Q]‘𝐴)) ·N (2nd𝐴)) ·N ((1st𝐵) ·N (2nd ‘([Q]‘𝐵))))
6254, 61eqtri 2765 . . . . . 6 (((1st ‘([Q]‘𝐴)) ·N (2nd ‘([Q]‘𝐵))) ·N ((1st𝐵) ·N (2nd𝐴))) = (((1st ‘([Q]‘𝐴)) ·N (2nd𝐴)) ·N ((1st𝐵) ·N (2nd ‘([Q]‘𝐵))))
63 mulcompi 10510 . . . . . . 7 (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴)))) = (((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴))) ·N ((1st𝐴) ·N (2nd𝐵)))
64 fvex 6730 . . . . . . . 8 (1st ‘([Q]‘𝐵)) ∈ V
65 fvex 6730 . . . . . . . 8 (2nd ‘([Q]‘𝐴)) ∈ V
66 fvex 6730 . . . . . . . 8 (1st𝐴) ∈ V
67 fvex 6730 . . . . . . . 8 (2nd𝐵) ∈ V
6864, 65, 66, 58, 59, 67caov411 7440 . . . . . . 7 (((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴))) ·N ((1st𝐴) ·N (2nd𝐵))) = (((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵)))
6963, 68eqtri 2765 . . . . . 6 (((1st𝐴) ·N (2nd𝐵)) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd ‘([Q]‘𝐴)))) = (((1st𝐴) ·N (2nd ‘([Q]‘𝐴))) ·N ((1st ‘([Q]‘𝐵)) ·N (2nd𝐵)))
7053, 62, 693eqtr4g 2803 . . . . 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 5066 . . . 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 308 . . 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 315 . 2 ((𝐴 ∈ (N × N) ∧ 𝐵 ∈ (N × N)) → (𝐴 <pQ 𝐵 ↔ ([Q]‘𝐴) <Q ([Q]‘𝐵)))
744, 16, 73pm5.21nii 383 1 (𝐴 <pQ 𝐵 ↔ ([Q]‘𝐴) <Q ([Q]‘𝐵))
Colors of variables: wff setvar class
Syntax hints:  wb 209  wa 399   = wceq 1543  wcel 2110  cop 4547   class class class wbr 5053  {copab 5115   × cxp 5549  cfv 6380  (class class class)co 7213  1st c1st 7759  2nd c2nd 7760  Ncnpi 10458   ·N cmi 10460   <N clti 10461   <pQ cltpq 10464   ~Q ceq 10465  Qcnq 10466  [Q]cerq 10468   <Q cltq 10472
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1803  ax-4 1817  ax-5 1918  ax-6 1976  ax-7 2016  ax-8 2112  ax-9 2120  ax-10 2141  ax-11 2158  ax-12 2175  ax-ext 2708  ax-sep 5192  ax-nul 5199  ax-pr 5322  ax-un 7523
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 848  df-3or 1090  df-3an 1091  df-tru 1546  df-fal 1556  df-ex 1788  df-nf 1792  df-sb 2071  df-mo 2539  df-eu 2568  df-clab 2715  df-cleq 2729  df-clel 2816  df-nfc 2886  df-ne 2941  df-ral 3066  df-rex 3067  df-reu 3068  df-rmo 3069  df-rab 3070  df-v 3410  df-sbc 3695  df-csb 3812  df-dif 3869  df-un 3871  df-in 3873  df-ss 3883  df-pss 3885  df-nul 4238  df-if 4440  df-pw 4515  df-sn 4542  df-pr 4544  df-tp 4546  df-op 4548  df-uni 4820  df-iun 4906  df-br 5054  df-opab 5116  df-mpt 5136  df-tr 5162  df-id 5455  df-eprel 5460  df-po 5468  df-so 5469  df-fr 5509  df-we 5511  df-xp 5557  df-rel 5558  df-cnv 5559  df-co 5560  df-dm 5561  df-rn 5562  df-res 5563  df-ima 5564  df-pred 6160  df-ord 6216  df-on 6217  df-lim 6218  df-suc 6219  df-iota 6338  df-fun 6382  df-fn 6383  df-f 6384  df-f1 6385  df-fo 6386  df-f1o 6387  df-fv 6388  df-ov 7216  df-oprab 7217  df-mpo 7218  df-om 7645  df-1st 7761  df-2nd 7762  df-wrecs 8047  df-recs 8108  df-rdg 8146  df-1o 8202  df-oadd 8206  df-omul 8207  df-er 8391  df-ni 10486  df-mi 10488  df-lti 10489  df-ltpq 10524  df-enq 10525  df-nq 10526  df-erq 10527  df-1nq 10530  df-ltnq 10532
This theorem is referenced by:  ltanq  10585  ltmnq  10586  1lt2nq  10587
  Copyright terms: Public domain W3C validator