Metamath Proof Explorer


Theorem irrapxlem3

Description: Lemma for irrapx1 . By subtraction, there is a multiple very close to an integer. (Contributed by Stefan O'Rear, 13-Sep-2014)

Ref Expression
Assertion irrapxlem3 A + B x 1 B y 0 A x y < 1 B

Proof

Step Hyp Ref Expression
1 irrapxlem2 A + B a 0 B b 0 B a < b A a mod 1 A b mod 1 < 1 B
2 1z 1
3 2 a1i A + B a 0 B b 0 B a < b 1
4 simpllr A + B a 0 B b 0 B a < b B
5 4 nnzd A + B a 0 B b 0 B a < b B
6 simplrr A + B a 0 B b 0 B a < b b 0 B
7 6 elfzelzd A + B a 0 B b 0 B a < b b
8 simplrl A + B a 0 B b 0 B a < b a 0 B
9 8 elfzelzd A + B a 0 B b 0 B a < b a
10 7 9 zsubcld A + B a 0 B b 0 B a < b b a
11 1m1e0 1 1 = 0
12 elfzelz a 0 B a
13 12 ad2antrl A + B a 0 B b 0 B a
14 13 zred A + B a 0 B b 0 B a
15 elfzelz b 0 B b
16 15 ad2antll A + B a 0 B b 0 B b
17 16 zred A + B a 0 B b 0 B b
18 14 17 posdifd A + B a 0 B b 0 B a < b 0 < b a
19 18 biimpa A + B a 0 B b 0 B a < b 0 < b a
20 11 19 eqbrtrid A + B a 0 B b 0 B a < b 1 1 < b a
21 zlem1lt 1 b a 1 b a 1 1 < b a
22 2 10 21 sylancr A + B a 0 B b 0 B a < b 1 b a 1 1 < b a
23 20 22 mpbird A + B a 0 B b 0 B a < b 1 b a
24 7 zred A + B a 0 B b 0 B a < b b
25 9 zred A + B a 0 B b 0 B a < b a
26 24 25 resubcld A + B a 0 B b 0 B a < b b a
27 0red A + B a 0 B b 0 B a < b 0
28 24 27 resubcld A + B a 0 B b 0 B a < b b 0
29 4 nnred A + B a 0 B b 0 B a < b B
30 elfzle1 a 0 B 0 a
31 8 30 syl A + B a 0 B b 0 B a < b 0 a
32 27 25 24 31 lesub2dd A + B a 0 B b 0 B a < b b a b 0
33 24 recnd A + B a 0 B b 0 B a < b b
34 33 subid1d A + B a 0 B b 0 B a < b b 0 = b
35 elfzle2 b 0 B b B
36 6 35 syl A + B a 0 B b 0 B a < b b B
37 34 36 eqbrtrd A + B a 0 B b 0 B a < b b 0 B
38 26 28 29 32 37 letrd A + B a 0 B b 0 B a < b b a B
39 3 5 10 23 38 elfzd A + B a 0 B b 0 B a < b b a 1 B
40 39 adantrr A + B a 0 B b 0 B a < b A a mod 1 A b mod 1 < 1 B b a 1 B
41 rpre A + A
42 41 ad3antrrr A + B a 0 B b 0 B a < b A
43 42 25 remulcld A + B a 0 B b 0 B a < b A a
44 42 24 remulcld A + B a 0 B b 0 B a < b A b
45 simpr A + B a 0 B b 0 B a < b a < b
46 25 24 45 ltled A + B a 0 B b 0 B a < b a b
47 rpgt0 A + 0 < A
48 47 ad3antrrr A + B a 0 B b 0 B a < b 0 < A
49 lemul2 a b A 0 < A a b A a A b
50 25 24 42 48 49 syl112anc A + B a 0 B b 0 B a < b a b A a A b
51 46 50 mpbid A + B a 0 B b 0 B a < b A a A b
52 flword2 A a A b A a A b A b A a
53 43 44 51 52 syl3anc A + B a 0 B b 0 B a < b A b A a
54 uznn0sub A b A a A b A a 0
55 53 54 syl A + B a 0 B b 0 B a < b A b A a 0
56 55 adantrr A + B a 0 B b 0 B a < b A a mod 1 A b mod 1 < 1 B A b A a 0
57 42 recnd A + B a 0 B b 0 B a < b A
58 25 recnd A + B a 0 B b 0 B a < b a
59 57 33 58 subdid A + B a 0 B b 0 B a < b A b a = A b A a
60 59 oveq1d A + B a 0 B b 0 B a < b A b a A b A a = A b - A a - A b A a
61 44 recnd A + B a 0 B b 0 B a < b A b
62 43 recnd A + B a 0 B b 0 B a < b A a
63 44 flcld A + B a 0 B b 0 B a < b A b
64 63 zcnd A + B a 0 B b 0 B a < b A b
65 43 flcld A + B a 0 B b 0 B a < b A a
66 65 zcnd A + B a 0 B b 0 B a < b A a
67 61 62 64 66 sub4d A + B a 0 B b 0 B a < b A b - A a - A b A a = A b - A b - A a A a
68 modfrac A b A b mod 1 = A b A b
69 44 68 syl A + B a 0 B b 0 B a < b A b mod 1 = A b A b
70 69 eqcomd A + B a 0 B b 0 B a < b A b A b = A b mod 1
71 modfrac A a A a mod 1 = A a A a
72 43 71 syl A + B a 0 B b 0 B a < b A a mod 1 = A a A a
73 72 eqcomd A + B a 0 B b 0 B a < b A a A a = A a mod 1
74 70 73 oveq12d A + B a 0 B b 0 B a < b A b - A b - A a A a = A b mod 1 A a mod 1
75 60 67 74 3eqtrd A + B a 0 B b 0 B a < b A b a A b A a = A b mod 1 A a mod 1
76 75 fveq2d A + B a 0 B b 0 B a < b A b a A b A a = A b mod 1 A a mod 1
77 1rp 1 +
78 77 a1i A + B a 0 B b 0 B a < b 1 +
79 44 78 modcld A + B a 0 B b 0 B a < b A b mod 1
80 79 recnd A + B a 0 B b 0 B a < b A b mod 1
81 43 78 modcld A + B a 0 B b 0 B a < b A a mod 1
82 81 recnd A + B a 0 B b 0 B a < b A a mod 1
83 80 82 abssubd A + B a 0 B b 0 B a < b A b mod 1 A a mod 1 = A a mod 1 A b mod 1
84 76 83 eqtr2d A + B a 0 B b 0 B a < b A a mod 1 A b mod 1 = A b a A b A a
85 84 breq1d A + B a 0 B b 0 B a < b A a mod 1 A b mod 1 < 1 B A b a A b A a < 1 B
86 85 biimpd A + B a 0 B b 0 B a < b A a mod 1 A b mod 1 < 1 B A b a A b A a < 1 B
87 86 impr A + B a 0 B b 0 B a < b A a mod 1 A b mod 1 < 1 B A b a A b A a < 1 B
88 oveq2 x = b a A x = A b a
89 88 fvoveq1d x = b a A x y = A b a y
90 89 breq1d x = b a A x y < 1 B A b a y < 1 B
91 oveq2 y = A b A a A b a y = A b a A b A a
92 91 fveq2d y = A b A a A b a y = A b a A b A a
93 92 breq1d y = A b A a A b a y < 1 B A b a A b A a < 1 B
94 90 93 rspc2ev b a 1 B A b A a 0 A b a A b A a < 1 B x 1 B y 0 A x y < 1 B
95 40 56 87 94 syl3anc A + B a 0 B b 0 B a < b A a mod 1 A b mod 1 < 1 B x 1 B y 0 A x y < 1 B
96 95 ex A + B a 0 B b 0 B a < b A a mod 1 A b mod 1 < 1 B x 1 B y 0 A x y < 1 B
97 96 rexlimdvva A + B a 0 B b 0 B a < b A a mod 1 A b mod 1 < 1 B x 1 B y 0 A x y < 1 B
98 1 97 mpd A + B x 1 B y 0 A x y < 1 B