Metamath Proof Explorer


Theorem qbtwnxr

Description: The rational numbers are dense in RR* : any two extended real numbers have a rational between them. (Contributed by NM, 6-Feb-2007) (Proof shortened by Mario Carneiro, 23-Aug-2015)

Ref Expression
Assertion qbtwnxr A * B * A < B x A < x x < B

Proof

Step Hyp Ref Expression
1 elxr A * A A = +∞ A = −∞
2 elxr B * B B = +∞ B = −∞
3 qbtwnre A B A < B x A < x x < B
4 3 3expia A B A < B x A < x x < B
5 simpl A B = +∞ A
6 peano2re A A + 1
7 6 adantr A B = +∞ A + 1
8 ltp1 A A < A + 1
9 8 adantr A B = +∞ A < A + 1
10 qbtwnre A A + 1 A < A + 1 x A < x x < A + 1
11 5 7 9 10 syl3anc A B = +∞ x A < x x < A + 1
12 qre x x
13 12 ltpnfd x x < +∞
14 13 adantl A B = +∞ x x < +∞
15 simplr A B = +∞ x B = +∞
16 14 15 breqtrrd A B = +∞ x x < B
17 16 a1d A B = +∞ x x < A + 1 x < B
18 17 anim2d A B = +∞ x A < x x < A + 1 A < x x < B
19 18 reximdva A B = +∞ x A < x x < A + 1 x A < x x < B
20 11 19 mpd A B = +∞ x A < x x < B
21 20 a1d A B = +∞ A < B x A < x x < B
22 rexr A A *
23 breq2 B = −∞ A < B A < −∞
24 23 adantl A * B = −∞ A < B A < −∞
25 nltmnf A * ¬ A < −∞
26 25 adantr A * B = −∞ ¬ A < −∞
27 26 pm2.21d A * B = −∞ A < −∞ x A < x x < B
28 24 27 sylbid A * B = −∞ A < B x A < x x < B
29 22 28 sylan A B = −∞ A < B x A < x x < B
30 4 21 29 3jaodan A B B = +∞ B = −∞ A < B x A < x x < B
31 2 30 sylan2b A B * A < B x A < x x < B
32 breq1 A = +∞ A < B +∞ < B
33 32 adantr A = +∞ B * A < B +∞ < B
34 pnfnlt B * ¬ +∞ < B
35 34 adantl A = +∞ B * ¬ +∞ < B
36 35 pm2.21d A = +∞ B * +∞ < B x A < x x < B
37 33 36 sylbid A = +∞ B * A < B x A < x x < B
38 peano2rem B B 1
39 38 adantl A = −∞ B B 1
40 simpr A = −∞ B B
41 ltm1 B B 1 < B
42 41 adantl A = −∞ B B 1 < B
43 qbtwnre B 1 B B 1 < B x B 1 < x x < B
44 39 40 42 43 syl3anc A = −∞ B x B 1 < x x < B
45 simpll A = −∞ B x A = −∞
46 12 adantl A = −∞ B x x
47 46 mnfltd A = −∞ B x −∞ < x
48 45 47 eqbrtrd A = −∞ B x A < x
49 48 a1d A = −∞ B x B 1 < x A < x
50 49 anim1d A = −∞ B x B 1 < x x < B A < x x < B
51 50 reximdva A = −∞ B x B 1 < x x < B x A < x x < B
52 44 51 mpd A = −∞ B x A < x x < B
53 52 a1d A = −∞ B A < B x A < x x < B
54 1re 1
55 mnflt 1 −∞ < 1
56 54 55 ax-mp −∞ < 1
57 breq1 A = −∞ A < 1 −∞ < 1
58 56 57 mpbiri A = −∞ A < 1
59 ltpnf 1 1 < +∞
60 54 59 ax-mp 1 < +∞
61 breq2 B = +∞ 1 < B 1 < +∞
62 60 61 mpbiri B = +∞ 1 < B
63 1z 1
64 zq 1 1
65 63 64 ax-mp 1
66 breq2 x = 1 A < x A < 1
67 breq1 x = 1 x < B 1 < B
68 66 67 anbi12d x = 1 A < x x < B A < 1 1 < B
69 68 rspcev 1 A < 1 1 < B x A < x x < B
70 65 69 mpan A < 1 1 < B x A < x x < B
71 58 62 70 syl2an A = −∞ B = +∞ x A < x x < B
72 71 a1d A = −∞ B = +∞ A < B x A < x x < B
73 3mix3 A = −∞ A A = +∞ A = −∞
74 73 1 sylibr A = −∞ A *
75 74 28 sylan A = −∞ B = −∞ A < B x A < x x < B
76 53 72 75 3jaodan A = −∞ B B = +∞ B = −∞ A < B x A < x x < B
77 2 76 sylan2b A = −∞ B * A < B x A < x x < B
78 31 37 77 3jaoian A A = +∞ A = −∞ B * A < B x A < x x < B
79 1 78 sylanb A * B * A < B x A < x x < B
80 79 3impia A * B * A < B x A < x x < B