Metamath Proof Explorer


Theorem dirkertrigeq

Description: Trigonometric equality for the Dirichlet kernel. (Contributed by Glauco Siliprandi, 11-Dec-2019)

Ref Expression
Hypotheses dirkertrigeq.d D = n s if s mod 2 π = 0 2 n + 1 2 π sin n + 1 2 s 2 π sin s 2
dirkertrigeq.n φ N
dirkertrigeq.f F = D N
dirkertrigeq.h H = s 1 2 + k = 1 N cos k s π
Assertion dirkertrigeq φ F = H

Proof

Step Hyp Ref Expression
1 dirkertrigeq.d D = n s if s mod 2 π = 0 2 n + 1 2 π sin n + 1 2 s 2 π sin s 2
2 dirkertrigeq.n φ N
3 dirkertrigeq.f F = D N
4 dirkertrigeq.h H = s 1 2 + k = 1 N cos k s π
5 3 a1i φ F = D N
6 1 dirkerval N D N = s if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2
7 2 6 syl φ D N = s if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2
8 2cnd φ 2
9 2 nncnd φ N
10 8 9 mulcld φ 2 N
11 peano2cn 2 N 2 N + 1
12 10 11 syl φ 2 N + 1
13 picn π
14 13 a1i φ π
15 2ne0 2 0
16 15 a1i φ 2 0
17 pire π
18 pipos 0 < π
19 17 18 gt0ne0ii π 0
20 19 a1i φ π 0
21 12 8 14 16 20 divdiv1d φ 2 N + 1 2 π = 2 N + 1 2 π
22 21 eqcomd φ 2 N + 1 2 π = 2 N + 1 2 π
23 22 ad2antrr φ s s mod 2 π = 0 2 N + 1 2 π = 2 N + 1 2 π
24 iftrue s mod 2 π = 0 if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2 = 2 N + 1 2 π
25 24 adantl φ s s mod 2 π = 0 if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2 = 2 N + 1 2 π
26 elfzelz k 1 N k
27 26 zcnd k 1 N k
28 27 adantl s s mod 2 π = 0 k 1 N k
29 recn s s
30 29 ad2antrr s s mod 2 π = 0 k 1 N s
31 2cn 2
32 31 13 mulcli 2 π
33 32 a1i s s mod 2 π = 0 k 1 N 2 π
34 31 13 15 19 mulne0i 2 π 0
35 34 a1i s s mod 2 π = 0 k 1 N 2 π 0
36 28 30 33 35 divassd s s mod 2 π = 0 k 1 N k s 2 π = k s 2 π
37 26 adantl s s mod 2 π = 0 k 1 N k
38 simpr s s mod 2 π = 0 s mod 2 π = 0
39 simpl s s mod 2 π = 0 s
40 2rp 2 +
41 pirp π +
42 rpmulcl 2 + π + 2 π +
43 40 41 42 mp2an 2 π +
44 mod0 s 2 π + s mod 2 π = 0 s 2 π
45 39 43 44 sylancl s s mod 2 π = 0 s mod 2 π = 0 s 2 π
46 38 45 mpbid s s mod 2 π = 0 s 2 π
47 46 adantr s s mod 2 π = 0 k 1 N s 2 π
48 37 47 zmulcld s s mod 2 π = 0 k 1 N k s 2 π
49 36 48 eqeltrd s s mod 2 π = 0 k 1 N k s 2 π
50 27 adantl s k 1 N k
51 29 adantr s k 1 N s
52 50 51 mulcld s k 1 N k s
53 coseq1 k s cos k s = 1 k s 2 π
54 52 53 syl s k 1 N cos k s = 1 k s 2 π
55 54 adantlr s s mod 2 π = 0 k 1 N cos k s = 1 k s 2 π
56 49 55 mpbird s s mod 2 π = 0 k 1 N cos k s = 1
57 56 ralrimiva s s mod 2 π = 0 k 1 N cos k s = 1
58 57 adantll φ s s mod 2 π = 0 k 1 N cos k s = 1
59 58 sumeq2d φ s s mod 2 π = 0 k = 1 N cos k s = k = 1 N 1
60 fzfid φ s s mod 2 π = 0 1 N Fin
61 1cnd φ s s mod 2 π = 0 1
62 fsumconst 1 N Fin 1 k = 1 N 1 = 1 N 1
63 60 61 62 syl2anc φ s s mod 2 π = 0 k = 1 N 1 = 1 N 1
64 2 nnnn0d φ N 0
65 hashfz1 N 0 1 N = N
66 64 65 syl φ 1 N = N
67 66 oveq1d φ 1 N 1 = N 1
68 9 mulid1d φ N 1 = N
69 67 68 eqtrd φ 1 N 1 = N
70 69 ad2antrr φ s s mod 2 π = 0 1 N 1 = N
71 59 63 70 3eqtrd φ s s mod 2 π = 0 k = 1 N cos k s = N
72 71 oveq2d φ s s mod 2 π = 0 1 2 + k = 1 N cos k s = 1 2 + N
73 9 div1d φ N 1 = N
74 73 eqcomd φ N = N 1
75 74 oveq2d φ 1 2 + N = 1 2 + N 1
76 1cnd φ 1
77 ax-1ne0 1 0
78 77 a1i φ 1 0
79 76 8 9 76 16 78 divadddivd φ 1 2 + N 1 = 1 1 + N 2 2 1
80 76 76 mulcld φ 1 1
81 9 8 mulcld φ N 2
82 80 81 addcomd φ 1 1 + N 2 = N 2 + 1 1
83 9 8 mulcomd φ N 2 = 2 N
84 76 mulid1d φ 1 1 = 1
85 83 84 oveq12d φ N 2 + 1 1 = 2 N + 1
86 82 85 eqtrd φ 1 1 + N 2 = 2 N + 1
87 8 mulid1d φ 2 1 = 2
88 86 87 oveq12d φ 1 1 + N 2 2 1 = 2 N + 1 2
89 75 79 88 3eqtrd φ 1 2 + N = 2 N + 1 2
90 89 ad2antrr φ s s mod 2 π = 0 1 2 + N = 2 N + 1 2
91 72 90 eqtrd φ s s mod 2 π = 0 1 2 + k = 1 N cos k s = 2 N + 1 2
92 91 oveq1d φ s s mod 2 π = 0 1 2 + k = 1 N cos k s π = 2 N + 1 2 π
93 23 25 92 3eqtr4rd φ s s mod 2 π = 0 1 2 + k = 1 N cos k s π = if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2
94 iffalse ¬ s mod 2 π = 0 if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2 = sin N + 1 2 s 2 π sin s 2
95 94 adantl φ s ¬ s mod 2 π = 0 if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2 = sin N + 1 2 s 2 π sin s 2
96 13 a1i s π
97 19 a1i s π 0
98 29 96 97 divcan1d s s π π = s
99 98 eqcomd s s = s π π
100 99 ad2antrr s ¬ s mod 2 π = 0 s mod π = 0 s = s π π
101 simpr s s mod π = 0 s mod π = 0
102 simpl s s mod π = 0 s
103 mod0 s π + s mod π = 0 s π
104 102 41 103 sylancl s s mod π = 0 s mod π = 0 s π
105 101 104 mpbid s s mod π = 0 s π
106 105 adantlr s ¬ s mod 2 π = 0 s mod π = 0 s π
107 rpreccl π + 1 π +
108 41 107 ax-mp 1 π +
109 moddi 1 π + s 2 π + 1 π s mod 2 π = 1 π s mod 1 π 2 π
110 108 43 109 mp3an13 s 1 π s mod 2 π = 1 π s mod 1 π 2 π
111 29 96 97 divrec2d s s π = 1 π s
112 111 eqcomd s 1 π s = s π
113 96 97 reccld s 1 π
114 32 a1i s 2 π
115 113 114 mulcomd s 1 π 2 π = 2 π 1 π
116 2cnd s 2
117 116 96 113 mulassd s 2 π 1 π = 2 π 1 π
118 13 19 recidi π 1 π = 1
119 118 oveq2i 2 π 1 π = 2 1
120 116 mulid1d s 2 1 = 2
121 119 120 eqtrid s 2 π 1 π = 2
122 115 117 121 3eqtrd s 1 π 2 π = 2
123 112 122 oveq12d s 1 π s mod 1 π 2 π = s π mod 2
124 110 123 eqtr2d s s π mod 2 = 1 π s mod 2 π
125 124 adantr s ¬ s mod 2 π = 0 s π mod 2 = 1 π s mod 2 π
126 113 adantr s ¬ s mod 2 π = 0 1 π
127 id s s
128 43 a1i s 2 π +
129 127 128 modcld s s mod 2 π
130 129 recnd s s mod 2 π
131 130 adantr s ¬ s mod 2 π = 0 s mod 2 π
132 ax-1cn 1
133 132 13 77 19 divne0i 1 π 0
134 133 a1i s ¬ s mod 2 π = 0 1 π 0
135 neqne ¬ s mod 2 π = 0 s mod 2 π 0
136 135 adantl s ¬ s mod 2 π = 0 s mod 2 π 0
137 126 131 134 136 mulne0d s ¬ s mod 2 π = 0 1 π s mod 2 π 0
138 125 137 eqnetrd s ¬ s mod 2 π = 0 s π mod 2 0
139 138 adantr s ¬ s mod 2 π = 0 s mod π = 0 s π mod 2 0
140 oddfl s π s π mod 2 0 s π = 2 s π 2 + 1
141 106 139 140 syl2anc s ¬ s mod 2 π = 0 s mod π = 0 s π = 2 s π 2 + 1
142 141 oveq1d s ¬ s mod 2 π = 0 s mod π = 0 s π π = 2 s π 2 + 1 π
143 100 142 eqtrd s ¬ s mod 2 π = 0 s mod π = 0 s = 2 s π 2 + 1 π
144 143 oveq2d s ¬ s mod 2 π = 0 s mod π = 0 k s = k 2 s π 2 + 1 π
145 144 fveq2d s ¬ s mod 2 π = 0 s mod π = 0 cos k s = cos k 2 s π 2 + 1 π
146 145 sumeq2sdv s ¬ s mod 2 π = 0 s mod π = 0 k = 1 N cos k s = k = 1 N cos k 2 s π 2 + 1 π
147 146 oveq2d s ¬ s mod 2 π = 0 s mod π = 0 1 2 + k = 1 N cos k s = 1 2 + k = 1 N cos k 2 s π 2 + 1 π
148 147 oveq1d s ¬ s mod 2 π = 0 s mod π = 0 1 2 + k = 1 N cos k s π = 1 2 + k = 1 N cos k 2 s π 2 + 1 π π
149 148 adantlll φ s ¬ s mod 2 π = 0 s mod π = 0 1 2 + k = 1 N cos k s π = 1 2 + k = 1 N cos k 2 s π 2 + 1 π π
150 2 ad2antrr φ s s mod π = 0 N
151 17 a1i s π
152 127 151 97 redivcld s s π
153 152 rehalfcld s s π 2
154 153 flcld s s π 2
155 154 ad2antlr φ s s mod π = 0 s π 2
156 eqid 2 s π 2 + 1 π = 2 s π 2 + 1 π
157 150 155 156 dirkertrigeqlem3 φ s s mod π = 0 1 2 + k = 1 N cos k 2 s π 2 + 1 π π = sin N + 1 2 2 s π 2 + 1 π 2 π sin 2 s π 2 + 1 π 2
158 157 adantlr φ s ¬ s mod 2 π = 0 s mod π = 0 1 2 + k = 1 N cos k 2 s π 2 + 1 π π = sin N + 1 2 2 s π 2 + 1 π 2 π sin 2 s π 2 + 1 π 2
159 141 adantlll φ s ¬ s mod 2 π = 0 s mod π = 0 s π = 2 s π 2 + 1
160 159 eqcomd φ s ¬ s mod 2 π = 0 s mod π = 0 2 s π 2 + 1 = s π
161 160 oveq1d φ s ¬ s mod 2 π = 0 s mod π = 0 2 s π 2 + 1 π = s π π
162 161 oveq2d φ s ¬ s mod 2 π = 0 s mod π = 0 N + 1 2 2 s π 2 + 1 π = N + 1 2 s π π
163 162 fveq2d φ s ¬ s mod 2 π = 0 s mod π = 0 sin N + 1 2 2 s π 2 + 1 π = sin N + 1 2 s π π
164 161 fvoveq1d φ s ¬ s mod 2 π = 0 s mod π = 0 sin 2 s π 2 + 1 π 2 = sin s π π 2
165 164 oveq2d φ s ¬ s mod 2 π = 0 s mod π = 0 2 π sin 2 s π 2 + 1 π 2 = 2 π sin s π π 2
166 163 165 oveq12d φ s ¬ s mod 2 π = 0 s mod π = 0 sin N + 1 2 2 s π 2 + 1 π 2 π sin 2 s π 2 + 1 π 2 = sin N + 1 2 s π π 2 π sin s π π 2
167 98 oveq2d s N + 1 2 s π π = N + 1 2 s
168 167 fveq2d s sin N + 1 2 s π π = sin N + 1 2 s
169 98 fvoveq1d s sin s π π 2 = sin s 2
170 169 oveq2d s 2 π sin s π π 2 = 2 π sin s 2
171 168 170 oveq12d s sin N + 1 2 s π π 2 π sin s π π 2 = sin N + 1 2 s 2 π sin s 2
172 171 adantl φ s sin N + 1 2 s π π 2 π sin s π π 2 = sin N + 1 2 s 2 π sin s 2
173 172 ad2antrr φ s ¬ s mod 2 π = 0 s mod π = 0 sin N + 1 2 s π π 2 π sin s π π 2 = sin N + 1 2 s 2 π sin s 2
174 166 173 eqtrd φ s ¬ s mod 2 π = 0 s mod π = 0 sin N + 1 2 2 s π 2 + 1 π 2 π sin 2 s π 2 + 1 π 2 = sin N + 1 2 s 2 π sin s 2
175 149 158 174 3eqtrrd φ s ¬ s mod 2 π = 0 s mod π = 0 sin N + 1 2 s 2 π sin s 2 = 1 2 + k = 1 N cos k s π
176 simplr φ s ¬ s mod π = 0 s
177 simpr φ s ¬ s mod π = 0 ¬ s mod π = 0
178 176 41 103 sylancl φ s ¬ s mod π = 0 s mod π = 0 s π
179 177 178 mtbid φ s ¬ s mod π = 0 ¬ s π
180 176 recnd φ s ¬ s mod π = 0 s
181 sineq0 s sin s = 0 s π
182 180 181 syl φ s ¬ s mod π = 0 sin s = 0 s π
183 179 182 mtbird φ s ¬ s mod π = 0 ¬ sin s = 0
184 183 neqned φ s ¬ s mod π = 0 sin s 0
185 2 ad2antrr φ s ¬ s mod π = 0 N
186 176 184 185 dirkertrigeqlem2 φ s ¬ s mod π = 0 1 2 + k = 1 N cos k s π = sin N + 1 2 s 2 π sin s 2
187 186 eqcomd φ s ¬ s mod π = 0 sin N + 1 2 s 2 π sin s 2 = 1 2 + k = 1 N cos k s π
188 187 adantlr φ s ¬ s mod 2 π = 0 ¬ s mod π = 0 sin N + 1 2 s 2 π sin s 2 = 1 2 + k = 1 N cos k s π
189 175 188 pm2.61dan φ s ¬ s mod 2 π = 0 sin N + 1 2 s 2 π sin s 2 = 1 2 + k = 1 N cos k s π
190 95 189 eqtr2d φ s ¬ s mod 2 π = 0 1 2 + k = 1 N cos k s π = if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2
191 93 190 pm2.61dan φ s 1 2 + k = 1 N cos k s π = if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2
192 191 mpteq2dva φ s 1 2 + k = 1 N cos k s π = s if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2
193 4 192 eqtr2id φ s if s mod 2 π = 0 2 N + 1 2 π sin N + 1 2 s 2 π sin s 2 = H
194 5 7 193 3eqtrd φ F = H