Metamath Proof Explorer


Theorem dchrisum0flblem1

Description: Lemma for dchrisum0flb . Base case, prime power. (Contributed by Mario Carneiro, 5-May-2016)

Ref Expression
Hypotheses rpvmasum.z Z = /N
rpvmasum.l L = ℤRHom Z
rpvmasum.a φ N
rpvmasum2.g G = DChr N
rpvmasum2.d D = Base G
rpvmasum2.1 1 ˙ = 0 G
dchrisum0f.f F = b v q | q b X L v
dchrisum0f.x φ X D
dchrisum0flb.r φ X : Base Z
dchrisum0flblem1.1 φ P
dchrisum0flblem1.2 φ A 0
Assertion dchrisum0flblem1 φ if P A 1 0 F P A

Proof

Step Hyp Ref Expression
1 rpvmasum.z Z = /N
2 rpvmasum.l L = ℤRHom Z
3 rpvmasum.a φ N
4 rpvmasum2.g G = DChr N
5 rpvmasum2.d D = Base G
6 rpvmasum2.1 1 ˙ = 0 G
7 dchrisum0f.f F = b v q | q b X L v
8 dchrisum0f.x φ X D
9 dchrisum0flb.r φ X : Base Z
10 dchrisum0flblem1.1 φ P
11 dchrisum0flblem1.2 φ A 0
12 1red φ X L P = 1 P A 1
13 0red φ X L P = 1 ¬ P A 0
14 12 13 ifclda φ X L P = 1 if P A 1 0
15 1red φ X L P = 1 1
16 fzfid φ 0 A Fin
17 3 nnnn0d φ N 0
18 eqid Base Z = Base Z
19 1 18 2 znzrhfo N 0 L : onto Base Z
20 fof L : onto Base Z L : Base Z
21 17 19 20 3syl φ L : Base Z
22 prmz P P
23 10 22 syl φ P
24 21 23 ffvelrnd φ L P Base Z
25 9 24 ffvelrnd φ X L P
26 elfznn0 i 0 A i 0
27 reexpcl X L P i 0 X L P i
28 25 26 27 syl2an φ i 0 A X L P i
29 16 28 fsumrecl φ i = 0 A X L P i
30 29 adantr φ X L P = 1 i = 0 A X L P i
31 breq1 1 = if P A 1 0 1 1 if P A 1 0 1
32 breq1 0 = if P A 1 0 0 1 if P A 1 0 1
33 1le1 1 1
34 0le1 0 1
35 31 32 33 34 keephyp if P A 1 0 1
36 35 a1i φ X L P = 1 if P A 1 0 1
37 nn0uz 0 = 0
38 11 37 eleqtrdi φ A 0
39 fzn0 0 A A 0
40 38 39 sylibr φ 0 A
41 hashnncl 0 A Fin 0 A 0 A
42 16 41 syl φ 0 A 0 A
43 40 42 mpbird φ 0 A
44 43 adantr φ X L P = 1 0 A
45 44 nnge1d φ X L P = 1 1 0 A
46 simpr φ X L P = 1 X L P = 1
47 46 oveq1d φ X L P = 1 X L P i = 1 i
48 elfzelz i 0 A i
49 1exp i 1 i = 1
50 48 49 syl i 0 A 1 i = 1
51 47 50 sylan9eq φ X L P = 1 i 0 A X L P i = 1
52 51 sumeq2dv φ X L P = 1 i = 0 A X L P i = i = 0 A 1
53 fzfid φ X L P = 1 0 A Fin
54 ax-1cn 1
55 fsumconst 0 A Fin 1 i = 0 A 1 = 0 A 1
56 53 54 55 sylancl φ X L P = 1 i = 0 A 1 = 0 A 1
57 44 nncnd φ X L P = 1 0 A
58 57 mulid1d φ X L P = 1 0 A 1 = 0 A
59 52 56 58 3eqtrd φ X L P = 1 i = 0 A X L P i = 0 A
60 45 59 breqtrrd φ X L P = 1 1 i = 0 A X L P i
61 14 15 30 36 60 letrd φ X L P = 1 if P A 1 0 i = 0 A X L P i
62 oveq1 1 = if P A 1 0 1 1 X L P = if P A 1 0 1 X L P
63 62 breq1d 1 = if P A 1 0 1 1 X L P 1 X L P A + 1 if P A 1 0 1 X L P 1 X L P A + 1
64 oveq1 0 = if P A 1 0 0 1 X L P = if P A 1 0 1 X L P
65 64 breq1d 0 = if P A 1 0 0 1 X L P 1 X L P A + 1 if P A 1 0 1 X L P 1 X L P A + 1
66 1re 1
67 25 adantr φ X L P 1 X L P
68 resubcl 1 X L P 1 X L P
69 66 67 68 sylancr φ X L P 1 1 X L P
70 69 adantr φ X L P 1 P A 1 X L P
71 70 leidd φ X L P 1 P A 1 X L P 1 X L P
72 69 recnd φ X L P 1 1 X L P
73 72 adantr φ X L P 1 P A 1 X L P
74 73 mulid2d φ X L P 1 P A 1 1 X L P = 1 X L P
75 nn0p1nn A 0 A + 1
76 11 75 syl φ A + 1
77 76 ad3antrrr φ X L P 1 P A X L P = 0 A + 1
78 77 0expd φ X L P 1 P A X L P = 0 0 A + 1 = 0
79 simpr φ X L P 1 P A X L P = 0 X L P = 0
80 79 oveq1d φ X L P 1 P A X L P = 0 X L P A + 1 = 0 A + 1
81 78 80 79 3eqtr4d φ X L P 1 P A X L P = 0 X L P A + 1 = X L P
82 neg1cn 1
83 11 ad2antrr φ X L P 1 P A A 0
84 expp1 1 A 0 1 A + 1 = 1 A -1
85 82 83 84 sylancr φ X L P 1 P A 1 A + 1 = 1 A -1
86 prmnn P P
87 10 86 syl φ P
88 87 11 nnexpcld φ P A
89 88 nncnd φ P A
90 89 ad2antrr φ X L P 1 P A P A
91 90 sqsqrtd φ X L P 1 P A P A 2 = P A
92 91 oveq2d φ X L P 1 P A P pCnt P A 2 = P pCnt P A
93 10 ad2antrr φ X L P 1 P A P
94 nnq P A P A
95 94 adantl φ X L P 1 P A P A
96 nnne0 P A P A 0
97 96 adantl φ X L P 1 P A P A 0
98 2z 2
99 98 a1i φ X L P 1 P A 2
100 pcexp P P A P A 0 2 P pCnt P A 2 = 2 P pCnt P A
101 93 95 97 99 100 syl121anc φ X L P 1 P A P pCnt P A 2 = 2 P pCnt P A
102 83 nn0zd φ X L P 1 P A A
103 pcid P A P pCnt P A = A
104 93 102 103 syl2anc φ X L P 1 P A P pCnt P A = A
105 92 101 104 3eqtr3rd φ X L P 1 P A A = 2 P pCnt P A
106 105 oveq2d φ X L P 1 P A 1 A = 1 2 P pCnt P A
107 82 a1i φ X L P 1 P A 1
108 simpr φ X L P 1 P A P A
109 93 108 pccld φ X L P 1 P A P pCnt P A 0
110 2nn0 2 0
111 110 a1i φ X L P 1 P A 2 0
112 107 109 111 expmuld φ X L P 1 P A 1 2 P pCnt P A = -1 2 P pCnt P A
113 neg1sqe1 1 2 = 1
114 113 oveq1i -1 2 P pCnt P A = 1 P pCnt P A
115 109 nn0zd φ X L P 1 P A P pCnt P A
116 1exp P pCnt P A 1 P pCnt P A = 1
117 115 116 syl φ X L P 1 P A 1 P pCnt P A = 1
118 114 117 eqtrid φ X L P 1 P A -1 2 P pCnt P A = 1
119 106 112 118 3eqtrd φ X L P 1 P A 1 A = 1
120 119 oveq1d φ X L P 1 P A 1 A -1 = 1 -1
121 82 mulid2i 1 -1 = 1
122 120 121 eqtrdi φ X L P 1 P A 1 A -1 = 1
123 85 122 eqtrd φ X L P 1 P A 1 A + 1 = 1
124 123 adantr φ X L P 1 P A X L P 0 1 A + 1 = 1
125 25 recnd φ X L P
126 125 adantr φ X L P 1 X L P
127 126 ad2antrr φ X L P 1 P A X L P 0 X L P
128 127 negnegd φ X L P 1 P A X L P 0 X L P = X L P
129 simpr φ X L P 1 X L P 1
130 129 ad2antrr φ X L P 1 P A X L P 0 X L P 1
131 8 ad3antrrr φ X L P 1 P A X L P 0 X D
132 eqid Unit Z = Unit Z
133 4 1 5 18 132 8 24 dchrn0 φ X L P 0 L P Unit Z
134 133 ad2antrr φ X L P 1 P A X L P 0 L P Unit Z
135 134 biimpa φ X L P 1 P A X L P 0 L P Unit Z
136 4 5 131 1 132 135 dchrabs φ X L P 1 P A X L P 0 X L P = 1
137 eqeq1 X L P = X L P X L P = 1 X L P = 1
138 136 137 syl5ibcom φ X L P 1 P A X L P 0 X L P = X L P X L P = 1
139 138 necon3ad φ X L P 1 P A X L P 0 X L P 1 ¬ X L P = X L P
140 130 139 mpd φ X L P 1 P A X L P 0 ¬ X L P = X L P
141 67 ad2antrr φ X L P 1 P A X L P 0 X L P
142 141 absord φ X L P 1 P A X L P 0 X L P = X L P X L P = X L P
143 142 ord φ X L P 1 P A X L P 0 ¬ X L P = X L P X L P = X L P
144 140 143 mpd φ X L P 1 P A X L P 0 X L P = X L P
145 144 136 eqtr3d φ X L P 1 P A X L P 0 X L P = 1
146 145 negeqd φ X L P 1 P A X L P 0 X L P = 1
147 128 146 eqtr3d φ X L P 1 P A X L P 0 X L P = 1
148 147 oveq1d φ X L P 1 P A X L P 0 X L P A + 1 = 1 A + 1
149 124 148 147 3eqtr4d φ X L P 1 P A X L P 0 X L P A + 1 = X L P
150 81 149 pm2.61dane φ X L P 1 P A X L P A + 1 = X L P
151 150 oveq2d φ X L P 1 P A 1 X L P A + 1 = 1 X L P
152 71 74 151 3brtr4d φ X L P 1 P A 1 1 X L P 1 X L P A + 1
153 72 mul02d φ X L P 1 0 1 X L P = 0
154 peano2nn0 A 0 A + 1 0
155 11 154 syl φ A + 1 0
156 25 155 reexpcld φ X L P A + 1
157 156 adantr φ X L P 1 X L P A + 1
158 157 recnd φ X L P 1 X L P A + 1
159 158 abscld φ X L P 1 X L P A + 1
160 1red φ X L P 1 1
161 157 leabsd φ X L P 1 X L P A + 1 X L P A + 1
162 155 adantr φ X L P 1 A + 1 0
163 126 162 absexpd φ X L P 1 X L P A + 1 = X L P A + 1
164 126 abscld φ X L P 1 X L P
165 126 absge0d φ X L P 1 0 X L P
166 4 5 1 18 8 24 dchrabs2 φ X L P 1
167 166 adantr φ X L P 1 X L P 1
168 exple1 X L P 0 X L P X L P 1 A + 1 0 X L P A + 1 1
169 164 165 167 162 168 syl31anc φ X L P 1 X L P A + 1 1
170 163 169 eqbrtrd φ X L P 1 X L P A + 1 1
171 157 159 160 161 170 letrd φ X L P 1 X L P A + 1 1
172 subge0 1 X L P A + 1 0 1 X L P A + 1 X L P A + 1 1
173 66 157 172 sylancr φ X L P 1 0 1 X L P A + 1 X L P A + 1 1
174 171 173 mpbird φ X L P 1 0 1 X L P A + 1
175 153 174 eqbrtrd φ X L P 1 0 1 X L P 1 X L P A + 1
176 175 adantr φ X L P 1 ¬ P A 0 1 X L P 1 X L P A + 1
177 63 65 152 176 ifbothda φ X L P 1 if P A 1 0 1 X L P 1 X L P A + 1
178 0re 0
179 66 178 ifcli if P A 1 0
180 179 a1i φ X L P 1 if P A 1 0
181 resubcl 1 X L P A + 1 1 X L P A + 1
182 66 157 181 sylancr φ X L P 1 1 X L P A + 1
183 67 leabsd φ X L P 1 X L P X L P
184 67 164 160 183 167 letrd φ X L P 1 X L P 1
185 129 necomd φ X L P 1 1 X L P
186 67 160 184 185 leneltd φ X L P 1 X L P < 1
187 posdif X L P 1 X L P < 1 0 < 1 X L P
188 67 66 187 sylancl φ X L P 1 X L P < 1 0 < 1 X L P
189 186 188 mpbid φ X L P 1 0 < 1 X L P
190 lemuldiv if P A 1 0 1 X L P A + 1 1 X L P 0 < 1 X L P if P A 1 0 1 X L P 1 X L P A + 1 if P A 1 0 1 X L P A + 1 1 X L P
191 180 182 69 189 190 syl112anc φ X L P 1 if P A 1 0 1 X L P 1 X L P A + 1 if P A 1 0 1 X L P A + 1 1 X L P
192 177 191 mpbid φ X L P 1 if P A 1 0 1 X L P A + 1 1 X L P
193 11 nn0zd φ A
194 fzval3 A 0 A = 0 ..^ A + 1
195 193 194 syl φ 0 A = 0 ..^ A + 1
196 195 adantr φ X L P 1 0 A = 0 ..^ A + 1
197 196 sumeq1d φ X L P 1 i = 0 A X L P i = i 0 ..^ A + 1 X L P i
198 0nn0 0 0
199 198 a1i φ X L P 1 0 0
200 155 37 eleqtrdi φ A + 1 0
201 200 adantr φ X L P 1 A + 1 0
202 126 129 199 201 geoserg φ X L P 1 i 0 ..^ A + 1 X L P i = X L P 0 X L P A + 1 1 X L P
203 126 exp0d φ X L P 1 X L P 0 = 1
204 203 oveq1d φ X L P 1 X L P 0 X L P A + 1 = 1 X L P A + 1
205 204 oveq1d φ X L P 1 X L P 0 X L P A + 1 1 X L P = 1 X L P A + 1 1 X L P
206 197 202 205 3eqtrd φ X L P 1 i = 0 A X L P i = 1 X L P A + 1 1 X L P
207 192 206 breqtrrd φ X L P 1 if P A 1 0 i = 0 A X L P i
208 61 207 pm2.61dane φ if P A 1 0 i = 0 A X L P i
209 1 2 3 4 5 6 7 dchrisum0fval P A F P A = k q | q P A X L k
210 88 209 syl φ F P A = k q | q P A X L k
211 2fveq3 k = P i X L k = X L P i
212 eqid b 0 A P b = b 0 A P b
213 212 dvdsppwf1o P A 0 b 0 A P b : 0 A 1-1 onto q | q P A
214 10 11 213 syl2anc φ b 0 A P b : 0 A 1-1 onto q | q P A
215 oveq2 b = i P b = P i
216 ovex P b V
217 215 212 216 fvmpt3i i 0 A b 0 A P b i = P i
218 217 adantl φ i 0 A b 0 A P b i = P i
219 9 adantr φ k q | q P A X : Base Z
220 elrabi k q | q P A k
221 220 nnzd k q | q P A k
222 ffvelrn L : Base Z k L k Base Z
223 21 221 222 syl2an φ k q | q P A L k Base Z
224 219 223 ffvelrnd φ k q | q P A X L k
225 224 recnd φ k q | q P A X L k
226 211 16 214 218 225 fsumf1o φ k q | q P A X L k = i = 0 A X L P i
227 zsubrg SubRing fld
228 eqid mulGrp fld = mulGrp fld
229 228 subrgsubm SubRing fld SubMnd mulGrp fld
230 227 229 mp1i φ i 0 A SubMnd mulGrp fld
231 26 adantl φ i 0 A i 0
232 23 adantr φ i 0 A P
233 eqid mulGrp fld = mulGrp fld
234 zringmpg mulGrp fld 𝑠 = mulGrp ring
235 234 eqcomi mulGrp ring = mulGrp fld 𝑠
236 eqid mulGrp ring = mulGrp ring
237 233 235 236 submmulg SubMnd mulGrp fld i 0 P i mulGrp fld P = i mulGrp ring P
238 230 231 232 237 syl3anc φ i 0 A i mulGrp fld P = i mulGrp ring P
239 87 nncnd φ P
240 cnfldexp P i 0 i mulGrp fld P = P i
241 239 26 240 syl2an φ i 0 A i mulGrp fld P = P i
242 238 241 eqtr3d φ i 0 A i mulGrp ring P = P i
243 242 fveq2d φ i 0 A L i mulGrp ring P = L P i
244 1 zncrng N 0 Z CRing
245 crngring Z CRing Z Ring
246 17 244 245 3syl φ Z Ring
247 2 zrhrhm Z Ring L ring RingHom Z
248 eqid mulGrp ring = mulGrp ring
249 eqid mulGrp Z = mulGrp Z
250 248 249 rhmmhm L ring RingHom Z L mulGrp ring MndHom mulGrp Z
251 246 247 250 3syl φ L mulGrp ring MndHom mulGrp Z
252 251 adantr φ i 0 A L mulGrp ring MndHom mulGrp Z
253 zringbas = Base ring
254 248 253 mgpbas = Base mulGrp ring
255 eqid mulGrp Z = mulGrp Z
256 254 236 255 mhmmulg L mulGrp ring MndHom mulGrp Z i 0 P L i mulGrp ring P = i mulGrp Z L P
257 252 231 232 256 syl3anc φ i 0 A L i mulGrp ring P = i mulGrp Z L P
258 243 257 eqtr3d φ i 0 A L P i = i mulGrp Z L P
259 258 fveq2d φ i 0 A X L P i = X i mulGrp Z L P
260 4 1 5 dchrmhm D mulGrp Z MndHom mulGrp fld
261 260 8 sselid φ X mulGrp Z MndHom mulGrp fld
262 261 adantr φ i 0 A X mulGrp Z MndHom mulGrp fld
263 24 adantr φ i 0 A L P Base Z
264 249 18 mgpbas Base Z = Base mulGrp Z
265 264 255 233 mhmmulg X mulGrp Z MndHom mulGrp fld i 0 L P Base Z X i mulGrp Z L P = i mulGrp fld X L P
266 262 231 263 265 syl3anc φ i 0 A X i mulGrp Z L P = i mulGrp fld X L P
267 cnfldexp X L P i 0 i mulGrp fld X L P = X L P i
268 125 26 267 syl2an φ i 0 A i mulGrp fld X L P = X L P i
269 259 266 268 3eqtrd φ i 0 A X L P i = X L P i
270 269 sumeq2dv φ i = 0 A X L P i = i = 0 A X L P i
271 210 226 270 3eqtrd φ F P A = i = 0 A X L P i
272 208 271 breqtrrd φ if P A 1 0 F P A