Metamath Proof Explorer


Theorem rplogsumlem1

Description: Lemma for rplogsum . (Contributed by Mario Carneiro, 2-May-2016)

Ref Expression
Assertion rplogsumlem1 A n = 2 A log n n n 1 2

Proof

Step Hyp Ref Expression
1 fzfid A 2 A Fin
2 elfzuz n 2 A n 2
3 eluz2nn n 2 n
4 2 3 syl n 2 A n
5 4 adantl A n 2 A n
6 5 nnrpd A n 2 A n +
7 6 relogcld A n 2 A log n
8 2 adantl A n 2 A n 2
9 uz2m1nn n 2 n 1
10 8 9 syl A n 2 A n 1
11 5 10 nnmulcld A n 2 A n n 1
12 7 11 nndivred A n 2 A log n n n 1
13 1 12 fsumrecl A n = 2 A log n n n 1
14 2re 2
15 10 nnrpd A n 2 A n 1 +
16 15 rpsqrtcld A n 2 A n 1 +
17 rerpdivcl 2 n 1 + 2 n 1
18 14 16 17 sylancr A n 2 A 2 n 1
19 6 rpsqrtcld A n 2 A n +
20 rerpdivcl 2 n + 2 n
21 14 19 20 sylancr A n 2 A 2 n
22 18 21 resubcld A n 2 A 2 n 1 2 n
23 1 22 fsumrecl A n = 2 A 2 n 1 2 n
24 14 a1i A 2
25 16 rpred A n 2 A n 1
26 5 nnred A n 2 A n
27 peano2rem n n 1
28 26 27 syl A n 2 A n 1
29 26 28 remulcld A n 2 A n n 1
30 29 22 remulcld A n 2 A n n 1 2 n 1 2 n
31 5 nncnd A n 2 A n
32 ax-1cn 1
33 npcan n 1 n - 1 + 1 = n
34 31 32 33 sylancl A n 2 A n - 1 + 1 = n
35 34 fveq2d A n 2 A log n - 1 + 1 = log n
36 15 rpge0d A n 2 A 0 n 1
37 loglesqrt n 1 0 n 1 log n - 1 + 1 n 1
38 28 36 37 syl2anc A n 2 A log n - 1 + 1 n 1
39 35 38 eqbrtrrd A n 2 A log n n 1
40 19 rpred A n 2 A n
41 40 25 readdcld A n 2 A n + n 1
42 remulcl n 2 n 2
43 40 14 42 sylancl A n 2 A n 2
44 40 25 resubcld A n 2 A n n 1
45 26 lem1d A n 2 A n 1 n
46 6 rpge0d A n 2 A 0 n
47 28 36 26 46 sqrtled A n 2 A n 1 n n 1 n
48 45 47 mpbid A n 2 A n 1 n
49 40 25 subge0d A n 2 A 0 n n 1 n 1 n
50 48 49 mpbird A n 2 A 0 n n 1
51 25 40 40 48 leadd2dd A n 2 A n + n 1 n + n
52 19 rpcnd A n 2 A n
53 52 times2d A n 2 A n 2 = n + n
54 51 53 breqtrrd A n 2 A n + n 1 n 2
55 41 43 44 50 54 lemul1ad A n 2 A n + n 1 n n 1 n 2 n n 1
56 31 sqsqrtd A n 2 A n 2 = n
57 subcl n 1 n 1
58 31 32 57 sylancl A n 2 A n 1
59 58 sqsqrtd A n 2 A n 1 2 = n 1
60 56 59 oveq12d A n 2 A n 2 n 1 2 = n n 1
61 16 rpcnd A n 2 A n 1
62 subsq n n 1 n 2 n 1 2 = n + n 1 n n 1
63 52 61 62 syl2anc A n 2 A n 2 n 1 2 = n + n 1 n n 1
64 nncan n 1 n n 1 = 1
65 31 32 64 sylancl A n 2 A n n 1 = 1
66 60 63 65 3eqtr3d A n 2 A n + n 1 n n 1 = 1
67 2cn 2
68 67 a1i A n 2 A 2
69 44 recnd A n 2 A n n 1
70 52 68 69 mulassd A n 2 A n 2 n n 1 = n 2 n n 1
71 55 66 70 3brtr3d A n 2 A 1 n 2 n n 1
72 1red A n 2 A 1
73 remulcl 2 n n 1 2 n n 1
74 14 44 73 sylancr A n 2 A 2 n n 1
75 40 74 remulcld A n 2 A n 2 n n 1
76 72 75 16 lemul1d A n 2 A 1 n 2 n n 1 1 n 1 n 2 n n 1 n 1
77 71 76 mpbid A n 2 A 1 n 1 n 2 n n 1 n 1
78 61 mulid2d A n 2 A 1 n 1 = n 1
79 74 recnd A n 2 A 2 n n 1
80 52 79 61 mul32d A n 2 A n 2 n n 1 n 1 = n n 1 2 n n 1
81 77 78 80 3brtr3d A n 2 A n 1 n n 1 2 n n 1
82 remsqsqrt n 0 n n n = n
83 26 46 82 syl2anc A n 2 A n n = n
84 remsqsqrt n 1 0 n 1 n 1 n 1 = n 1
85 28 36 84 syl2anc A n 2 A n 1 n 1 = n 1
86 83 85 oveq12d A n 2 A n n n 1 n 1 = n n 1
87 52 52 61 61 mul4d A n 2 A n n n 1 n 1 = n n 1 n n 1
88 86 87 eqtr3d A n 2 A n n 1 = n n 1 n n 1
89 16 rpcnne0d A n 2 A n 1 n 1 0
90 19 rpcnne0d A n 2 A n n 0
91 divsubdiv 2 2 n 1 n 1 0 n n 0 2 n 1 2 n = 2 n 2 n 1 n 1 n
92 68 68 89 90 91 syl22anc A n 2 A 2 n 1 2 n = 2 n 2 n 1 n 1 n
93 68 52 61 subdid A n 2 A 2 n n 1 = 2 n 2 n 1
94 52 61 mulcomd A n 2 A n n 1 = n 1 n
95 93 94 oveq12d A n 2 A 2 n n 1 n n 1 = 2 n 2 n 1 n 1 n
96 92 95 eqtr4d A n 2 A 2 n 1 2 n = 2 n n 1 n n 1
97 88 96 oveq12d A n 2 A n n 1 2 n 1 2 n = n n 1 n n 1 2 n n 1 n n 1
98 52 61 mulcld A n 2 A n n 1
99 19 16 rpmulcld A n 2 A n n 1 +
100 74 99 rerpdivcld A n 2 A 2 n n 1 n n 1
101 100 recnd A n 2 A 2 n n 1 n n 1
102 98 98 101 mulassd A n 2 A n n 1 n n 1 2 n n 1 n n 1 = n n 1 n n 1 2 n n 1 n n 1
103 99 rpne0d A n 2 A n n 1 0
104 79 98 103 divcan2d A n 2 A n n 1 2 n n 1 n n 1 = 2 n n 1
105 104 oveq2d A n 2 A n n 1 n n 1 2 n n 1 n n 1 = n n 1 2 n n 1
106 97 102 105 3eqtrd A n 2 A n n 1 2 n 1 2 n = n n 1 2 n n 1
107 81 106 breqtrrd A n 2 A n 1 n n 1 2 n 1 2 n
108 7 25 30 39 107 letrd A n 2 A log n n n 1 2 n 1 2 n
109 11 nngt0d A n 2 A 0 < n n 1
110 ledivmul log n 2 n 1 2 n n n 1 0 < n n 1 log n n n 1 2 n 1 2 n log n n n 1 2 n 1 2 n
111 7 22 29 109 110 syl112anc A n 2 A log n n n 1 2 n 1 2 n log n n n 1 2 n 1 2 n
112 108 111 mpbird A n 2 A log n n n 1 2 n 1 2 n
113 1 12 22 112 fsumle A n = 2 A log n n n 1 n = 2 A 2 n 1 2 n
114 fvoveq1 k = n k 1 = n 1
115 114 oveq2d k = n 2 k 1 = 2 n 1
116 fvoveq1 k = n + 1 k 1 = n + 1 - 1
117 116 oveq2d k = n + 1 2 k 1 = 2 n + 1 - 1
118 oveq1 k = 2 k 1 = 2 1
119 2m1e1 2 1 = 1
120 118 119 eqtrdi k = 2 k 1 = 1
121 120 fveq2d k = 2 k 1 = 1
122 sqrt1 1 = 1
123 121 122 eqtrdi k = 2 k 1 = 1
124 123 oveq2d k = 2 2 k 1 = 2 1
125 67 div1i 2 1 = 2
126 124 125 eqtrdi k = 2 2 k 1 = 2
127 fvoveq1 k = A + 1 k 1 = A + 1 - 1
128 127 oveq2d k = A + 1 2 k 1 = 2 A + 1 - 1
129 nnz A A
130 eluzp1p1 A 1 A + 1 1 + 1
131 nnuz = 1
132 130 131 eleq2s A A + 1 1 + 1
133 df-2 2 = 1 + 1
134 133 fveq2i 2 = 1 + 1
135 132 134 eleqtrrdi A A + 1 2
136 elfzuz k 2 A + 1 k 2
137 uz2m1nn k 2 k 1
138 136 137 syl k 2 A + 1 k 1
139 138 adantl A k 2 A + 1 k 1
140 139 nnrpd A k 2 A + 1 k 1 +
141 140 rpsqrtcld A k 2 A + 1 k 1 +
142 rerpdivcl 2 k 1 + 2 k 1
143 14 141 142 sylancr A k 2 A + 1 2 k 1
144 143 recnd A k 2 A + 1 2 k 1
145 115 117 126 128 129 135 144 telfsum A n = 2 A 2 n 1 2 n + 1 - 1 = 2 2 A + 1 - 1
146 pncan n 1 n + 1 - 1 = n
147 31 32 146 sylancl A n 2 A n + 1 - 1 = n
148 147 fveq2d A n 2 A n + 1 - 1 = n
149 148 oveq2d A n 2 A 2 n + 1 - 1 = 2 n
150 149 oveq2d A n 2 A 2 n 1 2 n + 1 - 1 = 2 n 1 2 n
151 150 sumeq2dv A n = 2 A 2 n 1 2 n + 1 - 1 = n = 2 A 2 n 1 2 n
152 nncn A A
153 pncan A 1 A + 1 - 1 = A
154 152 32 153 sylancl A A + 1 - 1 = A
155 154 fveq2d A A + 1 - 1 = A
156 155 oveq2d A 2 A + 1 - 1 = 2 A
157 156 oveq2d A 2 2 A + 1 - 1 = 2 2 A
158 145 151 157 3eqtr3d A n = 2 A 2 n 1 2 n = 2 2 A
159 2rp 2 +
160 nnrp A A +
161 160 rpsqrtcld A A +
162 rpdivcl 2 + A + 2 A +
163 159 161 162 sylancr A 2 A +
164 163 rpge0d A 0 2 A
165 163 rpred A 2 A
166 subge02 2 2 A 0 2 A 2 2 A 2
167 14 165 166 sylancr A 0 2 A 2 2 A 2
168 164 167 mpbid A 2 2 A 2
169 158 168 eqbrtrd A n = 2 A 2 n 1 2 n 2
170 13 23 24 113 169 letrd A n = 2 A log n n n 1 2