Metamath Proof Explorer


Theorem basellem5

Description: Lemma for basel . Using vieta1 , we can calculate the sum of the roots of P as the quotient of the top two coefficients, and since the function T enumerates the roots, we are left with an equation that sums the cot ^ 2 function at the M different roots. (Contributed by Mario Carneiro, 29-Jul-2014)

Ref Expression
Hypotheses basel.n N = 2 M + 1
basel.p P = t j = 0 M ( N 2 j ) 1 M j t j
basel.t T = n 1 M tan n π N 2
Assertion basellem5 M k = 1 M tan k π N 2 = 2 M 2 M 1 6

Proof

Step Hyp Ref Expression
1 basel.n N = 2 M + 1
2 basel.p P = t j = 0 M ( N 2 j ) 1 M j t j
3 basel.t T = n 1 M tan n π N 2
4 eqid coeff P = coeff P
5 eqid deg P = deg P
6 eqid P -1 0 = P -1 0
7 1 2 basellem2 M P Poly deg P = M coeff P = n 0 ( N 2 n ) 1 M n
8 7 simp1d M P Poly
9 7 simp2d M deg P = M
10 nnnn0 M M 0
11 hashfz1 M 0 1 M = M
12 10 11 syl M 1 M = M
13 fzfid M 1 M Fin
14 1 2 3 basellem4 M T : 1 M 1-1 onto P -1 0
15 13 14 hasheqf1od M 1 M = P -1 0
16 9 12 15 3eqtr2rd M P -1 0 = deg P
17 id M M
18 9 17 eqeltrd M deg P
19 4 5 6 8 16 18 vieta1 M x P -1 0 x = coeff P deg P 1 coeff P deg P
20 id x = tan k π N 2 x = tan k π N 2
21 oveq1 n = k n π = k π
22 21 fvoveq1d n = k tan n π N = tan k π N
23 22 oveq1d n = k tan n π N 2 = tan k π N 2
24 ovex tan k π N 2 V
25 23 3 24 fvmpt k 1 M T k = tan k π N 2
26 25 adantl M k 1 M T k = tan k π N 2
27 cnvimass P -1 0 dom P
28 plyf P Poly P :
29 fdm P : dom P =
30 8 28 29 3syl M dom P =
31 27 30 sseqtrid M P -1 0
32 31 sselda M x P -1 0 x
33 20 13 14 26 32 fsumf1o M x P -1 0 x = k = 1 M tan k π N 2
34 7 simp3d M coeff P = n 0 ( N 2 n ) 1 M n
35 9 oveq1d M deg P 1 = M 1
36 34 35 fveq12d M coeff P deg P 1 = n 0 ( N 2 n ) 1 M n M 1
37 nnm1nn0 M M 1 0
38 oveq2 n = M 1 2 n = 2 M 1
39 38 oveq2d n = M 1 ( N 2 n ) = ( N 2 M 1 )
40 oveq2 n = M 1 M n = M M 1
41 40 oveq2d n = M 1 1 M n = 1 M M 1
42 39 41 oveq12d n = M 1 ( N 2 n ) 1 M n = ( N 2 M 1 ) 1 M M 1
43 eqid n 0 ( N 2 n ) 1 M n = n 0 ( N 2 n ) 1 M n
44 ovex ( N 2 M 1 ) 1 M M 1 V
45 42 43 44 fvmpt M 1 0 n 0 ( N 2 n ) 1 M n M 1 = ( N 2 M 1 ) 1 M M 1
46 37 45 syl M n 0 ( N 2 n ) 1 M n M 1 = ( N 2 M 1 ) 1 M M 1
47 nncn M M
48 ax-1cn 1
49 nncan M 1 M M 1 = 1
50 47 48 49 sylancl M M M 1 = 1
51 50 oveq2d M 1 M M 1 = 1 1
52 neg1cn 1
53 exp1 1 1 1 = 1
54 52 53 ax-mp 1 1 = 1
55 51 54 eqtrdi M 1 M M 1 = 1
56 55 oveq2d M ( N 2 M 1 ) 1 M M 1 = ( N 2 M 1 ) -1
57 2nn 2
58 nnmulcl 2 M 2 M
59 57 58 mpan M 2 M
60 59 peano2nnd M 2 M + 1
61 1 60 eqeltrid M N
62 61 nnnn0d M N 0
63 2z 2
64 nnz M M
65 peano2zm M M 1
66 64 65 syl M M 1
67 zmulcl 2 M 1 2 M 1
68 63 66 67 sylancr M 2 M 1
69 bccl N 0 2 M 1 ( N 2 M 1 ) 0
70 62 68 69 syl2anc M ( N 2 M 1 ) 0
71 70 nn0cnd M ( N 2 M 1 )
72 mulcom ( N 2 M 1 ) 1 ( N 2 M 1 ) -1 = -1 ( N 2 M 1 )
73 71 52 72 sylancl M ( N 2 M 1 ) -1 = -1 ( N 2 M 1 )
74 71 mulm1d M -1 ( N 2 M 1 ) = ( N 2 M 1 )
75 56 73 74 3eqtrd M ( N 2 M 1 ) 1 M M 1 = ( N 2 M 1 )
76 36 46 75 3eqtrd M coeff P deg P 1 = ( N 2 M 1 )
77 71 negcld M ( N 2 M 1 )
78 76 77 eqeltrd M coeff P deg P 1
79 34 9 fveq12d M coeff P deg P = n 0 ( N 2 n ) 1 M n M
80 oveq2 n = M 2 n = 2 M
81 80 oveq2d n = M ( N 2 n ) = ( N 2 M )
82 oveq2 n = M M n = M M
83 82 oveq2d n = M 1 M n = 1 M M
84 81 83 oveq12d n = M ( N 2 n ) 1 M n = ( N 2 M ) 1 M M
85 ovex ( N 2 M ) 1 M M V
86 84 43 85 fvmpt M 0 n 0 ( N 2 n ) 1 M n M = ( N 2 M ) 1 M M
87 10 86 syl M n 0 ( N 2 n ) 1 M n M = ( N 2 M ) 1 M M
88 47 subidd M M M = 0
89 88 oveq2d M 1 M M = 1 0
90 exp0 1 1 0 = 1
91 52 90 ax-mp 1 0 = 1
92 89 91 eqtrdi M 1 M M = 1
93 92 oveq2d M ( N 2 M ) 1 M M = ( N 2 M ) 1
94 fz1ssfz0 1 N 0 N
95 59 nnred M 2 M
96 95 lep1d M 2 M 2 M + 1
97 96 1 breqtrrdi M 2 M N
98 nnuz = 1
99 59 98 eleqtrdi M 2 M 1
100 61 nnzd M N
101 elfz5 2 M 1 N 2 M 1 N 2 M N
102 99 100 101 syl2anc M 2 M 1 N 2 M N
103 97 102 mpbird M 2 M 1 N
104 94 103 sselid M 2 M 0 N
105 bccl2 2 M 0 N ( N 2 M )
106 104 105 syl M ( N 2 M )
107 106 nncnd M ( N 2 M )
108 107 mulid1d M ( N 2 M ) 1 = ( N 2 M )
109 93 108 eqtrd M ( N 2 M ) 1 M M = ( N 2 M )
110 79 87 109 3eqtrd M coeff P deg P = ( N 2 M )
111 110 107 eqeltrd M coeff P deg P
112 106 nnne0d M ( N 2 M ) 0
113 110 112 eqnetrd M coeff P deg P 0
114 78 111 113 divnegd M coeff P deg P 1 coeff P deg P = coeff P deg P 1 coeff P deg P
115 76 negeqd M coeff P deg P 1 = ( N 2 M 1 )
116 71 negnegd M ( N 2 M 1 ) = ( N 2 M 1 )
117 115 116 eqtrd M coeff P deg P 1 = ( N 2 M 1 )
118 117 110 oveq12d M coeff P deg P 1 coeff P deg P = ( N 2 M 1 ) ( N 2 M )
119 bcm1k 2 M 1 N ( N 2 M ) = ( N 2 M 1 ) N 2 M 1 2 M
120 103 119 syl M ( N 2 M ) = ( N 2 M 1 ) N 2 M 1 2 M
121 59 nncnd M 2 M
122 1cnd M 1
123 121 122 122 pnncand M 2 M + 1 - 2 M 1 = 1 + 1
124 1 oveq1i N 2 M 1 = 2 M + 1 - 2 M 1
125 df-2 2 = 1 + 1
126 123 124 125 3eqtr4g M N 2 M 1 = 2
127 2nn0 2 0
128 126 127 eqeltrdi M N 2 M 1 0
129 nnm1nn0 2 M 2 M 1 0
130 59 129 syl M 2 M 1 0
131 nn0sub 2 M 1 0 N 0 2 M 1 N N 2 M 1 0
132 130 62 131 syl2anc M 2 M 1 N N 2 M 1 0
133 128 132 mpbird M 2 M 1 N
134 47 2timesd M 2 M = M + M
135 134 oveq1d M 2 M 1 = M + M - 1
136 47 47 122 addsubd M M + M - 1 = M - 1 + M
137 135 136 eqtrd M 2 M 1 = M - 1 + M
138 nn0nnaddcl M 1 0 M M - 1 + M
139 37 138 mpancom M M - 1 + M
140 137 139 eqeltrd M 2 M 1
141 140 98 eleqtrdi M 2 M 1 1
142 elfz5 2 M 1 1 N 2 M 1 1 N 2 M 1 N
143 141 100 142 syl2anc M 2 M 1 1 N 2 M 1 N
144 133 143 mpbird M 2 M 1 1 N
145 bcm1k 2 M 1 1 N ( N 2 M 1 ) = ( N 2 M - 1 - 1 ) N 2 M - 1 - 1 2 M 1
146 144 145 syl M ( N 2 M 1 ) = ( N 2 M - 1 - 1 ) N 2 M - 1 - 1 2 M 1
147 48 2timesi 2 1 = 1 + 1
148 147 eqcomi 1 + 1 = 2 1
149 148 oveq2i 2 M 1 + 1 = 2 M 2 1
150 121 122 122 subsub4d M 2 M - 1 - 1 = 2 M 1 + 1
151 2cnd M 2
152 151 47 122 subdid M 2 M 1 = 2 M 2 1
153 149 150 152 3eqtr4a M 2 M - 1 - 1 = 2 M 1
154 153 oveq2d M ( N 2 M - 1 - 1 ) = ( N 2 M 1 )
155 61 nncnd M N
156 140 nncnd M 2 M 1
157 155 156 122 subsubd M N 2 M - 1 - 1 = N - 2 M 1 + 1
158 126 oveq1d M N - 2 M 1 + 1 = 2 + 1
159 df-3 3 = 2 + 1
160 158 159 eqtr4di M N - 2 M 1 + 1 = 3
161 157 160 eqtrd M N 2 M - 1 - 1 = 3
162 161 oveq1d M N 2 M - 1 - 1 2 M 1 = 3 2 M 1
163 154 162 oveq12d M ( N 2 M - 1 - 1 ) N 2 M - 1 - 1 2 M 1 = ( N 2 M 1 ) 3 2 M 1
164 146 163 eqtrd M ( N 2 M 1 ) = ( N 2 M 1 ) 3 2 M 1
165 126 oveq1d M N 2 M 1 2 M = 2 2 M
166 164 165 oveq12d M ( N 2 M 1 ) N 2 M 1 2 M = ( N 2 M 1 ) 3 2 M 1 2 2 M
167 3re 3
168 nndivre 3 2 M 1 3 2 M 1
169 167 140 168 sylancr M 3 2 M 1
170 169 recnd M 3 2 M 1
171 2re 2
172 nndivre 2 2 M 2 2 M
173 171 59 172 sylancr M 2 2 M
174 173 recnd M 2 2 M
175 71 170 174 mulassd M ( N 2 M 1 ) 3 2 M 1 2 2 M = ( N 2 M 1 ) 3 2 M 1 2 2 M
176 120 166 175 3eqtrd M ( N 2 M ) = ( N 2 M 1 ) 3 2 M 1 2 2 M
177 3cn 3
178 177 a1i M 3
179 140 nnne0d M 2 M 1 0
180 59 nnne0d M 2 M 0
181 178 156 151 121 179 180 divmuldivd M 3 2 M 1 2 2 M = 3 2 2 M 1 2 M
182 3t2e6 3 2 = 6
183 182 a1i M 3 2 = 6
184 156 121 mulcomd M 2 M 1 2 M = 2 M 2 M 1
185 183 184 oveq12d M 3 2 2 M 1 2 M = 6 2 M 2 M 1
186 181 185 eqtrd M 3 2 M 1 2 2 M = 6 2 M 2 M 1
187 186 oveq2d M ( N 2 M 1 ) 3 2 M 1 2 2 M = ( N 2 M 1 ) 6 2 M 2 M 1
188 176 187 eqtrd M ( N 2 M ) = ( N 2 M 1 ) 6 2 M 2 M 1
189 188 oveq1d M ( N 2 M ) ( N 2 M 1 ) = ( N 2 M 1 ) 6 2 M 2 M 1 ( N 2 M 1 )
190 6re 6
191 59 140 nnmulcld M 2 M 2 M 1
192 nndivre 6 2 M 2 M 1 6 2 M 2 M 1
193 190 191 192 sylancr M 6 2 M 2 M 1
194 193 recnd M 6 2 M 2 M 1
195 nnm1nn0 2 M 1 2 M - 1 - 1 0
196 140 195 syl M 2 M - 1 - 1 0
197 153 196 eqeltrrd M 2 M 1 0
198 197 nn0red M 2 M 1
199 140 nnred M 2 M 1
200 61 nnred M N
201 199 ltm1d M 2 M - 1 - 1 < 2 M 1
202 153 201 eqbrtrrd M 2 M 1 < 2 M 1
203 198 199 202 ltled M 2 M 1 2 M 1
204 198 199 200 203 133 letrd M 2 M 1 N
205 nn0uz 0 = 0
206 197 205 eleqtrdi M 2 M 1 0
207 elfz5 2 M 1 0 N 2 M 1 0 N 2 M 1 N
208 206 100 207 syl2anc M 2 M 1 0 N 2 M 1 N
209 204 208 mpbird M 2 M 1 0 N
210 bccl2 2 M 1 0 N ( N 2 M 1 )
211 209 210 syl M ( N 2 M 1 )
212 211 nnne0d M ( N 2 M 1 ) 0
213 194 71 212 divcan3d M ( N 2 M 1 ) 6 2 M 2 M 1 ( N 2 M 1 ) = 6 2 M 2 M 1
214 189 213 eqtrd M ( N 2 M ) ( N 2 M 1 ) = 6 2 M 2 M 1
215 214 oveq2d M 1 ( N 2 M ) ( N 2 M 1 ) = 1 6 2 M 2 M 1
216 107 71 112 212 recdivd M 1 ( N 2 M ) ( N 2 M 1 ) = ( N 2 M 1 ) ( N 2 M )
217 191 nncnd M 2 M 2 M 1
218 191 nnne0d M 2 M 2 M 1 0
219 6cn 6
220 6nn 6
221 220 nnne0i 6 0
222 recdiv 6 6 0 2 M 2 M 1 2 M 2 M 1 0 1 6 2 M 2 M 1 = 2 M 2 M 1 6
223 219 221 222 mpanl12 2 M 2 M 1 2 M 2 M 1 0 1 6 2 M 2 M 1 = 2 M 2 M 1 6
224 217 218 223 syl2anc M 1 6 2 M 2 M 1 = 2 M 2 M 1 6
225 215 216 224 3eqtr3d M ( N 2 M 1 ) ( N 2 M ) = 2 M 2 M 1 6
226 114 118 225 3eqtrd M coeff P deg P 1 coeff P deg P = 2 M 2 M 1 6
227 19 33 226 3eqtr3d M k = 1 M tan k π N 2 = 2 M 2 M 1 6