Metamath Proof Explorer


Theorem lgsquadlem1

Description: Lemma for lgsquad . Count the members of S with odd coordinates. (Contributed by Mario Carneiro, 19-Jun-2015)

Ref Expression
Hypotheses lgseisen.1 φ P 2
lgseisen.2 φ Q 2
lgseisen.3 φ P Q
lgsquad.4 M = P 1 2
lgsquad.5 N = Q 1 2
lgsquad.6 S = x y | x 1 M y 1 N y P < x Q
Assertion lgsquadlem1 φ 1 u = M 2 + 1 M Q P 2 u = 1 z S | ¬ 2 1 st z

Proof

Step Hyp Ref Expression
1 lgseisen.1 φ P 2
2 lgseisen.2 φ Q 2
3 lgseisen.3 φ P Q
4 lgsquad.4 M = P 1 2
5 lgsquad.5 N = Q 1 2
6 lgsquad.6 S = x y | x 1 M y 1 N y P < x Q
7 neg1cn 1
8 7 a1i φ 1
9 neg1ne0 1 0
10 9 a1i φ 1 0
11 fzfid φ M 2 + 1 M Fin
12 2 gausslemma2dlem0a φ Q
13 12 nnred φ Q
14 1 gausslemma2dlem0a φ P
15 13 14 nndivred φ Q P
16 15 adantr φ u M 2 + 1 M Q P
17 2z 2
18 elfzelz u M 2 + 1 M u
19 18 adantl φ u M 2 + 1 M u
20 zmulcl 2 u 2 u
21 17 19 20 sylancr φ u M 2 + 1 M 2 u
22 21 zred φ u M 2 + 1 M 2 u
23 16 22 remulcld φ u M 2 + 1 M Q P 2 u
24 23 flcld φ u M 2 + 1 M Q P 2 u
25 11 24 fsumzcl φ u = M 2 + 1 M Q P 2 u
26 8 10 25 expclzd φ 1 u = M 2 + 1 M Q P 2 u
27 fzfid φ 1 M Fin
28 fzfid φ 1 N Fin
29 xpfi 1 M Fin 1 N Fin 1 M × 1 N Fin
30 27 28 29 syl2anc φ 1 M × 1 N Fin
31 opabssxp x y | x 1 M y 1 N y P < x Q 1 M × 1 N
32 6 31 eqsstri S 1 M × 1 N
33 ssfi 1 M × 1 N Fin S 1 M × 1 N S Fin
34 30 32 33 sylancl φ S Fin
35 ssrab2 z S | ¬ 2 1 st z S
36 ssfi S Fin z S | ¬ 2 1 st z S z S | ¬ 2 1 st z Fin
37 34 35 36 sylancl φ z S | ¬ 2 1 st z Fin
38 hashcl z S | ¬ 2 1 st z Fin z S | ¬ 2 1 st z 0
39 37 38 syl φ z S | ¬ 2 1 st z 0
40 expcl 1 z S | ¬ 2 1 st z 0 1 z S | ¬ 2 1 st z
41 7 39 40 sylancr φ 1 z S | ¬ 2 1 st z
42 39 nn0zd φ z S | ¬ 2 1 st z
43 8 10 42 expne0d φ 1 z S | ¬ 2 1 st z 0
44 41 43 recidd φ 1 z S | ¬ 2 1 st z 1 1 z S | ¬ 2 1 st z = 1
45 1div1e1 1 1 = 1
46 45 negeqi 1 1 = 1
47 ax-1cn 1
48 ax-1ne0 1 0
49 divneg2 1 1 1 0 1 1 = 1 1
50 47 47 48 49 mp3an 1 1 = 1 1
51 46 50 eqtr3i 1 = 1 1
52 51 oveq1i 1 z S | ¬ 2 1 st z = 1 1 z S | ¬ 2 1 st z
53 8 10 42 exprecd φ 1 1 z S | ¬ 2 1 st z = 1 1 z S | ¬ 2 1 st z
54 52 53 syl5eq φ 1 z S | ¬ 2 1 st z = 1 1 z S | ¬ 2 1 st z
55 54 oveq2d φ 1 z S | ¬ 2 1 st z 1 z S | ¬ 2 1 st z = 1 z S | ¬ 2 1 st z 1 1 z S | ¬ 2 1 st z
56 34 adantr φ u M 2 + 1 M S Fin
57 ssrab2 z S | 1 st z = P 2 u S
58 ssfi S Fin z S | 1 st z = P 2 u S z S | 1 st z = P 2 u Fin
59 56 57 58 sylancl φ u M 2 + 1 M z S | 1 st z = P 2 u Fin
60 fveqeq2 z = v 1 st z = P 2 u 1 st v = P 2 u
61 60 elrab v z S | 1 st z = P 2 u v S 1 st v = P 2 u
62 61 simprbi v z S | 1 st z = P 2 u 1 st v = P 2 u
63 62 ad2antll φ u M 2 + 1 M v z S | 1 st z = P 2 u 1 st v = P 2 u
64 63 oveq2d φ u M 2 + 1 M v z S | 1 st z = P 2 u P 1 st v = P P 2 u
65 14 adantr φ u M 2 + 1 M P
66 65 nncnd φ u M 2 + 1 M P
67 66 adantrr φ u M 2 + 1 M v z S | 1 st z = P 2 u P
68 21 zcnd φ u M 2 + 1 M 2 u
69 68 adantrr φ u M 2 + 1 M v z S | 1 st z = P 2 u 2 u
70 67 69 nncand φ u M 2 + 1 M v z S | 1 st z = P 2 u P P 2 u = 2 u
71 64 70 eqtrd φ u M 2 + 1 M v z S | 1 st z = P 2 u P 1 st v = 2 u
72 71 oveq1d φ u M 2 + 1 M v z S | 1 st z = P 2 u P 1 st v 2 = 2 u 2
73 19 zcnd φ u M 2 + 1 M u
74 73 adantrr φ u M 2 + 1 M v z S | 1 st z = P 2 u u
75 2cnd φ u M 2 + 1 M v z S | 1 st z = P 2 u 2
76 2ne0 2 0
77 76 a1i φ u M 2 + 1 M v z S | 1 st z = P 2 u 2 0
78 74 75 77 divcan3d φ u M 2 + 1 M v z S | 1 st z = P 2 u 2 u 2 = u
79 72 78 eqtrd φ u M 2 + 1 M v z S | 1 st z = P 2 u P 1 st v 2 = u
80 79 ralrimivva φ u M 2 + 1 M v z S | 1 st z = P 2 u P 1 st v 2 = u
81 invdisj u M 2 + 1 M v z S | 1 st z = P 2 u P 1 st v 2 = u Disj u = M 2 + 1 M z S | 1 st z = P 2 u
82 80 81 syl φ Disj u = M 2 + 1 M z S | 1 st z = P 2 u
83 11 59 82 hashiun φ u = M 2 + 1 M z S | 1 st z = P 2 u = u = M 2 + 1 M z S | 1 st z = P 2 u
84 iunrab u = M 2 + 1 M z S | 1 st z = P 2 u = z S | u M 2 + 1 M 1 st z = P 2 u
85 eldifsni P 2 P 2
86 1 85 syl φ P 2
87 86 necomd φ 2 P
88 87 neneqd φ ¬ 2 = P
89 88 ad2antrr φ z S u M 2 + 1 M ¬ 2 = P
90 uzid 2 2 2
91 17 90 ax-mp 2 2
92 1 eldifad φ P
93 92 ad2antrr φ z S u M 2 + 1 M P
94 dvdsprm 2 2 P 2 P 2 = P
95 91 93 94 sylancr φ z S u M 2 + 1 M 2 P 2 = P
96 89 95 mtbird φ z S u M 2 + 1 M ¬ 2 P
97 14 ad2antrr φ z S u M 2 + 1 M P
98 97 nncnd φ z S u M 2 + 1 M P
99 21 adantlr φ z S u M 2 + 1 M 2 u
100 99 zcnd φ z S u M 2 + 1 M 2 u
101 98 100 npcand φ z S u M 2 + 1 M P - 2 u + 2 u = P
102 101 breq2d φ z S u M 2 + 1 M 2 P - 2 u + 2 u 2 P
103 96 102 mtbird φ z S u M 2 + 1 M ¬ 2 P - 2 u + 2 u
104 18 adantl φ z S u M 2 + 1 M u
105 dvdsmul1 2 u 2 2 u
106 17 104 105 sylancr φ z S u M 2 + 1 M 2 2 u
107 17 a1i φ z S u M 2 + 1 M 2
108 97 nnzd φ z S u M 2 + 1 M P
109 108 99 zsubcld φ z S u M 2 + 1 M P 2 u
110 dvds2add 2 P 2 u 2 u 2 P 2 u 2 2 u 2 P - 2 u + 2 u
111 107 109 99 110 syl3anc φ z S u M 2 + 1 M 2 P 2 u 2 2 u 2 P - 2 u + 2 u
112 106 111 mpan2d φ z S u M 2 + 1 M 2 P 2 u 2 P - 2 u + 2 u
113 103 112 mtod φ z S u M 2 + 1 M ¬ 2 P 2 u
114 breq2 1 st z = P 2 u 2 1 st z 2 P 2 u
115 114 notbid 1 st z = P 2 u ¬ 2 1 st z ¬ 2 P 2 u
116 113 115 syl5ibrcom φ z S u M 2 + 1 M 1 st z = P 2 u ¬ 2 1 st z
117 116 rexlimdva φ z S u M 2 + 1 M 1 st z = P 2 u ¬ 2 1 st z
118 simpr φ z S z S
119 32 118 sselid φ z S z 1 M × 1 N
120 xp1st z 1 M × 1 N 1 st z 1 M
121 119 120 syl φ z S 1 st z 1 M
122 elfzelz 1 st z 1 M 1 st z
123 odd2np1 1 st z ¬ 2 1 st z n 2 n + 1 = 1 st z
124 121 122 123 3syl φ z S ¬ 2 1 st z n 2 n + 1 = 1 st z
125 1 4 gausslemma2dlem0b φ M
126 125 nnred φ M
127 126 ad2antrr φ z S n 2 n + 1 = 1 st z M
128 127 rehalfcld φ z S n 2 n + 1 = 1 st z M 2
129 128 flcld φ z S n 2 n + 1 = 1 st z M 2
130 129 peano2zd φ z S n 2 n + 1 = 1 st z M 2 + 1
131 125 ad2antrr φ z S n 2 n + 1 = 1 st z M
132 131 nnzd φ z S n 2 n + 1 = 1 st z M
133 simprl φ z S n 2 n + 1 = 1 st z n
134 132 133 zsubcld φ z S n 2 n + 1 = 1 st z M n
135 reflcl M 2 M 2
136 128 135 syl φ z S n 2 n + 1 = 1 st z M 2
137 134 zred φ z S n 2 n + 1 = 1 st z M n
138 flle M 2 M 2 M 2
139 128 138 syl φ z S n 2 n + 1 = 1 st z M 2 M 2
140 zre n n
141 140 ad2antrl φ z S n 2 n + 1 = 1 st z n
142 simprr φ z S n 2 n + 1 = 1 st z 2 n + 1 = 1 st z
143 121 adantr φ z S n 2 n + 1 = 1 st z 1 st z 1 M
144 142 143 eqeltrd φ z S n 2 n + 1 = 1 st z 2 n + 1 1 M
145 elfzle2 2 n + 1 1 M 2 n + 1 M
146 144 145 syl φ z S n 2 n + 1 = 1 st z 2 n + 1 M
147 zmulcl 2 n 2 n
148 17 133 147 sylancr φ z S n 2 n + 1 = 1 st z 2 n
149 zltp1le 2 n M 2 n < M 2 n + 1 M
150 148 132 149 syl2anc φ z S n 2 n + 1 = 1 st z 2 n < M 2 n + 1 M
151 146 150 mpbird φ z S n 2 n + 1 = 1 st z 2 n < M
152 2re 2
153 152 a1i φ z S n 2 n + 1 = 1 st z 2
154 2pos 0 < 2
155 154 a1i φ z S n 2 n + 1 = 1 st z 0 < 2
156 ltmuldiv2 n M 2 0 < 2 2 n < M n < M 2
157 141 127 153 155 156 syl112anc φ z S n 2 n + 1 = 1 st z 2 n < M n < M 2
158 151 157 mpbid φ z S n 2 n + 1 = 1 st z n < M 2
159 128 recnd φ z S n 2 n + 1 = 1 st z M 2
160 125 nncnd φ M
161 160 ad2antrr φ z S n 2 n + 1 = 1 st z M
162 161 2halvesd φ z S n 2 n + 1 = 1 st z M 2 + M 2 = M
163 159 159 162 mvlraddd φ z S n 2 n + 1 = 1 st z M 2 = M M 2
164 158 163 breqtrd φ z S n 2 n + 1 = 1 st z n < M M 2
165 141 127 128 164 ltsub13d φ z S n 2 n + 1 = 1 st z M 2 < M n
166 136 128 137 139 165 lelttrd φ z S n 2 n + 1 = 1 st z M 2 < M n
167 zltp1le M 2 M n M 2 < M n M 2 + 1 M n
168 129 134 167 syl2anc φ z S n 2 n + 1 = 1 st z M 2 < M n M 2 + 1 M n
169 166 168 mpbid φ z S n 2 n + 1 = 1 st z M 2 + 1 M n
170 2t0e0 2 0 = 0
171 2cn 2
172 zcn n n
173 172 ad2antrl φ z S n 2 n + 1 = 1 st z n
174 mulcl 2 n 2 n
175 171 173 174 sylancr φ z S n 2 n + 1 = 1 st z 2 n
176 pncan 2 n 1 2 n + 1 - 1 = 2 n
177 175 47 176 sylancl φ z S n 2 n + 1 = 1 st z 2 n + 1 - 1 = 2 n
178 elfznn 2 n + 1 1 M 2 n + 1
179 nnm1nn0 2 n + 1 2 n + 1 - 1 0
180 144 178 179 3syl φ z S n 2 n + 1 = 1 st z 2 n + 1 - 1 0
181 177 180 eqeltrrd φ z S n 2 n + 1 = 1 st z 2 n 0
182 181 nn0ge0d φ z S n 2 n + 1 = 1 st z 0 2 n
183 170 182 eqbrtrid φ z S n 2 n + 1 = 1 st z 2 0 2 n
184 0red φ z S n 2 n + 1 = 1 st z 0
185 lemul2 0 n 2 0 < 2 0 n 2 0 2 n
186 184 141 153 155 185 syl112anc φ z S n 2 n + 1 = 1 st z 0 n 2 0 2 n
187 183 186 mpbird φ z S n 2 n + 1 = 1 st z 0 n
188 127 141 subge02d φ z S n 2 n + 1 = 1 st z 0 n M n M
189 187 188 mpbid φ z S n 2 n + 1 = 1 st z M n M
190 130 132 134 169 189 elfzd φ z S n 2 n + 1 = 1 st z M n M 2 + 1 M
191 92 ad2antrr φ z S n 2 n + 1 = 1 st z P
192 prmnn P P
193 191 192 syl φ z S n 2 n + 1 = 1 st z P
194 193 nncnd φ z S n 2 n + 1 = 1 st z P
195 peano2cn 2 n 2 n + 1
196 175 195 syl φ z S n 2 n + 1 = 1 st z 2 n + 1
197 194 196 nncand φ z S n 2 n + 1 = 1 st z P P 2 n + 1 = 2 n + 1
198 1cnd φ z S n 2 n + 1 = 1 st z 1
199 194 175 198 sub32d φ z S n 2 n + 1 = 1 st z P - 2 n - 1 = P - 1 - 2 n
200 194 175 198 subsub4d φ z S n 2 n + 1 = 1 st z P - 2 n - 1 = P 2 n + 1
201 2cnd φ z S n 2 n + 1 = 1 st z 2
202 201 161 173 subdid φ z S n 2 n + 1 = 1 st z 2 M n = 2 M 2 n
203 4 oveq2i 2 M = 2 P 1 2
204 14 nnzd φ P
205 204 ad2antrr φ z S n 2 n + 1 = 1 st z P
206 peano2zm P P 1
207 205 206 syl φ z S n 2 n + 1 = 1 st z P 1
208 207 zcnd φ z S n 2 n + 1 = 1 st z P 1
209 76 a1i φ z S n 2 n + 1 = 1 st z 2 0
210 208 201 209 divcan2d φ z S n 2 n + 1 = 1 st z 2 P 1 2 = P 1
211 203 210 syl5eq φ z S n 2 n + 1 = 1 st z 2 M = P 1
212 211 oveq1d φ z S n 2 n + 1 = 1 st z 2 M 2 n = P - 1 - 2 n
213 202 212 eqtr2d φ z S n 2 n + 1 = 1 st z P - 1 - 2 n = 2 M n
214 199 200 213 3eqtr3d φ z S n 2 n + 1 = 1 st z P 2 n + 1 = 2 M n
215 214 oveq2d φ z S n 2 n + 1 = 1 st z P P 2 n + 1 = P 2 M n
216 197 215 142 3eqtr3rd φ z S n 2 n + 1 = 1 st z 1 st z = P 2 M n
217 oveq2 u = M n 2 u = 2 M n
218 217 oveq2d u = M n P 2 u = P 2 M n
219 218 rspceeqv M n M 2 + 1 M 1 st z = P 2 M n u M 2 + 1 M 1 st z = P 2 u
220 190 216 219 syl2anc φ z S n 2 n + 1 = 1 st z u M 2 + 1 M 1 st z = P 2 u
221 220 rexlimdvaa φ z S n 2 n + 1 = 1 st z u M 2 + 1 M 1 st z = P 2 u
222 124 221 sylbid φ z S ¬ 2 1 st z u M 2 + 1 M 1 st z = P 2 u
223 117 222 impbid φ z S u M 2 + 1 M 1 st z = P 2 u ¬ 2 1 st z
224 223 rabbidva φ z S | u M 2 + 1 M 1 st z = P 2 u = z S | ¬ 2 1 st z
225 84 224 syl5eq φ u = M 2 + 1 M z S | 1 st z = P 2 u = z S | ¬ 2 1 st z
226 225 fveq2d φ u = M 2 + 1 M z S | 1 st z = P 2 u = z S | ¬ 2 1 st z
227 6 relopabiv Rel S
228 relss z S | 1 st z = P 2 u S Rel S Rel z S | 1 st z = P 2 u
229 57 227 228 mp2 Rel z S | 1 st z = P 2 u
230 relxp Rel P 2 u × 1 2 N Q P 2 u
231 6 eleq2i x y S x y x y | x 1 M y 1 N y P < x Q
232 opabidw x y x y | x 1 M y 1 N y P < x Q x 1 M y 1 N y P < x Q
233 231 232 bitri x y S x 1 M y 1 N y P < x Q
234 anass y y N y P < P 2 u Q y y N y P < P 2 u Q
235 24 peano2zd φ u M 2 + 1 M Q P 2 u + 1
236 235 zred φ u M 2 + 1 M Q P 2 u + 1
237 236 adantr φ u M 2 + 1 M y Q P 2 u + 1
238 13 ad2antrr φ u M 2 + 1 M y Q
239 nnre y y
240 239 adantl φ u M 2 + 1 M y y
241 lesub Q P 2 u + 1 Q y Q P 2 u + 1 Q y y Q Q P 2 u + 1
242 237 238 240 241 syl3anc φ u M 2 + 1 M y Q P 2 u + 1 Q y y Q Q P 2 u + 1
243 13 adantr φ u M 2 + 1 M Q
244 243 recnd φ u M 2 + 1 M Q
245 66 244 mulcomd φ u M 2 + 1 M P Q = Q P
246 68 244 mulcomd φ u M 2 + 1 M 2 u Q = Q 2 u
247 65 nnne0d φ u M 2 + 1 M P 0
248 244 66 247 divcan1d φ u M 2 + 1 M Q P P = Q
249 248 oveq1d φ u M 2 + 1 M Q P P 2 u = Q 2 u
250 16 recnd φ u M 2 + 1 M Q P
251 250 66 68 mul32d φ u M 2 + 1 M Q P P 2 u = Q P 2 u P
252 246 249 251 3eqtr2d φ u M 2 + 1 M 2 u Q = Q P 2 u P
253 245 252 oveq12d φ u M 2 + 1 M P Q 2 u Q = Q P Q P 2 u P
254 66 68 244 subdird φ u M 2 + 1 M P 2 u Q = P Q 2 u Q
255 23 recnd φ u M 2 + 1 M Q P 2 u
256 244 255 66 subdird φ u M 2 + 1 M Q Q P 2 u P = Q P Q P 2 u P
257 253 254 256 3eqtr4d φ u M 2 + 1 M P 2 u Q = Q Q P 2 u P
258 257 adantr φ u M 2 + 1 M y P 2 u Q = Q Q P 2 u P
259 258 breq2d φ u M 2 + 1 M y y P < P 2 u Q y P < Q Q P 2 u P
260 23 adantr φ u M 2 + 1 M y Q P 2 u
261 238 260 resubcld φ u M 2 + 1 M y Q Q P 2 u
262 65 adantr φ u M 2 + 1 M y P
263 262 nnred φ u M 2 + 1 M y P
264 262 nngt0d φ u M 2 + 1 M y 0 < P
265 ltmul1 y Q Q P 2 u P 0 < P y < Q Q P 2 u y P < Q Q P 2 u P
266 240 261 263 264 265 syl112anc φ u M 2 + 1 M y y < Q Q P 2 u y P < Q Q P 2 u P
267 ltsub13 y Q Q P 2 u y < Q Q P 2 u Q P 2 u < Q y
268 240 238 260 267 syl3anc φ u M 2 + 1 M y y < Q Q P 2 u Q P 2 u < Q y
269 259 266 268 3bitr2d φ u M 2 + 1 M y y P < P 2 u Q Q P 2 u < Q y
270 12 adantr φ u M 2 + 1 M Q
271 270 nnzd φ u M 2 + 1 M Q
272 nnz y y
273 zsubcl Q y Q y
274 271 272 273 syl2an φ u M 2 + 1 M y Q y
275 fllt Q P 2 u Q y Q P 2 u < Q y Q P 2 u < Q y
276 260 274 275 syl2anc φ u M 2 + 1 M y Q P 2 u < Q y Q P 2 u < Q y
277 24 adantr φ u M 2 + 1 M y Q P 2 u
278 zltp1le Q P 2 u Q y Q P 2 u < Q y Q P 2 u + 1 Q y
279 277 274 278 syl2anc φ u M 2 + 1 M y Q P 2 u < Q y Q P 2 u + 1 Q y
280 269 276 279 3bitrd φ u M 2 + 1 M y y P < P 2 u Q Q P 2 u + 1 Q y
281 5 oveq2i 2 N = 2 Q 1 2
282 peano2rem Q Q 1
283 243 282 syl φ u M 2 + 1 M Q 1
284 283 recnd φ u M 2 + 1 M Q 1
285 2cnd φ u M 2 + 1 M 2
286 76 a1i φ u M 2 + 1 M 2 0
287 284 285 286 divcan2d φ u M 2 + 1 M 2 Q 1 2 = Q 1
288 281 287 syl5eq φ u M 2 + 1 M 2 N = Q 1
289 288 oveq1d φ u M 2 + 1 M 2 N Q P 2 u = Q - 1 - Q P 2 u
290 1cnd φ u M 2 + 1 M 1
291 24 zcnd φ u M 2 + 1 M Q P 2 u
292 244 290 291 sub32d φ u M 2 + 1 M Q - 1 - Q P 2 u = Q - Q P 2 u - 1
293 244 291 290 subsub4d φ u M 2 + 1 M Q - Q P 2 u - 1 = Q Q P 2 u + 1
294 289 292 293 3eqtrd φ u M 2 + 1 M 2 N Q P 2 u = Q Q P 2 u + 1
295 294 adantr φ u M 2 + 1 M y 2 N Q P 2 u = Q Q P 2 u + 1
296 295 breq2d φ u M 2 + 1 M y y 2 N Q P 2 u y Q Q P 2 u + 1
297 242 280 296 3bitr4d φ u M 2 + 1 M y y P < P 2 u Q y 2 N Q P 2 u
298 297 anbi2d φ u M 2 + 1 M y y N y P < P 2 u Q y N y 2 N Q P 2 u
299 2nn 2
300 2 5 gausslemma2dlem0b φ N
301 nnmulcl 2 N 2 N
302 299 300 301 sylancr φ 2 N
303 302 adantr φ u M 2 + 1 M 2 N
304 303 nnred φ u M 2 + 1 M 2 N
305 300 adantr φ u M 2 + 1 M N
306 305 nnred φ u M 2 + 1 M N
307 24 zred φ u M 2 + 1 M Q P 2 u
308 300 nncnd φ N
309 308 adantr φ u M 2 + 1 M N
310 309 2timesd φ u M 2 + 1 M 2 N = N + N
311 309 309 310 mvrladdd φ u M 2 + 1 M 2 N N = N
312 243 rehalfcld φ u M 2 + 1 M Q 2
313 243 ltm1d φ u M 2 + 1 M Q 1 < Q
314 152 a1i φ u M 2 + 1 M 2
315 154 a1i φ u M 2 + 1 M 0 < 2
316 ltdiv1 Q 1 Q 2 0 < 2 Q 1 < Q Q 1 2 < Q 2
317 283 243 314 315 316 syl112anc φ u M 2 + 1 M Q 1 < Q Q 1 2 < Q 2
318 313 317 mpbid φ u M 2 + 1 M Q 1 2 < Q 2
319 5 318 eqbrtrid φ u M 2 + 1 M N < Q 2
320 306 312 319 ltled φ u M 2 + 1 M N Q 2
321 244 285 66 286 div32d φ u M 2 + 1 M Q 2 P = Q P 2
322 126 adantr φ u M 2 + 1 M M
323 322 rehalfcld φ u M 2 + 1 M M 2
324 peano2re M 2 M 2 + 1
325 323 135 324 3syl φ u M 2 + 1 M M 2 + 1
326 19 zred φ u M 2 + 1 M u
327 flltp1 M 2 M 2 < M 2 + 1
328 323 327 syl φ u M 2 + 1 M M 2 < M 2 + 1
329 elfzle1 u M 2 + 1 M M 2 + 1 u
330 329 adantl φ u M 2 + 1 M M 2 + 1 u
331 323 325 326 328 330 ltletrd φ u M 2 + 1 M M 2 < u
332 ltdivmul M u 2 0 < 2 M 2 < u M < 2 u
333 322 326 314 315 332 syl112anc φ u M 2 + 1 M M 2 < u M < 2 u
334 331 333 mpbid φ u M 2 + 1 M M < 2 u
335 4 334 eqbrtrrid φ u M 2 + 1 M P 1 2 < 2 u
336 65 nnred φ u M 2 + 1 M P
337 peano2rem P P 1
338 336 337 syl φ u M 2 + 1 M P 1
339 ltdivmul P 1 2 u 2 0 < 2 P 1 2 < 2 u P 1 < 2 2 u
340 338 22 314 315 339 syl112anc φ u M 2 + 1 M P 1 2 < 2 u P 1 < 2 2 u
341 335 340 mpbid φ u M 2 + 1 M P 1 < 2 2 u
342 204 adantr φ u M 2 + 1 M P
343 zmulcl 2 2 u 2 2 u
344 17 21 343 sylancr φ u M 2 + 1 M 2 2 u
345 zlem1lt P 2 2 u P 2 2 u P 1 < 2 2 u
346 342 344 345 syl2anc φ u M 2 + 1 M P 2 2 u P 1 < 2 2 u
347 341 346 mpbird φ u M 2 + 1 M P 2 2 u
348 ledivmul P 2 u 2 0 < 2 P 2 2 u P 2 2 u
349 336 22 314 315 348 syl112anc φ u M 2 + 1 M P 2 2 u P 2 2 u
350 347 349 mpbird φ u M 2 + 1 M P 2 2 u
351 336 rehalfcld φ u M 2 + 1 M P 2
352 270 nngt0d φ u M 2 + 1 M 0 < Q
353 lemul2 P 2 2 u Q 0 < Q P 2 2 u Q P 2 Q 2 u
354 351 22 243 352 353 syl112anc φ u M 2 + 1 M P 2 2 u Q P 2 Q 2 u
355 350 354 mpbid φ u M 2 + 1 M Q P 2 Q 2 u
356 321 355 eqbrtrd φ u M 2 + 1 M Q 2 P Q 2 u
357 243 22 remulcld φ u M 2 + 1 M Q 2 u
358 65 nngt0d φ u M 2 + 1 M 0 < P
359 lemuldiv Q 2 Q 2 u P 0 < P Q 2 P Q 2 u Q 2 Q 2 u P
360 312 357 336 358 359 syl112anc φ u M 2 + 1 M Q 2 P Q 2 u Q 2 Q 2 u P
361 356 360 mpbid φ u M 2 + 1 M Q 2 Q 2 u P
362 244 68 66 247 div23d φ u M 2 + 1 M Q 2 u P = Q P 2 u
363 361 362 breqtrd φ u M 2 + 1 M Q 2 Q P 2 u
364 306 312 23 320 363 letrd φ u M 2 + 1 M N Q P 2 u
365 300 nnzd φ N
366 365 adantr φ u M 2 + 1 M N
367 flge Q P 2 u N N Q P 2 u N Q P 2 u
368 23 366 367 syl2anc φ u M 2 + 1 M N Q P 2 u N Q P 2 u
369 364 368 mpbid φ u M 2 + 1 M N Q P 2 u
370 311 369 eqbrtrd φ u M 2 + 1 M 2 N N Q P 2 u
371 304 306 307 370 subled φ u M 2 + 1 M 2 N Q P 2 u N
372 371 adantr φ u M 2 + 1 M y 2 N Q P 2 u N
373 303 nnzd φ u M 2 + 1 M 2 N
374 373 24 zsubcld φ u M 2 + 1 M 2 N Q P 2 u
375 374 adantr φ u M 2 + 1 M y 2 N Q P 2 u
376 375 zred φ u M 2 + 1 M y 2 N Q P 2 u
377 300 ad2antrr φ u M 2 + 1 M y N
378 377 nnred φ u M 2 + 1 M y N
379 letr y 2 N Q P 2 u N y 2 N Q P 2 u 2 N Q P 2 u N y N
380 240 376 378 379 syl3anc φ u M 2 + 1 M y y 2 N Q P 2 u 2 N Q P 2 u N y N
381 372 380 mpan2d φ u M 2 + 1 M y y 2 N Q P 2 u y N
382 381 pm4.71rd φ u M 2 + 1 M y y 2 N Q P 2 u y N y 2 N Q P 2 u
383 298 382 bitr4d φ u M 2 + 1 M y y N y P < P 2 u Q y 2 N Q P 2 u
384 383 pm5.32da φ u M 2 + 1 M y y N y P < P 2 u Q y y 2 N Q P 2 u
385 384 adantr φ u M 2 + 1 M x = P 2 u y y N y P < P 2 u Q y y 2 N Q P 2 u
386 234 385 syl5bb φ u M 2 + 1 M x = P 2 u y y N y P < P 2 u Q y y 2 N Q P 2 u
387 simpr φ u M 2 + 1 M x = P 2 u x = P 2 u
388 342 21 zsubcld φ u M 2 + 1 M P 2 u
389 elfzle2 u M 2 + 1 M u M
390 389 adantl φ u M 2 + 1 M u M
391 390 4 breqtrdi φ u M 2 + 1 M u P 1 2
392 lemuldiv2 u P 1 2 0 < 2 2 u P 1 u P 1 2
393 326 338 314 315 392 syl112anc φ u M 2 + 1 M 2 u P 1 u P 1 2
394 391 393 mpbird φ u M 2 + 1 M 2 u P 1
395 336 ltm1d φ u M 2 + 1 M P 1 < P
396 22 338 336 394 395 lelttrd φ u M 2 + 1 M 2 u < P
397 22 336 posdifd φ u M 2 + 1 M 2 u < P 0 < P 2 u
398 396 397 mpbid φ u M 2 + 1 M 0 < P 2 u
399 elnnz P 2 u P 2 u 0 < P 2 u
400 388 398 399 sylanbrc φ u M 2 + 1 M P 2 u
401 66 68 290 sub32d φ u M 2 + 1 M P - 2 u - 1 = P - 1 - 2 u
402 4 4 oveq12i M + M = P 1 2 + P 1 2
403 65 nnzd φ u M 2 + 1 M P
404 403 206 syl φ u M 2 + 1 M P 1
405 404 zcnd φ u M 2 + 1 M P 1
406 405 2halvesd φ u M 2 + 1 M P 1 2 + P 1 2 = P 1
407 402 406 syl5eq φ u M 2 + 1 M M + M = P 1
408 407 oveq1d φ u M 2 + 1 M M + M - M = P - 1 - M
409 160 adantr φ u M 2 + 1 M M
410 409 409 pncan2d φ u M 2 + 1 M M + M - M = M
411 408 410 eqtr3d φ u M 2 + 1 M P - 1 - M = M
412 411 334 eqbrtrd φ u M 2 + 1 M P - 1 - M < 2 u
413 338 322 22 412 ltsub23d φ u M 2 + 1 M P - 1 - 2 u < M
414 401 413 eqbrtrd φ u M 2 + 1 M P - 2 u - 1 < M
415 125 adantr φ u M 2 + 1 M M
416 415 nnzd φ u M 2 + 1 M M
417 zlem1lt P 2 u M P 2 u M P - 2 u - 1 < M
418 388 416 417 syl2anc φ u M 2 + 1 M P 2 u M P - 2 u - 1 < M
419 414 418 mpbird φ u M 2 + 1 M P 2 u M
420 fznn M P 2 u 1 M P 2 u P 2 u M
421 416 420 syl φ u M 2 + 1 M P 2 u 1 M P 2 u P 2 u M
422 400 419 421 mpbir2and φ u M 2 + 1 M P 2 u 1 M
423 422 adantr φ u M 2 + 1 M x = P 2 u P 2 u 1 M
424 387 423 eqeltrd φ u M 2 + 1 M x = P 2 u x 1 M
425 424 biantrurd φ u M 2 + 1 M x = P 2 u y 1 N x 1 M y 1 N
426 365 ad2antrr φ u M 2 + 1 M x = P 2 u N
427 fznn N y 1 N y y N
428 426 427 syl φ u M 2 + 1 M x = P 2 u y 1 N y y N
429 425 428 bitr3d φ u M 2 + 1 M x = P 2 u x 1 M y 1 N y y N
430 387 oveq1d φ u M 2 + 1 M x = P 2 u x Q = P 2 u Q
431 430 breq2d φ u M 2 + 1 M x = P 2 u y P < x Q y P < P 2 u Q
432 429 431 anbi12d φ u M 2 + 1 M x = P 2 u x 1 M y 1 N y P < x Q y y N y P < P 2 u Q
433 374 adantr φ u M 2 + 1 M x = P 2 u 2 N Q P 2 u
434 fznn 2 N Q P 2 u y 1 2 N Q P 2 u y y 2 N Q P 2 u
435 433 434 syl φ u M 2 + 1 M x = P 2 u y 1 2 N Q P 2 u y y 2 N Q P 2 u
436 386 432 435 3bitr4d φ u M 2 + 1 M x = P 2 u x 1 M y 1 N y P < x Q y 1 2 N Q P 2 u
437 233 436 syl5bb φ u M 2 + 1 M x = P 2 u x y S y 1 2 N Q P 2 u
438 437 pm5.32da φ u M 2 + 1 M x = P 2 u x y S x = P 2 u y 1 2 N Q P 2 u
439 vex x V
440 vex y V
441 439 440 op1std z = x y 1 st z = x
442 441 eqeq1d z = x y 1 st z = P 2 u x = P 2 u
443 442 elrab x y z S | 1 st z = P 2 u x y S x = P 2 u
444 443 biancomi x y z S | 1 st z = P 2 u x = P 2 u x y S
445 opelxp x y P 2 u × 1 2 N Q P 2 u x P 2 u y 1 2 N Q P 2 u
446 velsn x P 2 u x = P 2 u
447 446 anbi1i x P 2 u y 1 2 N Q P 2 u x = P 2 u y 1 2 N Q P 2 u
448 445 447 bitri x y P 2 u × 1 2 N Q P 2 u x = P 2 u y 1 2 N Q P 2 u
449 438 444 448 3bitr4g φ u M 2 + 1 M x y z S | 1 st z = P 2 u x y P 2 u × 1 2 N Q P 2 u
450 229 230 449 eqrelrdv φ u M 2 + 1 M z S | 1 st z = P 2 u = P 2 u × 1 2 N Q P 2 u
451 450 fveq2d φ u M 2 + 1 M z S | 1 st z = P 2 u = P 2 u × 1 2 N Q P 2 u
452 fzfid φ u M 2 + 1 M 1 2 N Q P 2 u Fin
453 xpsnen2g P 2 u 1 2 N Q P 2 u Fin P 2 u × 1 2 N Q P 2 u 1 2 N Q P 2 u
454 388 452 453 syl2anc φ u M 2 + 1 M P 2 u × 1 2 N Q P 2 u 1 2 N Q P 2 u
455 hasheni P 2 u × 1 2 N Q P 2 u 1 2 N Q P 2 u P 2 u × 1 2 N Q P 2 u = 1 2 N Q P 2 u
456 454 455 syl φ u M 2 + 1 M P 2 u × 1 2 N Q P 2 u = 1 2 N Q P 2 u
457 ltmul2 2 u P Q 0 < Q 2 u < P Q 2 u < Q P
458 22 336 243 352 457 syl112anc φ u M 2 + 1 M 2 u < P Q 2 u < Q P
459 396 458 mpbid φ u M 2 + 1 M Q 2 u < Q P
460 ltdivmul2 Q 2 u Q P 0 < P Q 2 u P < Q Q 2 u < Q P
461 357 243 336 358 460 syl112anc φ u M 2 + 1 M Q 2 u P < Q Q 2 u < Q P
462 459 461 mpbird φ u M 2 + 1 M Q 2 u P < Q
463 362 462 eqbrtrrd φ u M 2 + 1 M Q P 2 u < Q
464 fllt Q P 2 u Q Q P 2 u < Q Q P 2 u < Q
465 23 271 464 syl2anc φ u M 2 + 1 M Q P 2 u < Q Q P 2 u < Q
466 463 465 mpbid φ u M 2 + 1 M Q P 2 u < Q
467 zltlem1 Q P 2 u Q Q P 2 u < Q Q P 2 u Q 1
468 24 271 467 syl2anc φ u M 2 + 1 M Q P 2 u < Q Q P 2 u Q 1
469 466 468 mpbid φ u M 2 + 1 M Q P 2 u Q 1
470 469 288 breqtrrd φ u M 2 + 1 M Q P 2 u 2 N
471 eluz2 2 N Q P 2 u Q P 2 u 2 N Q P 2 u 2 N
472 24 373 470 471 syl3anbrc φ u M 2 + 1 M 2 N Q P 2 u
473 uznn0sub 2 N Q P 2 u 2 N Q P 2 u 0
474 hashfz1 2 N Q P 2 u 0 1 2 N Q P 2 u = 2 N Q P 2 u
475 472 473 474 3syl φ u M 2 + 1 M 1 2 N Q P 2 u = 2 N Q P 2 u
476 451 456 475 3eqtrd φ u M 2 + 1 M z S | 1 st z = P 2 u = 2 N Q P 2 u
477 476 sumeq2dv φ u = M 2 + 1 M z S | 1 st z = P 2 u = u = M 2 + 1 M 2 N Q P 2 u
478 83 226 477 3eqtr3rd φ u = M 2 + 1 M 2 N Q P 2 u = z S | ¬ 2 1 st z
479 302 nncnd φ 2 N
480 479 adantr φ u M 2 + 1 M 2 N
481 11 480 291 fsumsub φ u = M 2 + 1 M 2 N Q P 2 u = u = M 2 + 1 M 2 N u = M 2 + 1 M Q P 2 u
482 478 481 eqtr3d φ z S | ¬ 2 1 st z = u = M 2 + 1 M 2 N u = M 2 + 1 M Q P 2 u
483 482 oveq2d φ u = M 2 + 1 M Q P 2 u + z S | ¬ 2 1 st z = u = M 2 + 1 M Q P 2 u + u = M 2 + 1 M 2 N - u = M 2 + 1 M Q P 2 u
484 25 zcnd φ u = M 2 + 1 M Q P 2 u
485 11 373 fsumzcl φ u = M 2 + 1 M 2 N
486 485 zcnd φ u = M 2 + 1 M 2 N
487 484 486 pncan3d φ u = M 2 + 1 M Q P 2 u + u = M 2 + 1 M 2 N - u = M 2 + 1 M Q P 2 u = u = M 2 + 1 M 2 N
488 fsumconst M 2 + 1 M Fin 2 N u = M 2 + 1 M 2 N = M 2 + 1 M 2 N
489 11 479 488 syl2anc φ u = M 2 + 1 M 2 N = M 2 + 1 M 2 N
490 hashcl M 2 + 1 M Fin M 2 + 1 M 0
491 11 490 syl φ M 2 + 1 M 0
492 491 nn0cnd φ M 2 + 1 M
493 2cnd φ 2
494 492 493 308 mul12d φ M 2 + 1 M 2 N = 2 M 2 + 1 M N
495 489 494 eqtrd φ u = M 2 + 1 M 2 N = 2 M 2 + 1 M N
496 483 487 495 3eqtrd φ u = M 2 + 1 M Q P 2 u + z S | ¬ 2 1 st z = 2 M 2 + 1 M N
497 496 oveq2d φ 1 u = M 2 + 1 M Q P 2 u + z S | ¬ 2 1 st z = 1 2 M 2 + 1 M N
498 17 a1i φ 2
499 491 nn0zd φ M 2 + 1 M
500 499 365 zmulcld φ M 2 + 1 M N
501 expmulz 1 1 0 2 M 2 + 1 M N 1 2 M 2 + 1 M N = -1 2 M 2 + 1 M N
502 8 10 498 500 501 syl22anc φ 1 2 M 2 + 1 M N = -1 2 M 2 + 1 M N
503 neg1sqe1 1 2 = 1
504 503 oveq1i -1 2 M 2 + 1 M N = 1 M 2 + 1 M N
505 1exp M 2 + 1 M N 1 M 2 + 1 M N = 1
506 500 505 syl φ 1 M 2 + 1 M N = 1
507 504 506 syl5eq φ -1 2 M 2 + 1 M N = 1
508 497 502 507 3eqtrd φ 1 u = M 2 + 1 M Q P 2 u + z S | ¬ 2 1 st z = 1
509 44 55 508 3eqtr4d φ 1 z S | ¬ 2 1 st z 1 z S | ¬ 2 1 st z = 1 u = M 2 + 1 M Q P 2 u + z S | ¬ 2 1 st z
510 expaddz 1 1 0 u = M 2 + 1 M Q P 2 u z S | ¬ 2 1 st z 1 u = M 2 + 1 M Q P 2 u + z S | ¬ 2 1 st z = 1 u = M 2 + 1 M Q P 2 u 1 z S | ¬ 2 1 st z
511 8 10 25 42 510 syl22anc φ 1 u = M 2 + 1 M Q P 2 u + z S | ¬ 2 1 st z = 1 u = M 2 + 1 M Q P 2 u 1 z S | ¬ 2 1 st z
512 509 511 eqtr2d φ 1 u = M 2 + 1 M Q P 2 u 1 z S | ¬ 2 1 st z = 1 z S | ¬ 2 1 st z 1 z S | ¬ 2 1 st z
513 26 41 41 43 512 mulcan2ad φ 1 u = M 2 + 1 M Q P 2 u = 1 z S | ¬ 2 1 st z