Metamath Proof Explorer


Theorem iseraltlem2

Description: Lemma for iseralt . The terms of an alternating series form a chain of inequalities in alternate terms, so that for example S ( 1 ) <_ S ( 3 ) <_ S ( 5 ) <_ ... and ... <_ S ( 4 ) <_ S ( 2 ) <_ S ( 0 ) (assuming M = 0 so that these terms are defined). (Contributed by Mario Carneiro, 6-Apr-2015)

Ref Expression
Hypotheses iseralt.1 Z = M
iseralt.2 φ M
iseralt.3 φ G : Z
iseralt.4 φ k Z G k + 1 G k
iseralt.5 φ G 0
iseralt.6 φ k Z F k = 1 k G k
Assertion iseraltlem2 φ N Z K 0 1 N seq M + F N + 2 K 1 N seq M + F N

Proof

Step Hyp Ref Expression
1 iseralt.1 Z = M
2 iseralt.2 φ M
3 iseralt.3 φ G : Z
4 iseralt.4 φ k Z G k + 1 G k
5 iseralt.5 φ G 0
6 iseralt.6 φ k Z F k = 1 k G k
7 oveq2 x = 0 2 x = 2 0
8 2t0e0 2 0 = 0
9 7 8 eqtrdi x = 0 2 x = 0
10 9 oveq2d x = 0 N + 2 x = N + 0
11 10 fveq2d x = 0 seq M + F N + 2 x = seq M + F N + 0
12 11 oveq2d x = 0 1 N seq M + F N + 2 x = 1 N seq M + F N + 0
13 12 breq1d x = 0 1 N seq M + F N + 2 x 1 N seq M + F N 1 N seq M + F N + 0 1 N seq M + F N
14 13 imbi2d x = 0 φ N Z 1 N seq M + F N + 2 x 1 N seq M + F N φ N Z 1 N seq M + F N + 0 1 N seq M + F N
15 oveq2 x = n 2 x = 2 n
16 15 oveq2d x = n N + 2 x = N + 2 n
17 16 fveq2d x = n seq M + F N + 2 x = seq M + F N + 2 n
18 17 oveq2d x = n 1 N seq M + F N + 2 x = 1 N seq M + F N + 2 n
19 18 breq1d x = n 1 N seq M + F N + 2 x 1 N seq M + F N 1 N seq M + F N + 2 n 1 N seq M + F N
20 19 imbi2d x = n φ N Z 1 N seq M + F N + 2 x 1 N seq M + F N φ N Z 1 N seq M + F N + 2 n 1 N seq M + F N
21 oveq2 x = n + 1 2 x = 2 n + 1
22 21 oveq2d x = n + 1 N + 2 x = N + 2 n + 1
23 22 fveq2d x = n + 1 seq M + F N + 2 x = seq M + F N + 2 n + 1
24 23 oveq2d x = n + 1 1 N seq M + F N + 2 x = 1 N seq M + F N + 2 n + 1
25 24 breq1d x = n + 1 1 N seq M + F N + 2 x 1 N seq M + F N 1 N seq M + F N + 2 n + 1 1 N seq M + F N
26 25 imbi2d x = n + 1 φ N Z 1 N seq M + F N + 2 x 1 N seq M + F N φ N Z 1 N seq M + F N + 2 n + 1 1 N seq M + F N
27 oveq2 x = K 2 x = 2 K
28 27 oveq2d x = K N + 2 x = N + 2 K
29 28 fveq2d x = K seq M + F N + 2 x = seq M + F N + 2 K
30 29 oveq2d x = K 1 N seq M + F N + 2 x = 1 N seq M + F N + 2 K
31 30 breq1d x = K 1 N seq M + F N + 2 x 1 N seq M + F N 1 N seq M + F N + 2 K 1 N seq M + F N
32 31 imbi2d x = K φ N Z 1 N seq M + F N + 2 x 1 N seq M + F N φ N Z 1 N seq M + F N + 2 K 1 N seq M + F N
33 uzssz M
34 1 33 eqsstri Z
35 34 a1i φ Z
36 35 sselda φ N Z N
37 36 zcnd φ N Z N
38 37 addid1d φ N Z N + 0 = N
39 38 fveq2d φ N Z seq M + F N + 0 = seq M + F N
40 39 oveq2d φ N Z 1 N seq M + F N + 0 = 1 N seq M + F N
41 neg1rr 1
42 neg1ne0 1 0
43 reexpclz 1 1 0 N 1 N
44 41 42 36 43 mp3an12i φ N Z 1 N
45 35 sselda φ k Z k
46 reexpclz 1 1 0 k 1 k
47 41 42 45 46 mp3an12i φ k Z 1 k
48 3 ffvelrnda φ k Z G k
49 47 48 remulcld φ k Z 1 k G k
50 6 49 eqeltrd φ k Z F k
51 1 2 50 serfre φ seq M + F : Z
52 51 ffvelrnda φ N Z seq M + F N
53 44 52 remulcld φ N Z 1 N seq M + F N
54 53 leidd φ N Z 1 N seq M + F N 1 N seq M + F N
55 40 54 eqbrtrd φ N Z 1 N seq M + F N + 0 1 N seq M + F N
56 3 ad2antrr φ N Z n 0 G : Z
57 ax-1cn 1
58 57 2timesi 2 1 = 1 + 1
59 58 oveq2i N + 2 n + 2 1 = N + 2 n + 1 + 1
60 simpr φ N Z N Z
61 60 1 eleqtrdi φ N Z N M
62 61 adantr φ N Z n 0 N M
63 eluzelz N M N
64 62 63 syl φ N Z n 0 N
65 64 zcnd φ N Z n 0 N
66 2cn 2
67 nn0cn n 0 n
68 67 adantl φ N Z n 0 n
69 mulcl 2 n 2 n
70 66 68 69 sylancr φ N Z n 0 2 n
71 66 57 mulcli 2 1
72 71 a1i φ N Z n 0 2 1
73 65 70 72 addassd φ N Z n 0 N + 2 n + 2 1 = N + 2 n + 2 1
74 59 73 eqtr3id φ N Z n 0 N + 2 n + 1 + 1 = N + 2 n + 2 1
75 2nn0 2 0
76 simpr φ N Z n 0 n 0
77 nn0mulcl 2 0 n 0 2 n 0
78 75 76 77 sylancr φ N Z n 0 2 n 0
79 uzaddcl N M 2 n 0 N + 2 n M
80 62 78 79 syl2anc φ N Z n 0 N + 2 n M
81 33 80 sselid φ N Z n 0 N + 2 n
82 81 zcnd φ N Z n 0 N + 2 n
83 1cnd φ N Z n 0 1
84 82 83 83 addassd φ N Z n 0 N + 2 n + 1 + 1 = N + 2 n + 1 + 1
85 2cnd φ N Z n 0 2
86 85 68 83 adddid φ N Z n 0 2 n + 1 = 2 n + 2 1
87 86 oveq2d φ N Z n 0 N + 2 n + 1 = N + 2 n + 2 1
88 74 84 87 3eqtr4d φ N Z n 0 N + 2 n + 1 + 1 = N + 2 n + 1
89 peano2nn0 n 0 n + 1 0
90 89 adantl φ N Z n 0 n + 1 0
91 nn0mulcl 2 0 n + 1 0 2 n + 1 0
92 75 90 91 sylancr φ N Z n 0 2 n + 1 0
93 uzaddcl N M 2 n + 1 0 N + 2 n + 1 M
94 62 92 93 syl2anc φ N Z n 0 N + 2 n + 1 M
95 94 1 eleqtrrdi φ N Z n 0 N + 2 n + 1 Z
96 88 95 eqeltrd φ N Z n 0 N + 2 n + 1 + 1 Z
97 56 96 ffvelrnd φ N Z n 0 G N + 2 n + 1 + 1
98 peano2uz N + 2 n M N + 2 n + 1 M
99 80 98 syl φ N Z n 0 N + 2 n + 1 M
100 99 1 eleqtrrdi φ N Z n 0 N + 2 n + 1 Z
101 56 100 ffvelrnd φ N Z n 0 G N + 2 n + 1
102 97 101 resubcld φ N Z n 0 G N + 2 n + 1 + 1 G N + 2 n + 1
103 0red φ N Z n 0 0
104 44 adantr φ N Z n 0 1 N
105 51 ad2antrr φ N Z n 0 seq M + F : Z
106 80 1 eleqtrrdi φ N Z n 0 N + 2 n Z
107 105 106 ffvelrnd φ N Z n 0 seq M + F N + 2 n
108 104 107 remulcld φ N Z n 0 1 N seq M + F N + 2 n
109 fvoveq1 k = N + 2 n + 1 G k + 1 = G N + 2 n + 1 + 1
110 fveq2 k = N + 2 n + 1 G k = G N + 2 n + 1
111 109 110 breq12d k = N + 2 n + 1 G k + 1 G k G N + 2 n + 1 + 1 G N + 2 n + 1
112 4 ralrimiva φ k Z G k + 1 G k
113 112 ad2antrr φ N Z n 0 k Z G k + 1 G k
114 111 113 100 rspcdva φ N Z n 0 G N + 2 n + 1 + 1 G N + 2 n + 1
115 97 101 suble0d φ N Z n 0 G N + 2 n + 1 + 1 G N + 2 n + 1 0 G N + 2 n + 1 + 1 G N + 2 n + 1
116 114 115 mpbird φ N Z n 0 G N + 2 n + 1 + 1 G N + 2 n + 1 0
117 102 103 108 116 leadd2dd φ N Z n 0 1 N seq M + F N + 2 n + G N + 2 n + 1 + 1 - G N + 2 n + 1 1 N seq M + F N + 2 n + 0
118 seqp1 N + 2 n + 1 M seq M + F N + 2 n + 1 + 1 = seq M + F N + 2 n + 1 + F N + 2 n + 1 + 1
119 99 118 syl φ N Z n 0 seq M + F N + 2 n + 1 + 1 = seq M + F N + 2 n + 1 + F N + 2 n + 1 + 1
120 seqp1 N + 2 n M seq M + F N + 2 n + 1 = seq M + F N + 2 n + F N + 2 n + 1
121 80 120 syl φ N Z n 0 seq M + F N + 2 n + 1 = seq M + F N + 2 n + F N + 2 n + 1
122 121 oveq1d φ N Z n 0 seq M + F N + 2 n + 1 + F N + 2 n + 1 + 1 = seq M + F N + 2 n + F N + 2 n + 1 + F N + 2 n + 1 + 1
123 119 122 eqtrd φ N Z n 0 seq M + F N + 2 n + 1 + 1 = seq M + F N + 2 n + F N + 2 n + 1 + F N + 2 n + 1 + 1
124 88 fveq2d φ N Z n 0 seq M + F N + 2 n + 1 + 1 = seq M + F N + 2 n + 1
125 107 recnd φ N Z n 0 seq M + F N + 2 n
126 fveq2 k = N + 2 n + 1 F k = F N + 2 n + 1
127 oveq2 k = N + 2 n + 1 1 k = 1 N + 2 n + 1
128 127 110 oveq12d k = N + 2 n + 1 1 k G k = 1 N + 2 n + 1 G N + 2 n + 1
129 126 128 eqeq12d k = N + 2 n + 1 F k = 1 k G k F N + 2 n + 1 = 1 N + 2 n + 1 G N + 2 n + 1
130 6 ralrimiva φ k Z F k = 1 k G k
131 130 ad2antrr φ N Z n 0 k Z F k = 1 k G k
132 129 131 100 rspcdva φ N Z n 0 F N + 2 n + 1 = 1 N + 2 n + 1 G N + 2 n + 1
133 neg1cn 1
134 133 a1i φ N Z n 0 1
135 42 a1i φ N Z n 0 1 0
136 134 135 81 expp1zd φ N Z n 0 1 N + 2 n + 1 = 1 N + 2 n -1
137 41 a1i φ N Z n 0 1
138 137 135 81 reexpclzd φ N Z n 0 1 N + 2 n
139 138 recnd φ N Z n 0 1 N + 2 n
140 mulcom 1 N + 2 n 1 1 N + 2 n -1 = -1 1 N + 2 n
141 139 133 140 sylancl φ N Z n 0 1 N + 2 n -1 = -1 1 N + 2 n
142 139 mulm1d φ N Z n 0 -1 1 N + 2 n = 1 N + 2 n
143 136 141 142 3eqtrd φ N Z n 0 1 N + 2 n + 1 = 1 N + 2 n
144 143 oveq1d φ N Z n 0 1 N + 2 n + 1 G N + 2 n + 1 = 1 N + 2 n G N + 2 n + 1
145 101 recnd φ N Z n 0 G N + 2 n + 1
146 mulneg12 1 N + 2 n G N + 2 n + 1 1 N + 2 n G N + 2 n + 1 = 1 N + 2 n G N + 2 n + 1
147 139 145 146 syl2anc φ N Z n 0 1 N + 2 n G N + 2 n + 1 = 1 N + 2 n G N + 2 n + 1
148 132 144 147 3eqtrd φ N Z n 0 F N + 2 n + 1 = 1 N + 2 n G N + 2 n + 1
149 101 renegcld φ N Z n 0 G N + 2 n + 1
150 138 149 remulcld φ N Z n 0 1 N + 2 n G N + 2 n + 1
151 148 150 eqeltrd φ N Z n 0 F N + 2 n + 1
152 151 recnd φ N Z n 0 F N + 2 n + 1
153 fveq2 k = N + 2 n + 1 + 1 F k = F N + 2 n + 1 + 1
154 oveq2 k = N + 2 n + 1 + 1 1 k = 1 N + 2 n + 1 + 1
155 fveq2 k = N + 2 n + 1 + 1 G k = G N + 2 n + 1 + 1
156 154 155 oveq12d k = N + 2 n + 1 + 1 1 k G k = 1 N + 2 n + 1 + 1 G N + 2 n + 1 + 1
157 153 156 eqeq12d k = N + 2 n + 1 + 1 F k = 1 k G k F N + 2 n + 1 + 1 = 1 N + 2 n + 1 + 1 G N + 2 n + 1 + 1
158 157 131 96 rspcdva φ N Z n 0 F N + 2 n + 1 + 1 = 1 N + 2 n + 1 + 1 G N + 2 n + 1 + 1
159 81 peano2zd φ N Z n 0 N + 2 n + 1
160 134 135 159 expp1zd φ N Z n 0 1 N + 2 n + 1 + 1 = 1 N + 2 n + 1 -1
161 143 oveq1d φ N Z n 0 1 N + 2 n + 1 -1 = 1 N + 2 n -1
162 mul2neg 1 N + 2 n 1 1 N + 2 n -1 = 1 N + 2 n 1
163 139 57 162 sylancl φ N Z n 0 1 N + 2 n -1 = 1 N + 2 n 1
164 139 mulid1d φ N Z n 0 1 N + 2 n 1 = 1 N + 2 n
165 163 164 eqtrd φ N Z n 0 1 N + 2 n -1 = 1 N + 2 n
166 160 161 165 3eqtrd φ N Z n 0 1 N + 2 n + 1 + 1 = 1 N + 2 n
167 166 oveq1d φ N Z n 0 1 N + 2 n + 1 + 1 G N + 2 n + 1 + 1 = 1 N + 2 n G N + 2 n + 1 + 1
168 158 167 eqtrd φ N Z n 0 F N + 2 n + 1 + 1 = 1 N + 2 n G N + 2 n + 1 + 1
169 138 97 remulcld φ N Z n 0 1 N + 2 n G N + 2 n + 1 + 1
170 168 169 eqeltrd φ N Z n 0 F N + 2 n + 1 + 1
171 170 recnd φ N Z n 0 F N + 2 n + 1 + 1
172 125 152 171 addassd φ N Z n 0 seq M + F N + 2 n + F N + 2 n + 1 + F N + 2 n + 1 + 1 = seq M + F N + 2 n + F N + 2 n + 1 + F N + 2 n + 1 + 1
173 123 124 172 3eqtr3d φ N Z n 0 seq M + F N + 2 n + 1 = seq M + F N + 2 n + F N + 2 n + 1 + F N + 2 n + 1 + 1
174 173 oveq2d φ N Z n 0 1 N seq M + F N + 2 n + 1 = 1 N seq M + F N + 2 n + F N + 2 n + 1 + F N + 2 n + 1 + 1
175 104 recnd φ N Z n 0 1 N
176 151 170 readdcld φ N Z n 0 F N + 2 n + 1 + F N + 2 n + 1 + 1
177 176 recnd φ N Z n 0 F N + 2 n + 1 + F N + 2 n + 1 + 1
178 175 125 177 adddid φ N Z n 0 1 N seq M + F N + 2 n + F N + 2 n + 1 + F N + 2 n + 1 + 1 = 1 N seq M + F N + 2 n + 1 N F N + 2 n + 1 + F N + 2 n + 1 + 1
179 175 152 171 adddid φ N Z n 0 1 N F N + 2 n + 1 + F N + 2 n + 1 + 1 = 1 N F N + 2 n + 1 + 1 N F N + 2 n + 1 + 1
180 148 oveq2d φ N Z n 0 1 N F N + 2 n + 1 = 1 N 1 N + 2 n G N + 2 n + 1
181 149 recnd φ N Z n 0 G N + 2 n + 1
182 175 139 181 mulassd φ N Z n 0 1 N 1 N + 2 n G N + 2 n + 1 = 1 N 1 N + 2 n G N + 2 n + 1
183 180 182 eqtr4d φ N Z n 0 1 N F N + 2 n + 1 = 1 N 1 N + 2 n G N + 2 n + 1
184 85 65 68 adddid φ N Z n 0 2 N + n = 2 N + 2 n
185 65 2timesd φ N Z n 0 2 N = N + N
186 185 oveq1d φ N Z n 0 2 N + 2 n = N + N + 2 n
187 65 65 70 addassd φ N Z n 0 N + N + 2 n = N + N + 2 n
188 184 186 187 3eqtrrd φ N Z n 0 N + N + 2 n = 2 N + n
189 188 oveq2d φ N Z n 0 1 N + N + 2 n = 1 2 N + n
190 expaddz 1 1 0 N N + 2 n 1 N + N + 2 n = 1 N 1 N + 2 n
191 134 135 64 81 190 syl22anc φ N Z n 0 1 N + N + 2 n = 1 N 1 N + 2 n
192 2z 2
193 192 a1i φ N Z n 0 2
194 nn0z n 0 n
195 zaddcl N n N + n
196 36 194 195 syl2an φ N Z n 0 N + n
197 expmulz 1 1 0 2 N + n 1 2 N + n = -1 2 N + n
198 134 135 193 196 197 syl22anc φ N Z n 0 1 2 N + n = -1 2 N + n
199 neg1sqe1 1 2 = 1
200 199 oveq1i -1 2 N + n = 1 N + n
201 1exp N + n 1 N + n = 1
202 196 201 syl φ N Z n 0 1 N + n = 1
203 200 202 eqtrid φ N Z n 0 -1 2 N + n = 1
204 198 203 eqtrd φ N Z n 0 1 2 N + n = 1
205 189 191 204 3eqtr3d φ N Z n 0 1 N 1 N + 2 n = 1
206 205 oveq1d φ N Z n 0 1 N 1 N + 2 n G N + 2 n + 1 = 1 G N + 2 n + 1
207 181 mulid2d φ N Z n 0 1 G N + 2 n + 1 = G N + 2 n + 1
208 183 206 207 3eqtrd φ N Z n 0 1 N F N + 2 n + 1 = G N + 2 n + 1
209 168 oveq2d φ N Z n 0 1 N F N + 2 n + 1 + 1 = 1 N 1 N + 2 n G N + 2 n + 1 + 1
210 97 recnd φ N Z n 0 G N + 2 n + 1 + 1
211 175 139 210 mulassd φ N Z n 0 1 N 1 N + 2 n G N + 2 n + 1 + 1 = 1 N 1 N + 2 n G N + 2 n + 1 + 1
212 209 211 eqtr4d φ N Z n 0 1 N F N + 2 n + 1 + 1 = 1 N 1 N + 2 n G N + 2 n + 1 + 1
213 205 oveq1d φ N Z n 0 1 N 1 N + 2 n G N + 2 n + 1 + 1 = 1 G N + 2 n + 1 + 1
214 210 mulid2d φ N Z n 0 1 G N + 2 n + 1 + 1 = G N + 2 n + 1 + 1
215 212 213 214 3eqtrd φ N Z n 0 1 N F N + 2 n + 1 + 1 = G N + 2 n + 1 + 1
216 208 215 oveq12d φ N Z n 0 1 N F N + 2 n + 1 + 1 N F N + 2 n + 1 + 1 = - G N + 2 n + 1 + G N + 2 n + 1 + 1
217 145 negcld φ N Z n 0 G N + 2 n + 1
218 217 210 addcomd φ N Z n 0 - G N + 2 n + 1 + G N + 2 n + 1 + 1 = G N + 2 n + 1 + 1 + G N + 2 n + 1
219 210 145 negsubd φ N Z n 0 G N + 2 n + 1 + 1 + G N + 2 n + 1 = G N + 2 n + 1 + 1 G N + 2 n + 1
220 218 219 eqtrd φ N Z n 0 - G N + 2 n + 1 + G N + 2 n + 1 + 1 = G N + 2 n + 1 + 1 G N + 2 n + 1
221 179 216 220 3eqtrd φ N Z n 0 1 N F N + 2 n + 1 + F N + 2 n + 1 + 1 = G N + 2 n + 1 + 1 G N + 2 n + 1
222 221 oveq2d φ N Z n 0 1 N seq M + F N + 2 n + 1 N F N + 2 n + 1 + F N + 2 n + 1 + 1 = 1 N seq M + F N + 2 n + G N + 2 n + 1 + 1 - G N + 2 n + 1
223 174 178 222 3eqtrrd φ N Z n 0 1 N seq M + F N + 2 n + G N + 2 n + 1 + 1 - G N + 2 n + 1 = 1 N seq M + F N + 2 n + 1
224 108 recnd φ N Z n 0 1 N seq M + F N + 2 n
225 224 addid1d φ N Z n 0 1 N seq M + F N + 2 n + 0 = 1 N seq M + F N + 2 n
226 117 223 225 3brtr3d φ N Z n 0 1 N seq M + F N + 2 n + 1 1 N seq M + F N + 2 n
227 105 95 ffvelrnd φ N Z n 0 seq M + F N + 2 n + 1
228 104 227 remulcld φ N Z n 0 1 N seq M + F N + 2 n + 1
229 53 adantr φ N Z n 0 1 N seq M + F N
230 letr 1 N seq M + F N + 2 n + 1 1 N seq M + F N + 2 n 1 N seq M + F N 1 N seq M + F N + 2 n + 1 1 N seq M + F N + 2 n 1 N seq M + F N + 2 n 1 N seq M + F N 1 N seq M + F N + 2 n + 1 1 N seq M + F N
231 228 108 229 230 syl3anc φ N Z n 0 1 N seq M + F N + 2 n + 1 1 N seq M + F N + 2 n 1 N seq M + F N + 2 n 1 N seq M + F N 1 N seq M + F N + 2 n + 1 1 N seq M + F N
232 226 231 mpand φ N Z n 0 1 N seq M + F N + 2 n 1 N seq M + F N 1 N seq M + F N + 2 n + 1 1 N seq M + F N
233 232 expcom n 0 φ N Z 1 N seq M + F N + 2 n 1 N seq M + F N 1 N seq M + F N + 2 n + 1 1 N seq M + F N
234 233 a2d n 0 φ N Z 1 N seq M + F N + 2 n 1 N seq M + F N φ N Z 1 N seq M + F N + 2 n + 1 1 N seq M + F N
235 14 20 26 32 55 234 nn0ind K 0 φ N Z 1 N seq M + F N + 2 K 1 N seq M + F N
236 235 com12 φ N Z K 0 1 N seq M + F N + 2 K 1 N seq M + F N
237 236 3impia φ N Z K 0 1 N seq M + F N + 2 K 1 N seq M + F N