Metamath Proof Explorer


Theorem rplogsumlem2

Description: Lemma for rplogsum . Equation 9.2.14 of Shapiro, p. 331. (Contributed by Mario Carneiro, 2-May-2016)

Ref Expression
Assertion rplogsumlem2 A n = 1 A Λ n if n log n 0 n 2

Proof

Step Hyp Ref Expression
1 flid A A = A
2 1 oveq2d A 1 A = 1 A
3 2 sumeq1d A n = 1 A Λ n if n log n 0 n = n = 1 A Λ n if n log n 0 n
4 fveq2 n = p k Λ n = Λ p k
5 eleq1 n = p k n p k
6 fveq2 n = p k log n = log p k
7 5 6 ifbieq1d n = p k if n log n 0 = if p k log p k 0
8 4 7 oveq12d n = p k Λ n if n log n 0 = Λ p k if p k log p k 0
9 id n = p k n = p k
10 8 9 oveq12d n = p k Λ n if n log n 0 n = Λ p k if p k log p k 0 p k
11 zre A A
12 elfznn n 1 A n
13 12 adantl A n 1 A n
14 vmacl n Λ n
15 13 14 syl A n 1 A Λ n
16 13 nnrpd A n 1 A n +
17 16 relogcld A n 1 A log n
18 0re 0
19 ifcl log n 0 if n log n 0
20 17 18 19 sylancl A n 1 A if n log n 0
21 15 20 resubcld A n 1 A Λ n if n log n 0
22 21 13 nndivred A n 1 A Λ n if n log n 0 n
23 22 recnd A n 1 A Λ n if n log n 0 n
24 simprr A n 1 A Λ n = 0 Λ n = 0
25 vmaprm n Λ n = log n
26 prmnn n n
27 26 nnred n n
28 prmgt1 n 1 < n
29 27 28 rplogcld n log n +
30 25 29 eqeltrd n Λ n +
31 30 rpne0d n Λ n 0
32 31 necon2bi Λ n = 0 ¬ n
33 32 ad2antll A n 1 A Λ n = 0 ¬ n
34 33 iffalsed A n 1 A Λ n = 0 if n log n 0 = 0
35 24 34 oveq12d A n 1 A Λ n = 0 Λ n if n log n 0 = 0 0
36 0m0e0 0 0 = 0
37 35 36 eqtrdi A n 1 A Λ n = 0 Λ n if n log n 0 = 0
38 37 oveq1d A n 1 A Λ n = 0 Λ n if n log n 0 n = 0 n
39 12 ad2antrl A n 1 A Λ n = 0 n
40 39 nnrpd A n 1 A Λ n = 0 n +
41 40 rpcnne0d A n 1 A Λ n = 0 n n 0
42 div0 n n 0 0 n = 0
43 41 42 syl A n 1 A Λ n = 0 0 n = 0
44 38 43 eqtrd A n 1 A Λ n = 0 Λ n if n log n 0 n = 0
45 10 11 23 44 fsumvma2 A n = 1 A Λ n if n log n 0 n = p 0 A k = 1 log A log p Λ p k if p k log p k 0 p k
46 3 45 eqtr3d A n = 1 A Λ n if n log n 0 n = p 0 A k = 1 log A log p Λ p k if p k log p k 0 p k
47 fzfid A 2 A + 1 Fin
48 simpr A p 0 A p 0 A
49 48 elin2d A p 0 A p
50 prmnn p p
51 49 50 syl A p 0 A p
52 51 nnred A p 0 A p
53 11 adantr A p 0 A A
54 zcn A A
55 54 abscld A A
56 peano2re A A + 1
57 55 56 syl A A + 1
58 57 adantr A p 0 A A + 1
59 elinel1 p 0 A p 0 A
60 elicc2 0 A p 0 A p 0 p p A
61 18 11 60 sylancr A p 0 A p 0 p p A
62 59 61 syl5ib A p 0 A p 0 p p A
63 62 imp A p 0 A p 0 p p A
64 63 simp3d A p 0 A p A
65 54 adantr A p 0 A A
66 65 abscld A p 0 A A
67 53 leabsd A p 0 A A A
68 66 lep1d A p 0 A A A + 1
69 53 66 58 67 68 letrd A p 0 A A A + 1
70 52 53 58 64 69 letrd A p 0 A p A + 1
71 prmuz2 p p 2
72 49 71 syl A p 0 A p 2
73 nn0abscl A A 0
74 nn0p1nn A 0 A + 1
75 73 74 syl A A + 1
76 75 nnzd A A + 1
77 76 adantr A p 0 A A + 1
78 elfz5 p 2 A + 1 p 2 A + 1 p A + 1
79 72 77 78 syl2anc A p 0 A p 2 A + 1 p A + 1
80 70 79 mpbird A p 0 A p 2 A + 1
81 80 ex A p 0 A p 2 A + 1
82 81 ssrdv A 0 A 2 A + 1
83 47 82 ssfid A 0 A Fin
84 fzfid A p 0 A 1 log A log p Fin
85 simprl A p 0 A k 1 log A log p p 0 A
86 85 elin2d A p 0 A k 1 log A log p p
87 elfznn k 1 log A log p k
88 87 ad2antll A p 0 A k 1 log A log p k
89 vmappw p k Λ p k = log p
90 86 88 89 syl2anc A p 0 A k 1 log A log p Λ p k = log p
91 51 adantrr A p 0 A k 1 log A log p p
92 91 nnrpd A p 0 A k 1 log A log p p +
93 92 relogcld A p 0 A k 1 log A log p log p
94 90 93 eqeltrd A p 0 A k 1 log A log p Λ p k
95 88 nnnn0d A p 0 A k 1 log A log p k 0
96 nnexpcl p k 0 p k
97 91 95 96 syl2anc A p 0 A k 1 log A log p p k
98 97 nnrpd A p 0 A k 1 log A log p p k +
99 98 relogcld A p 0 A k 1 log A log p log p k
100 ifcl log p k 0 if p k log p k 0
101 99 18 100 sylancl A p 0 A k 1 log A log p if p k log p k 0
102 94 101 resubcld A p 0 A k 1 log A log p Λ p k if p k log p k 0
103 102 97 nndivred A p 0 A k 1 log A log p Λ p k if p k log p k 0 p k
104 103 anassrs A p 0 A k 1 log A log p Λ p k if p k log p k 0 p k
105 84 104 fsumrecl A p 0 A k = 1 log A log p Λ p k if p k log p k 0 p k
106 83 105 fsumrecl A p 0 A k = 1 log A log p Λ p k if p k log p k 0 p k
107 51 nnrpd A p 0 A p +
108 107 relogcld A p 0 A log p
109 uz2m1nn p 2 p 1
110 72 109 syl A p 0 A p 1
111 51 110 nnmulcld A p 0 A p p 1
112 108 111 nndivred A p 0 A log p p p 1
113 83 112 fsumrecl A p 0 A log p p p 1
114 2re 2
115 114 a1i A 2
116 18 a1i A p 0 A 0
117 51 nngt0d A p 0 A 0 < p
118 116 52 53 117 64 ltletrd A p 0 A 0 < A
119 53 118 elrpd A p 0 A A +
120 119 relogcld A p 0 A log A
121 prmgt1 p 1 < p
122 49 121 syl A p 0 A 1 < p
123 52 122 rplogcld A p 0 A log p +
124 120 123 rerpdivcld A p 0 A log A log p
125 123 rpcnd A p 0 A log p
126 125 mulid2d A p 0 A 1 log p = log p
127 107 119 logled A p 0 A p A log p log A
128 64 127 mpbid A p 0 A log p log A
129 126 128 eqbrtrd A p 0 A 1 log p log A
130 1re 1
131 130 a1i A p 0 A 1
132 131 120 123 lemuldivd A p 0 A 1 log p log A 1 log A log p
133 129 132 mpbid A p 0 A 1 log A log p
134 flge1nn log A log p 1 log A log p log A log p
135 124 133 134 syl2anc A p 0 A log A log p
136 nnuz = 1
137 135 136 eleqtrdi A p 0 A log A log p 1
138 103 recnd A p 0 A k 1 log A log p Λ p k if p k log p k 0 p k
139 138 anassrs A p 0 A k 1 log A log p Λ p k if p k log p k 0 p k
140 oveq2 k = 1 p k = p 1
141 140 fveq2d k = 1 Λ p k = Λ p 1
142 140 eleq1d k = 1 p k p 1
143 140 fveq2d k = 1 log p k = log p 1
144 142 143 ifbieq1d k = 1 if p k log p k 0 = if p 1 log p 1 0
145 141 144 oveq12d k = 1 Λ p k if p k log p k 0 = Λ p 1 if p 1 log p 1 0
146 145 140 oveq12d k = 1 Λ p k if p k log p k 0 p k = Λ p 1 if p 1 log p 1 0 p 1
147 137 139 146 fsum1p A p 0 A k = 1 log A log p Λ p k if p k log p k 0 p k = Λ p 1 if p 1 log p 1 0 p 1 + k = 1 + 1 log A log p Λ p k if p k log p k 0 p k
148 51 nncnd A p 0 A p
149 148 exp1d A p 0 A p 1 = p
150 149 fveq2d A p 0 A Λ p 1 = Λ p
151 vmaprm p Λ p = log p
152 49 151 syl A p 0 A Λ p = log p
153 150 152 eqtrd A p 0 A Λ p 1 = log p
154 149 49 eqeltrd A p 0 A p 1
155 154 iftrued A p 0 A if p 1 log p 1 0 = log p 1
156 149 fveq2d A p 0 A log p 1 = log p
157 155 156 eqtrd A p 0 A if p 1 log p 1 0 = log p
158 153 157 oveq12d A p 0 A Λ p 1 if p 1 log p 1 0 = log p log p
159 125 subidd A p 0 A log p log p = 0
160 158 159 eqtrd A p 0 A Λ p 1 if p 1 log p 1 0 = 0
161 160 149 oveq12d A p 0 A Λ p 1 if p 1 log p 1 0 p 1 = 0 p
162 107 rpcnne0d A p 0 A p p 0
163 div0 p p 0 0 p = 0
164 162 163 syl A p 0 A 0 p = 0
165 161 164 eqtrd A p 0 A Λ p 1 if p 1 log p 1 0 p 1 = 0
166 1p1e2 1 + 1 = 2
167 166 oveq1i 1 + 1 log A log p = 2 log A log p
168 167 a1i A p 0 A 1 + 1 log A log p = 2 log A log p
169 elfzuz k 2 log A log p k 2
170 eluz2nn k 2 k
171 169 170 syl k 2 log A log p k
172 171 167 eleq2s k 1 + 1 log A log p k
173 49 172 89 syl2an A p 0 A k 1 + 1 log A log p Λ p k = log p
174 51 adantr A p 0 A k 1 + 1 log A log p p
175 nnq p p
176 174 175 syl A p 0 A k 1 + 1 log A log p p
177 169 167 eleq2s k 1 + 1 log A log p k 2
178 177 adantl A p 0 A k 1 + 1 log A log p k 2
179 expnprm p k 2 ¬ p k
180 176 178 179 syl2anc A p 0 A k 1 + 1 log A log p ¬ p k
181 180 iffalsed A p 0 A k 1 + 1 log A log p if p k log p k 0 = 0
182 173 181 oveq12d A p 0 A k 1 + 1 log A log p Λ p k if p k log p k 0 = log p 0
183 125 subid1d A p 0 A log p 0 = log p
184 183 adantr A p 0 A k 1 + 1 log A log p log p 0 = log p
185 182 184 eqtrd A p 0 A k 1 + 1 log A log p Λ p k if p k log p k 0 = log p
186 185 oveq1d A p 0 A k 1 + 1 log A log p Λ p k if p k log p k 0 p k = log p p k
187 168 186 sumeq12dv A p 0 A k = 1 + 1 log A log p Λ p k if p k log p k 0 p k = k = 2 log A log p log p p k
188 165 187 oveq12d A p 0 A Λ p 1 if p 1 log p 1 0 p 1 + k = 1 + 1 log A log p Λ p k if p k log p k 0 p k = 0 + k = 2 log A log p log p p k
189 fzfid A p 0 A 2 log A log p Fin
190 108 adantr A p 0 A k log p
191 nnnn0 k k 0
192 51 191 96 syl2an A p 0 A k p k
193 190 192 nndivred A p 0 A k log p p k
194 171 193 sylan2 A p 0 A k 2 log A log p log p p k
195 189 194 fsumrecl A p 0 A k = 2 log A log p log p p k
196 195 recnd A p 0 A k = 2 log A log p log p p k
197 196 addid2d A p 0 A 0 + k = 2 log A log p log p p k = k = 2 log A log p log p p k
198 147 188 197 3eqtrd A p 0 A k = 1 log A log p Λ p k if p k log p k 0 p k = k = 2 log A log p log p p k
199 107 rpreccld A p 0 A 1 p +
200 124 flcld A p 0 A log A log p
201 200 peano2zd A p 0 A log A log p + 1
202 199 201 rpexpcld A p 0 A 1 p log A log p + 1 +
203 202 rpge0d A p 0 A 0 1 p log A log p + 1
204 51 nnrecred A p 0 A 1 p
205 204 resqcld A p 0 A 1 p 2
206 135 peano2nnd A p 0 A log A log p + 1
207 206 nnnn0d A p 0 A log A log p + 1 0
208 204 207 reexpcld A p 0 A 1 p log A log p + 1
209 205 208 subge02d A p 0 A 0 1 p log A log p + 1 1 p 2 1 p log A log p + 1 1 p 2
210 203 209 mpbid A p 0 A 1 p 2 1 p log A log p + 1 1 p 2
211 110 nnrpd A p 0 A p 1 +
212 211 rpcnne0d A p 0 A p 1 p 1 0
213 199 rpcnd A p 0 A 1 p
214 dmdcan p 1 p 1 0 p p 0 1 p p 1 p 1 p p 1 = 1 p p
215 212 162 213 214 syl3anc A p 0 A p 1 p 1 p p 1 = 1 p p
216 131 recnd A p 0 A 1
217 divsubdir p 1 p p 0 p 1 p = p p 1 p
218 148 216 162 217 syl3anc A p 0 A p 1 p = p p 1 p
219 divid p p 0 p p = 1
220 162 219 syl A p 0 A p p = 1
221 220 oveq1d A p 0 A p p 1 p = 1 1 p
222 218 221 eqtrd A p 0 A p 1 p = 1 1 p
223 divdiv1 1 p p 0 p 1 p 1 0 1 p p 1 = 1 p p 1
224 216 162 212 223 syl3anc A p 0 A 1 p p 1 = 1 p p 1
225 222 224 oveq12d A p 0 A p 1 p 1 p p 1 = 1 1 p 1 p p 1
226 51 nnne0d A p 0 A p 0
227 213 148 226 divrecd A p 0 A 1 p p = 1 p 1 p
228 213 sqvald A p 0 A 1 p 2 = 1 p 1 p
229 227 228 eqtr4d A p 0 A 1 p p = 1 p 2
230 215 225 229 3eqtr3d A p 0 A 1 1 p 1 p p 1 = 1 p 2
231 210 230 breqtrrd A p 0 A 1 p 2 1 p log A log p + 1 1 1 p 1 p p 1
232 205 208 resubcld A p 0 A 1 p 2 1 p log A log p + 1
233 111 nnrecred A p 0 A 1 p p 1
234 resubcl 1 1 p 1 1 p
235 130 204 234 sylancr A p 0 A 1 1 p
236 recgt1 p 0 < p 1 < p 1 p < 1
237 52 117 236 syl2anc A p 0 A 1 < p 1 p < 1
238 122 237 mpbid A p 0 A 1 p < 1
239 posdif 1 p 1 1 p < 1 0 < 1 1 p
240 204 130 239 sylancl A p 0 A 1 p < 1 0 < 1 1 p
241 238 240 mpbid A p 0 A 0 < 1 1 p
242 ledivmul 1 p 2 1 p log A log p + 1 1 p p 1 1 1 p 0 < 1 1 p 1 p 2 1 p log A log p + 1 1 1 p 1 p p 1 1 p 2 1 p log A log p + 1 1 1 p 1 p p 1
243 232 233 235 241 242 syl112anc A p 0 A 1 p 2 1 p log A log p + 1 1 1 p 1 p p 1 1 p 2 1 p log A log p + 1 1 1 p 1 p p 1
244 231 243 mpbird A p 0 A 1 p 2 1 p log A log p + 1 1 1 p 1 p p 1
245 235 241 elrpd A p 0 A 1 1 p +
246 232 245 rerpdivcld A p 0 A 1 p 2 1 p log A log p + 1 1 1 p
247 246 233 123 lemul2d A p 0 A 1 p 2 1 p log A log p + 1 1 1 p 1 p p 1 log p 1 p 2 1 p log A log p + 1 1 1 p log p 1 p p 1
248 244 247 mpbid A p 0 A log p 1 p 2 1 p log A log p + 1 1 1 p log p 1 p p 1
249 125 adantr A p 0 A k log p
250 192 nncnd A p 0 A k p k
251 192 nnne0d A p 0 A k p k 0
252 249 250 251 divrecd A p 0 A k log p p k = log p 1 p k
253 148 adantr A p 0 A k p
254 51 adantr A p 0 A k p
255 254 nnne0d A p 0 A k p 0
256 nnz k k
257 256 adantl A p 0 A k k
258 253 255 257 exprecd A p 0 A k 1 p k = 1 p k
259 258 oveq2d A p 0 A k log p 1 p k = log p 1 p k
260 252 259 eqtr4d A p 0 A k log p p k = log p 1 p k
261 171 260 sylan2 A p 0 A k 2 log A log p log p p k = log p 1 p k
262 261 sumeq2dv A p 0 A k = 2 log A log p log p p k = k = 2 log A log p log p 1 p k
263 171 nnnn0d k 2 log A log p k 0
264 expcl 1 p k 0 1 p k
265 213 263 264 syl2an A p 0 A k 2 log A log p 1 p k
266 189 125 265 fsummulc2 A p 0 A log p k = 2 log A log p 1 p k = k = 2 log A log p log p 1 p k
267 fzval3 log A log p 2 log A log p = 2 ..^ log A log p + 1
268 200 267 syl A p 0 A 2 log A log p = 2 ..^ log A log p + 1
269 268 sumeq1d A p 0 A k = 2 log A log p 1 p k = k 2 ..^ log A log p + 1 1 p k
270 204 238 ltned A p 0 A 1 p 1
271 2nn0 2 0
272 271 a1i A p 0 A 2 0
273 eluzp1p1 log A log p 1 log A log p + 1 1 + 1
274 137 273 syl A p 0 A log A log p + 1 1 + 1
275 df-2 2 = 1 + 1
276 275 fveq2i 2 = 1 + 1
277 274 276 eleqtrrdi A p 0 A log A log p + 1 2
278 213 270 272 277 geoserg A p 0 A k 2 ..^ log A log p + 1 1 p k = 1 p 2 1 p log A log p + 1 1 1 p
279 269 278 eqtrd A p 0 A k = 2 log A log p 1 p k = 1 p 2 1 p log A log p + 1 1 1 p
280 279 oveq2d A p 0 A log p k = 2 log A log p 1 p k = log p 1 p 2 1 p log A log p + 1 1 1 p
281 262 266 280 3eqtr2d A p 0 A k = 2 log A log p log p p k = log p 1 p 2 1 p log A log p + 1 1 1 p
282 111 nncnd A p 0 A p p 1
283 111 nnne0d A p 0 A p p 1 0
284 125 282 283 divrecd A p 0 A log p p p 1 = log p 1 p p 1
285 248 281 284 3brtr4d A p 0 A k = 2 log A log p log p p k log p p p 1
286 198 285 eqbrtrd A p 0 A k = 1 log A log p Λ p k if p k log p k 0 p k log p p p 1
287 83 105 112 286 fsumle A p 0 A k = 1 log A log p Λ p k if p k log p k 0 p k p 0 A log p p p 1
288 elfzuz p 2 A + 1 p 2
289 eluz2nn p 2 p
290 288 289 syl p 2 A + 1 p
291 290 adantl A p 2 A + 1 p
292 291 nnred A p 2 A + 1 p
293 288 adantl A p 2 A + 1 p 2
294 eluz2gt1 p 2 1 < p
295 293 294 syl A p 2 A + 1 1 < p
296 292 295 rplogcld A p 2 A + 1 log p +
297 293 109 syl A p 2 A + 1 p 1
298 291 297 nnmulcld A p 2 A + 1 p p 1
299 298 nnrpd A p 2 A + 1 p p 1 +
300 296 299 rpdivcld A p 2 A + 1 log p p p 1 +
301 300 rpred A p 2 A + 1 log p p p 1
302 47 301 fsumrecl A p = 2 A + 1 log p p p 1
303 300 rpge0d A p 2 A + 1 0 log p p p 1
304 47 301 303 82 fsumless A p 0 A log p p p 1 p = 2 A + 1 log p p p 1
305 rplogsumlem1 A + 1 p = 2 A + 1 log p p p 1 2
306 75 305 syl A p = 2 A + 1 log p p p 1 2
307 113 302 115 304 306 letrd A p 0 A log p p p 1 2
308 106 113 115 287 307 letrd A p 0 A k = 1 log A log p Λ p k if p k log p k 0 p k 2
309 46 308 eqbrtrd A n = 1 A Λ n if n log n 0 n 2