Metamath Proof Explorer


Theorem ordpipq

Description: Ordering of positive fractions in terms of positive integers. (Contributed by Mario Carneiro, 8-May-2013) (New usage is discouraged.)

Ref Expression
Assertion ordpipq A B < 𝑝𝑸 C D A 𝑵 D < 𝑵 C 𝑵 B

Proof

Step Hyp Ref Expression
1 opex A B V
2 opex C D V
3 eleq1 x = A B x 𝑵 × 𝑵 A B 𝑵 × 𝑵
4 3 anbi1d x = A B x 𝑵 × 𝑵 y 𝑵 × 𝑵 A B 𝑵 × 𝑵 y 𝑵 × 𝑵
5 4 anbi1d x = A B x 𝑵 × 𝑵 y 𝑵 × 𝑵 1 st x 𝑵 2 nd y < 𝑵 1 st y 𝑵 2 nd x A B 𝑵 × 𝑵 y 𝑵 × 𝑵 1 st x 𝑵 2 nd y < 𝑵 1 st y 𝑵 2 nd x
6 fveq2 x = A B 1 st x = 1 st A B
7 opelxp A B 𝑵 × 𝑵 A 𝑵 B 𝑵
8 op1stg A 𝑵 B 𝑵 1 st A B = A
9 7 8 sylbi A B 𝑵 × 𝑵 1 st A B = A
10 9 adantr A B 𝑵 × 𝑵 y 𝑵 × 𝑵 1 st A B = A
11 6 10 sylan9eq x = A B A B 𝑵 × 𝑵 y 𝑵 × 𝑵 1 st x = A
12 11 oveq1d x = A B A B 𝑵 × 𝑵 y 𝑵 × 𝑵 1 st x 𝑵 2 nd y = A 𝑵 2 nd y
13 fveq2 x = A B 2 nd x = 2 nd A B
14 op2ndg A 𝑵 B 𝑵 2 nd A B = B
15 7 14 sylbi A B 𝑵 × 𝑵 2 nd A B = B
16 15 adantr A B 𝑵 × 𝑵 y 𝑵 × 𝑵 2 nd A B = B
17 13 16 sylan9eq x = A B A B 𝑵 × 𝑵 y 𝑵 × 𝑵 2 nd x = B
18 17 oveq2d x = A B A B 𝑵 × 𝑵 y 𝑵 × 𝑵 1 st y 𝑵 2 nd x = 1 st y 𝑵 B
19 12 18 breq12d x = A B A B 𝑵 × 𝑵 y 𝑵 × 𝑵 1 st x 𝑵 2 nd y < 𝑵 1 st y 𝑵 2 nd x A 𝑵 2 nd y < 𝑵 1 st y 𝑵 B
20 19 pm5.32da x = A B A B 𝑵 × 𝑵 y 𝑵 × 𝑵 1 st x 𝑵 2 nd y < 𝑵 1 st y 𝑵 2 nd x A B 𝑵 × 𝑵 y 𝑵 × 𝑵 A 𝑵 2 nd y < 𝑵 1 st y 𝑵 B
21 5 20 bitrd x = A B x 𝑵 × 𝑵 y 𝑵 × 𝑵 1 st x 𝑵 2 nd y < 𝑵 1 st y 𝑵 2 nd x A B 𝑵 × 𝑵 y 𝑵 × 𝑵 A 𝑵 2 nd y < 𝑵 1 st y 𝑵 B
22 eleq1 y = C D y 𝑵 × 𝑵 C D 𝑵 × 𝑵
23 22 anbi2d y = C D A B 𝑵 × 𝑵 y 𝑵 × 𝑵 A B 𝑵 × 𝑵 C D 𝑵 × 𝑵
24 23 anbi1d y = C D A B 𝑵 × 𝑵 y 𝑵 × 𝑵 A 𝑵 2 nd y < 𝑵 1 st y 𝑵 B A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 A 𝑵 2 nd y < 𝑵 1 st y 𝑵 B
25 fveq2 y = C D 2 nd y = 2 nd C D
26 opelxp C D 𝑵 × 𝑵 C 𝑵 D 𝑵
27 op2ndg C 𝑵 D 𝑵 2 nd C D = D
28 26 27 sylbi C D 𝑵 × 𝑵 2 nd C D = D
29 28 adantl A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 2 nd C D = D
30 25 29 sylan9eq y = C D A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 2 nd y = D
31 30 oveq2d y = C D A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 A 𝑵 2 nd y = A 𝑵 D
32 fveq2 y = C D 1 st y = 1 st C D
33 op1stg C 𝑵 D 𝑵 1 st C D = C
34 26 33 sylbi C D 𝑵 × 𝑵 1 st C D = C
35 34 adantl A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 1 st C D = C
36 32 35 sylan9eq y = C D A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 1 st y = C
37 36 oveq1d y = C D A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 1 st y 𝑵 B = C 𝑵 B
38 31 37 breq12d y = C D A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 A 𝑵 2 nd y < 𝑵 1 st y 𝑵 B A 𝑵 D < 𝑵 C 𝑵 B
39 38 pm5.32da y = C D A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 A 𝑵 2 nd y < 𝑵 1 st y 𝑵 B A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 A 𝑵 D < 𝑵 C 𝑵 B
40 24 39 bitrd y = C D A B 𝑵 × 𝑵 y 𝑵 × 𝑵 A 𝑵 2 nd y < 𝑵 1 st y 𝑵 B A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 A 𝑵 D < 𝑵 C 𝑵 B
41 df-ltpq < 𝑝𝑸 = x y | x 𝑵 × 𝑵 y 𝑵 × 𝑵 1 st x 𝑵 2 nd y < 𝑵 1 st y 𝑵 2 nd x
42 1 2 21 40 41 brab A B < 𝑝𝑸 C D A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 A 𝑵 D < 𝑵 C 𝑵 B
43 simpr A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 A 𝑵 D < 𝑵 C 𝑵 B A 𝑵 D < 𝑵 C 𝑵 B
44 ltrelpi < 𝑵 𝑵 × 𝑵
45 44 brel A 𝑵 D < 𝑵 C 𝑵 B A 𝑵 D 𝑵 C 𝑵 B 𝑵
46 dmmulpi dom 𝑵 = 𝑵 × 𝑵
47 0npi ¬ 𝑵
48 46 47 ndmovrcl A 𝑵 D 𝑵 A 𝑵 D 𝑵
49 46 47 ndmovrcl C 𝑵 B 𝑵 C 𝑵 B 𝑵
50 48 49 anim12i A 𝑵 D 𝑵 C 𝑵 B 𝑵 A 𝑵 D 𝑵 C 𝑵 B 𝑵
51 opelxpi A 𝑵 B 𝑵 A B 𝑵 × 𝑵
52 51 ad2ant2rl A 𝑵 D 𝑵 C 𝑵 B 𝑵 A B 𝑵 × 𝑵
53 simprl A 𝑵 D 𝑵 C 𝑵 B 𝑵 C 𝑵
54 simplr A 𝑵 D 𝑵 C 𝑵 B 𝑵 D 𝑵
55 53 54 opelxpd A 𝑵 D 𝑵 C 𝑵 B 𝑵 C D 𝑵 × 𝑵
56 52 55 jca A 𝑵 D 𝑵 C 𝑵 B 𝑵 A B 𝑵 × 𝑵 C D 𝑵 × 𝑵
57 45 50 56 3syl A 𝑵 D < 𝑵 C 𝑵 B A B 𝑵 × 𝑵 C D 𝑵 × 𝑵
58 57 ancri A 𝑵 D < 𝑵 C 𝑵 B A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 A 𝑵 D < 𝑵 C 𝑵 B
59 43 58 impbii A B 𝑵 × 𝑵 C D 𝑵 × 𝑵 A 𝑵 D < 𝑵 C 𝑵 B A 𝑵 D < 𝑵 C 𝑵 B
60 42 59 bitri A B < 𝑝𝑸 C D A 𝑵 D < 𝑵 C 𝑵 B