Metamath Proof Explorer


Theorem logdivbnd

Description: A bound on a sum of logs, used in pntlemk . This is not as precise as logdivsum in its asymptotic behavior, but it is valid for all N and does not require a limit value. (Contributed by Mario Carneiro, 13-Apr-2016)

Ref Expression
Assertion logdivbnd N n = 1 N log n n log N + 1 2 2

Proof

Step Hyp Ref Expression
1 2re 2
2 fzfid N 1 N Fin
3 elfzuz n 1 N n 1
4 3 adantl N n 1 N n 1
5 nnuz = 1
6 4 5 eleqtrrdi N n 1 N n
7 6 nnrpd N n 1 N n +
8 7 relogcld N n 1 N log n
9 8 6 nndivred N n 1 N log n n
10 2 9 fsumrecl N n = 1 N log n n
11 remulcl 2 n = 1 N log n n 2 n = 1 N log n n
12 1 10 11 sylancr N 2 n = 1 N log n n
13 elfznn i 1 N i
14 13 adantl N i 1 N i
15 14 nnrecred N i 1 N 1 i
16 2 15 fsumrecl N i = 1 N 1 i
17 16 resqcld N i = 1 N 1 i 2
18 nnrp N N +
19 18 relogcld N log N
20 peano2re log N log N + 1
21 19 20 syl N log N + 1
22 21 resqcld N log N + 1 2
23 10 recnd N n = 1 N log n n
24 23 2timesd N 2 n = 1 N log n n = n = 1 N log n n + n = 1 N log n n
25 fzfid N n 1 N 1 n Fin
26 elfznn i 1 n i
27 26 adantl N n 1 N i 1 n i
28 27 nnrecred N n 1 N i 1 n 1 i
29 25 28 fsumrecl N n 1 N i = 1 n 1 i
30 29 6 nndivred N n 1 N i = 1 n 1 i n
31 2 30 fsumrecl N n = 1 N i = 1 n 1 i n
32 fzfid N n 1 N 1 n 1 Fin
33 elfznn i 1 n 1 i
34 33 adantl N n 1 N i 1 n 1 i
35 34 nnrecred N n 1 N i 1 n 1 1 i
36 32 35 fsumrecl N n 1 N i = 1 n 1 1 i
37 36 6 nndivred N n 1 N i = 1 n 1 1 i n
38 2 37 fsumrecl N n = 1 N i = 1 n 1 1 i n
39 6 nncnd N n 1 N n
40 ax-1cn 1
41 npcan n 1 n - 1 + 1 = n
42 39 40 41 sylancl N n 1 N n - 1 + 1 = n
43 42 fveq2d N n 1 N log n - 1 + 1 = log n
44 43 oveq2d N n 1 N i = 1 n 1 1 i log n - 1 + 1 = i = 1 n 1 1 i log n
45 nnm1nn0 n n 1 0
46 harmonicbnd3 n 1 0 i = 1 n 1 1 i log n - 1 + 1 0 γ
47 6 45 46 3syl N n 1 N i = 1 n 1 1 i log n - 1 + 1 0 γ
48 44 47 eqeltrrd N n 1 N i = 1 n 1 1 i log n 0 γ
49 0re 0
50 emre γ
51 49 50 elicc2i i = 1 n 1 1 i log n 0 γ i = 1 n 1 1 i log n 0 i = 1 n 1 1 i log n i = 1 n 1 1 i log n γ
52 51 simp2bi i = 1 n 1 1 i log n 0 γ 0 i = 1 n 1 1 i log n
53 48 52 syl N n 1 N 0 i = 1 n 1 1 i log n
54 36 8 subge0d N n 1 N 0 i = 1 n 1 1 i log n log n i = 1 n 1 1 i
55 53 54 mpbid N n 1 N log n i = 1 n 1 1 i
56 8 36 7 55 lediv1dd N n 1 N log n n i = 1 n 1 1 i n
57 27 nnrpd N n 1 N i 1 n i +
58 57 rpreccld N n 1 N i 1 n 1 i +
59 58 rpge0d N n 1 N i 1 n 0 1 i
60 elfzelz n 1 N n
61 60 adantl N n 1 N n
62 peano2zm n n 1
63 61 62 syl N n 1 N n 1
64 6 nnred N n 1 N n
65 64 lem1d N n 1 N n 1 n
66 eluz2 n n 1 n 1 n n 1 n
67 63 61 65 66 syl3anbrc N n 1 N n n 1
68 fzss2 n n 1 1 n 1 1 n
69 67 68 syl N n 1 N 1 n 1 1 n
70 25 28 59 69 fsumless N n 1 N i = 1 n 1 1 i i = 1 n 1 i
71 6 nngt0d N n 1 N 0 < n
72 lediv1 i = 1 n 1 1 i i = 1 n 1 i n 0 < n i = 1 n 1 1 i i = 1 n 1 i i = 1 n 1 1 i n i = 1 n 1 i n
73 36 29 64 71 72 syl112anc N n 1 N i = 1 n 1 1 i i = 1 n 1 i i = 1 n 1 1 i n i = 1 n 1 i n
74 70 73 mpbid N n 1 N i = 1 n 1 1 i n i = 1 n 1 i n
75 9 37 30 56 74 letrd N n 1 N log n n i = 1 n 1 i n
76 2 9 30 75 fsumle N n = 1 N log n n n = 1 N i = 1 n 1 i n
77 2 9 37 56 fsumle N n = 1 N log n n n = 1 N i = 1 n 1 1 i n
78 10 10 31 38 76 77 le2addd N n = 1 N log n n + n = 1 N log n n n = 1 N i = 1 n 1 i n + n = 1 N i = 1 n 1 1 i n
79 oveq1 m = n m 1 = n 1
80 79 oveq2d m = n 1 m 1 = 1 n 1
81 80 sumeq1d m = n i = 1 m 1 1 i = i = 1 n 1 1 i
82 81 81 jca m = n i = 1 m 1 1 i = i = 1 n 1 1 i i = 1 m 1 1 i = i = 1 n 1 1 i
83 oveq1 m = n + 1 m 1 = n + 1 - 1
84 83 oveq2d m = n + 1 1 m 1 = 1 n + 1 - 1
85 84 sumeq1d m = n + 1 i = 1 m 1 1 i = i = 1 n + 1 - 1 1 i
86 85 85 jca m = n + 1 i = 1 m 1 1 i = i = 1 n + 1 - 1 1 i i = 1 m 1 1 i = i = 1 n + 1 - 1 1 i
87 oveq1 m = 1 m 1 = 1 1
88 1m1e0 1 1 = 0
89 87 88 eqtrdi m = 1 m 1 = 0
90 89 oveq2d m = 1 1 m 1 = 1 0
91 fz10 1 0 =
92 90 91 eqtrdi m = 1 1 m 1 =
93 92 sumeq1d m = 1 i = 1 m 1 1 i = i 1 i
94 sum0 i 1 i = 0
95 93 94 eqtrdi m = 1 i = 1 m 1 1 i = 0
96 95 95 jca m = 1 i = 1 m 1 1 i = 0 i = 1 m 1 1 i = 0
97 oveq1 m = N + 1 m 1 = N + 1 - 1
98 97 oveq2d m = N + 1 1 m 1 = 1 N + 1 - 1
99 98 sumeq1d m = N + 1 i = 1 m 1 1 i = i = 1 N + 1 - 1 1 i
100 99 99 jca m = N + 1 i = 1 m 1 1 i = i = 1 N + 1 - 1 1 i i = 1 m 1 1 i = i = 1 N + 1 - 1 1 i
101 peano2nn N N + 1
102 101 5 eleqtrdi N N + 1 1
103 fzfid N m 1 N + 1 1 m 1 Fin
104 elfznn i 1 m 1 i
105 104 adantl N m 1 N + 1 i 1 m 1 i
106 105 nnrecred N m 1 N + 1 i 1 m 1 1 i
107 103 106 fsumrecl N m 1 N + 1 i = 1 m 1 1 i
108 107 recnd N m 1 N + 1 i = 1 m 1 1 i
109 82 86 96 100 102 108 108 fsumparts N n 1 ..^ N + 1 i = 1 n 1 1 i i = 1 n + 1 - 1 1 i i = 1 n 1 1 i = i = 1 N + 1 - 1 1 i i = 1 N + 1 - 1 1 i - 0 0 - n 1 ..^ N + 1 i = 1 n + 1 - 1 1 i i = 1 n 1 1 i i = 1 n + 1 - 1 1 i
110 nnz N N
111 fzval3 N 1 N = 1 ..^ N + 1
112 110 111 syl N 1 N = 1 ..^ N + 1
113 112 eqcomd N 1 ..^ N + 1 = 1 N
114 36 recnd N n 1 N i = 1 n 1 1 i
115 6 nnrecred N n 1 N 1 n
116 115 recnd N n 1 N 1 n
117 pncan n 1 n + 1 - 1 = n
118 39 40 117 sylancl N n 1 N n + 1 - 1 = n
119 118 oveq2d N n 1 N 1 n + 1 - 1 = 1 n
120 119 sumeq1d N n 1 N i = 1 n + 1 - 1 1 i = i = 1 n 1 i
121 28 recnd N n 1 N i 1 n 1 i
122 oveq2 i = n 1 i = 1 n
123 4 121 122 fsumm1 N n 1 N i = 1 n 1 i = i = 1 n 1 1 i + 1 n
124 120 123 eqtrd N n 1 N i = 1 n + 1 - 1 1 i = i = 1 n 1 1 i + 1 n
125 114 116 124 mvrladdd N n 1 N i = 1 n + 1 - 1 1 i i = 1 n 1 1 i = 1 n
126 125 oveq2d N n 1 N i = 1 n 1 1 i i = 1 n + 1 - 1 1 i i = 1 n 1 1 i = i = 1 n 1 1 i 1 n
127 6 nnne0d N n 1 N n 0
128 114 39 127 divrecd N n 1 N i = 1 n 1 1 i n = i = 1 n 1 1 i 1 n
129 126 128 eqtr4d N n 1 N i = 1 n 1 1 i i = 1 n + 1 - 1 1 i i = 1 n 1 1 i = i = 1 n 1 1 i n
130 113 129 sumeq12rdv N n 1 ..^ N + 1 i = 1 n 1 1 i i = 1 n + 1 - 1 1 i i = 1 n 1 1 i = n = 1 N i = 1 n 1 1 i n
131 nncn N N
132 pncan N 1 N + 1 - 1 = N
133 131 40 132 sylancl N N + 1 - 1 = N
134 133 oveq2d N 1 N + 1 - 1 = 1 N
135 134 sumeq1d N i = 1 N + 1 - 1 1 i = i = 1 N 1 i
136 135 135 oveq12d N i = 1 N + 1 - 1 1 i i = 1 N + 1 - 1 1 i = i = 1 N 1 i i = 1 N 1 i
137 16 recnd N i = 1 N 1 i
138 137 sqvald N i = 1 N 1 i 2 = i = 1 N 1 i i = 1 N 1 i
139 136 138 eqtr4d N i = 1 N + 1 - 1 1 i i = 1 N + 1 - 1 1 i = i = 1 N 1 i 2
140 0cn 0
141 140 mul01i 0 0 = 0
142 141 a1i N 0 0 = 0
143 139 142 oveq12d N i = 1 N + 1 - 1 1 i i = 1 N + 1 - 1 1 i 0 0 = i = 1 N 1 i 2 0
144 137 sqcld N i = 1 N 1 i 2
145 144 subid1d N i = 1 N 1 i 2 0 = i = 1 N 1 i 2
146 143 145 eqtrd N i = 1 N + 1 - 1 1 i i = 1 N + 1 - 1 1 i 0 0 = i = 1 N 1 i 2
147 125 120 oveq12d N n 1 N i = 1 n + 1 - 1 1 i i = 1 n 1 1 i i = 1 n + 1 - 1 1 i = 1 n i = 1 n 1 i
148 29 recnd N n 1 N i = 1 n 1 i
149 148 39 127 divrec2d N n 1 N i = 1 n 1 i n = 1 n i = 1 n 1 i
150 147 149 eqtr4d N n 1 N i = 1 n + 1 - 1 1 i i = 1 n 1 1 i i = 1 n + 1 - 1 1 i = i = 1 n 1 i n
151 113 150 sumeq12rdv N n 1 ..^ N + 1 i = 1 n + 1 - 1 1 i i = 1 n 1 1 i i = 1 n + 1 - 1 1 i = n = 1 N i = 1 n 1 i n
152 146 151 oveq12d N i = 1 N + 1 - 1 1 i i = 1 N + 1 - 1 1 i - 0 0 - n 1 ..^ N + 1 i = 1 n + 1 - 1 1 i i = 1 n 1 1 i i = 1 n + 1 - 1 1 i = i = 1 N 1 i 2 n = 1 N i = 1 n 1 i n
153 109 130 152 3eqtr3rd N i = 1 N 1 i 2 n = 1 N i = 1 n 1 i n = n = 1 N i = 1 n 1 1 i n
154 31 recnd N n = 1 N i = 1 n 1 i n
155 38 recnd N n = 1 N i = 1 n 1 1 i n
156 144 154 155 subaddd N i = 1 N 1 i 2 n = 1 N i = 1 n 1 i n = n = 1 N i = 1 n 1 1 i n n = 1 N i = 1 n 1 i n + n = 1 N i = 1 n 1 1 i n = i = 1 N 1 i 2
157 153 156 mpbid N n = 1 N i = 1 n 1 i n + n = 1 N i = 1 n 1 1 i n = i = 1 N 1 i 2
158 78 157 breqtrd N n = 1 N log n n + n = 1 N log n n i = 1 N 1 i 2
159 24 158 eqbrtrd N 2 n = 1 N log n n i = 1 N 1 i 2
160 flid N N = N
161 110 160 syl N N = N
162 161 oveq2d N 1 N = 1 N
163 162 sumeq1d N i = 1 N 1 i = i = 1 N 1 i
164 nnre N N
165 nnge1 N 1 N
166 harmonicubnd N 1 N i = 1 N 1 i log N + 1
167 164 165 166 syl2anc N i = 1 N 1 i log N + 1
168 163 167 eqbrtrrd N i = 1 N 1 i log N + 1
169 14 nnrpd N i 1 N i +
170 169 rpreccld N i 1 N 1 i +
171 170 rpge0d N i 1 N 0 1 i
172 2 15 171 fsumge0 N 0 i = 1 N 1 i
173 49 a1i N 0
174 log1 log 1 = 0
175 1rp 1 +
176 logleb 1 + N + 1 N log 1 log N
177 175 18 176 sylancr N 1 N log 1 log N
178 165 177 mpbid N log 1 log N
179 174 178 eqbrtrrid N 0 log N
180 19 lep1d N log N log N + 1
181 173 19 21 179 180 letrd N 0 log N + 1
182 16 21 172 181 le2sqd N i = 1 N 1 i log N + 1 i = 1 N 1 i 2 log N + 1 2
183 168 182 mpbid N i = 1 N 1 i 2 log N + 1 2
184 12 17 22 159 183 letrd N 2 n = 1 N log n n log N + 1 2
185 1 a1i N 2
186 2pos 0 < 2
187 186 a1i N 0 < 2
188 lemuldiv2 n = 1 N log n n log N + 1 2 2 0 < 2 2 n = 1 N log n n log N + 1 2 n = 1 N log n n log N + 1 2 2
189 10 22 185 187 188 syl112anc N 2 n = 1 N log n n log N + 1 2 n = 1 N log n n log N + 1 2 2
190 184 189 mpbid N n = 1 N log n n log N + 1 2 2