Metamath Proof Explorer


Theorem ballotlemfc0

Description: F takes value 0 between negative and positive values. (Contributed by Thierry Arnoux, 24-Nov-2016)

Ref Expression
Hypotheses ballotth.m M
ballotth.n N
ballotth.o O = c 𝒫 1 M + N | c = M
ballotth.p P = x 𝒫 O x O
ballotth.f F = c O i 1 i c 1 i c
ballotlemfp1.c φ C O
ballotlemfp1.j φ J
ballotlemfc0.3 φ i 1 J F C i 0
ballotlemfc0.4 φ 0 < F C J
Assertion ballotlemfc0 φ k 1 J F C k = 0

Proof

Step Hyp Ref Expression
1 ballotth.m M
2 ballotth.n N
3 ballotth.o O = c 𝒫 1 M + N | c = M
4 ballotth.p P = x 𝒫 O x O
5 ballotth.f F = c O i 1 i c 1 i c
6 ballotlemfp1.c φ C O
7 ballotlemfp1.j φ J
8 ballotlemfc0.3 φ i 1 J F C i 0
9 ballotlemfc0.4 φ 0 < F C J
10 fveq2 i = k F C i = F C k
11 10 breq1d i = k F C i 0 F C k 0
12 11 elrab k i 1 J | F C i 0 k 1 J F C k 0
13 12 anbi1i k i 1 J | F C i 0 j i 1 J | F C i 0 j k k 1 J F C k 0 j i 1 J | F C i 0 j k
14 simprlr φ k 1 J F C k 0 j i 1 J | F C i 0 j k F C k 0
15 simprl φ k 1 J F C k 0 k 1 J
16 15 adantrr φ k 1 J F C k 0 j i 1 J | F C i 0 j k k 1 J
17 fzssuz 1 J 1
18 uzssz 1
19 17 18 sstri 1 J
20 zssre
21 19 20 sstri 1 J
22 21 sseli k 1 J k
23 22 ltp1d k 1 J k < k + 1
24 1red k 1 J 1
25 22 24 readdcld k 1 J k + 1
26 22 25 ltnled k 1 J k < k + 1 ¬ k + 1 k
27 23 26 mpbid k 1 J ¬ k + 1 k
28 16 27 syl φ k 1 J F C k 0 j i 1 J | F C i 0 j k ¬ k + 1 k
29 simprr φ k 1 J F C k 0 j i 1 J | F C i 0 j k j i 1 J | F C i 0 j k
30 9 adantr φ k = J 0 < F C J
31 simpr φ k = J k = J
32 31 fveq2d φ k = J F C k = F C J
33 32 breq2d φ k = J 0 < F C k 0 < F C J
34 elnnuz J J 1
35 7 34 sylib φ J 1
36 eluzfz2 J 1 J 1 J
37 35 36 syl φ J 1 J
38 eleq1 k = J k 1 J J 1 J
39 37 38 syl5ibrcom φ k = J k 1 J
40 39 anc2li φ k = J φ k 1 J
41 1eluzge0 1 0
42 fzss1 1 0 1 J 0 J
43 42 sseld 1 0 k 1 J k 0 J
44 41 43 ax-mp k 1 J k 0 J
45 0red φ k 0 J 0
46 6 adantr φ k 0 J C O
47 elfzelz k 0 J k
48 47 adantl φ k 0 J k
49 1 2 3 4 5 46 48 ballotlemfelz φ k 0 J F C k
50 49 zred φ k 0 J F C k
51 45 50 ltnled φ k 0 J 0 < F C k ¬ F C k 0
52 44 51 sylan2 φ k 1 J 0 < F C k ¬ F C k 0
53 40 52 syl6 φ k = J 0 < F C k ¬ F C k 0
54 53 imp φ k = J 0 < F C k ¬ F C k 0
55 33 54 bitr3d φ k = J 0 < F C J ¬ F C k 0
56 30 55 mpbid φ k = J ¬ F C k 0
57 56 ex φ k = J ¬ F C k 0
58 57 con2d φ F C k 0 ¬ k = J
59 nn1m1nn J J = 1 J 1
60 7 59 syl φ J = 1 J 1
61 8 adantr φ J = 1 i 1 J F C i 0
62 oveq1 J = 1 J J = 1 J
63 62 adantl φ J = 1 J J = 1 J
64 7 nnzd φ J
65 fzsn J J J = J
66 64 65 syl φ J J = J
67 66 adantr φ J = 1 J J = J
68 63 67 eqtr3d φ J = 1 1 J = J
69 68 rexeqdv φ J = 1 i 1 J F C i 0 i J F C i 0
70 61 69 mpbid φ J = 1 i J F C i 0
71 fveq2 i = J F C i = F C J
72 71 breq1d i = J F C i 0 F C J 0
73 72 rexsng J i J F C i 0 F C J 0
74 7 73 syl φ i J F C i 0 F C J 0
75 74 adantr φ J = 1 i J F C i 0 F C J 0
76 70 75 mpbid φ J = 1 F C J 0
77 9 adantr φ J = 1 0 < F C J
78 0red φ 0
79 1 2 3 4 5 6 64 ballotlemfelz φ F C J
80 79 zred φ F C J
81 78 80 ltnled φ 0 < F C J ¬ F C J 0
82 81 adantr φ J = 1 0 < F C J ¬ F C J 0
83 77 82 mpbid φ J = 1 ¬ F C J 0
84 76 83 pm2.65da φ ¬ J = 1
85 biortn ¬ J = 1 J 1 ¬ ¬ J = 1 J 1
86 84 85 syl φ J 1 ¬ ¬ J = 1 J 1
87 notnotb J = 1 ¬ ¬ J = 1
88 87 orbi1i J = 1 J 1 ¬ ¬ J = 1 J 1
89 86 88 bitr4di φ J 1 J = 1 J 1
90 60 89 mpbird φ J 1
91 elnnuz J 1 J 1 1
92 90 91 sylib φ J 1 1
93 elfzp1 J 1 1 k 1 J - 1 + 1 k 1 J 1 k = J - 1 + 1
94 92 93 syl φ k 1 J - 1 + 1 k 1 J 1 k = J - 1 + 1
95 7 nncnd φ J
96 1cnd φ 1
97 95 96 npcand φ J - 1 + 1 = J
98 97 oveq2d φ 1 J - 1 + 1 = 1 J
99 98 eleq2d φ k 1 J - 1 + 1 k 1 J
100 97 eqeq2d φ k = J - 1 + 1 k = J
101 100 orbi2d φ k 1 J 1 k = J - 1 + 1 k 1 J 1 k = J
102 94 99 101 3bitr3d φ k 1 J k 1 J 1 k = J
103 orcom k 1 J 1 k = J k = J k 1 J 1
104 102 103 bitrdi φ k 1 J k = J k 1 J 1
105 104 biimpd φ k 1 J k = J k 1 J 1
106 pm5.6 k 1 J ¬ k = J k 1 J 1 k 1 J k = J k 1 J 1
107 105 106 sylibr φ k 1 J ¬ k = J k 1 J 1
108 90 nnzd φ J 1
109 1z 1
110 108 109 jctil φ 1 J 1
111 elfzelz k 1 J 1 k
112 111 109 jctir k 1 J 1 k 1
113 fzaddel 1 J 1 k 1 k 1 J 1 k + 1 1 + 1 J - 1 + 1
114 110 112 113 syl2an φ k 1 J 1 k 1 J 1 k + 1 1 + 1 J - 1 + 1
115 114 biimp3a φ k 1 J 1 k 1 J 1 k + 1 1 + 1 J - 1 + 1
116 115 3anidm23 φ k 1 J 1 k + 1 1 + 1 J - 1 + 1
117 1p1e2 1 + 1 = 2
118 117 a1i φ 1 + 1 = 2
119 118 97 oveq12d φ 1 + 1 J - 1 + 1 = 2 J
120 119 eleq2d φ k + 1 1 + 1 J - 1 + 1 k + 1 2 J
121 2eluzge1 2 1
122 fzss1 2 1 2 J 1 J
123 121 122 ax-mp 2 J 1 J
124 123 sseli k + 1 2 J k + 1 1 J
125 120 124 syl6bi φ k + 1 1 + 1 J - 1 + 1 k + 1 1 J
126 125 adantr φ k 1 J 1 k + 1 1 + 1 J - 1 + 1 k + 1 1 J
127 116 126 mpd φ k 1 J 1 k + 1 1 J
128 127 ex φ k 1 J 1 k + 1 1 J
129 107 128 syld φ k 1 J ¬ k = J k + 1 1 J
130 58 129 sylan2d φ k 1 J F C k 0 k + 1 1 J
131 130 imp φ k 1 J F C k 0 k + 1 1 J
132 131 adantrr φ k 1 J F C k 0 j i 1 J | F C i 0 j k k + 1 1 J
133 fveq2 i = k + 1 F C i = F C k + 1
134 133 breq1d i = k + 1 F C i 0 F C k + 1 0
135 134 elrab k + 1 i 1 J | F C i 0 k + 1 1 J F C k + 1 0
136 breq1 j = k + 1 j k k + 1 k
137 136 rspccva j i 1 J | F C i 0 j k k + 1 i 1 J | F C i 0 k + 1 k
138 135 137 sylan2br j i 1 J | F C i 0 j k k + 1 1 J F C k + 1 0 k + 1 k
139 138 expr j i 1 J | F C i 0 j k k + 1 1 J F C k + 1 0 k + 1 k
140 139 con3d j i 1 J | F C i 0 j k k + 1 1 J ¬ k + 1 k ¬ F C k + 1 0
141 29 132 140 syl2anc φ k 1 J F C k 0 j i 1 J | F C i 0 j k ¬ k + 1 k ¬ F C k + 1 0
142 28 141 mpd φ k 1 J F C k 0 j i 1 J | F C i 0 j k ¬ F C k + 1 0
143 simplrr φ k 1 J F C k 0 j i 1 J | F C i 0 j k ¬ k + 1 C j i 1 J | F C i 0 j k
144 132 adantr φ k 1 J F C k 0 j i 1 J | F C i 0 j k ¬ k + 1 C k + 1 1 J
145 simpll φ k 1 J F C k 0 ¬ k + 1 C φ
146 131 adantr φ k 1 J F C k 0 ¬ k + 1 C k + 1 1 J
147 42 sseld 1 0 k + 1 1 J k + 1 0 J
148 41 146 147 mpsyl φ k 1 J F C k 0 ¬ k + 1 C k + 1 0 J
149 6 adantr φ k + 1 0 J C O
150 elfzelz k + 1 0 J k + 1
151 150 adantl φ k + 1 0 J k + 1
152 1 2 3 4 5 149 151 ballotlemfelz φ k + 1 0 J F C k + 1
153 152 zred φ k + 1 0 J F C k + 1
154 145 148 153 syl2anc φ k 1 J F C k 0 ¬ k + 1 C F C k + 1
155 0red φ k 1 J F C k 0 ¬ k + 1 C 0
156 simplrr φ k 1 J F C k 0 ¬ k + 1 C F C k 0
157 15 adantr φ k 1 J F C k 0 ¬ k + 1 C k 1 J
158 157 44 syl φ k 1 J F C k 0 ¬ k + 1 C k 0 J
159 130 imdistani φ k 1 J F C k 0 φ k + 1 1 J
160 6 adantr φ k + 1 1 J C O
161 elfznn k + 1 1 J k + 1
162 161 adantl φ k + 1 1 J k + 1
163 1 2 3 4 5 160 162 ballotlemfp1 φ k + 1 1 J ¬ k + 1 C F C k + 1 = F C k + 1 - 1 1 k + 1 C F C k + 1 = F C k + 1 - 1 + 1
164 163 simpld φ k + 1 1 J ¬ k + 1 C F C k + 1 = F C k + 1 - 1 1
165 164 imp φ k + 1 1 J ¬ k + 1 C F C k + 1 = F C k + 1 - 1 1
166 159 165 sylan φ k 1 J F C k 0 ¬ k + 1 C F C k + 1 = F C k + 1 - 1 1
167 elfzelz k 1 J k
168 167 zcnd k 1 J k
169 1cnd k 1 J 1
170 168 169 pncand k 1 J k + 1 - 1 = k
171 170 fveq2d k 1 J F C k + 1 - 1 = F C k
172 171 oveq1d k 1 J F C k + 1 - 1 1 = F C k 1
173 172 eqeq2d k 1 J F C k + 1 = F C k + 1 - 1 1 F C k + 1 = F C k 1
174 157 173 syl φ k 1 J F C k 0 ¬ k + 1 C F C k + 1 = F C k + 1 - 1 1 F C k + 1 = F C k 1
175 166 174 mpbid φ k 1 J F C k 0 ¬ k + 1 C F C k + 1 = F C k 1
176 0z 0
177 zlem1lt F C k 0 F C k 0 F C k 1 < 0
178 49 176 177 sylancl φ k 0 J F C k 0 F C k 1 < 0
179 178 adantr φ k 0 J F C k + 1 = F C k 1 F C k 0 F C k 1 < 0
180 breq1 F C k + 1 = F C k 1 F C k + 1 < 0 F C k 1 < 0
181 180 adantl φ k 0 J F C k + 1 = F C k 1 F C k + 1 < 0 F C k 1 < 0
182 179 181 bitr4d φ k 0 J F C k + 1 = F C k 1 F C k 0 F C k + 1 < 0
183 145 158 175 182 syl21anc φ k 1 J F C k 0 ¬ k + 1 C F C k 0 F C k + 1 < 0
184 156 183 mpbid φ k 1 J F C k 0 ¬ k + 1 C F C k + 1 < 0
185 154 155 184 ltled φ k 1 J F C k 0 ¬ k + 1 C F C k + 1 0
186 185 adantlrr φ k 1 J F C k 0 j i 1 J | F C i 0 j k ¬ k + 1 C F C k + 1 0
187 143 144 186 138 syl12anc φ k 1 J F C k 0 j i 1 J | F C i 0 j k ¬ k + 1 C k + 1 k
188 28 adantr φ k 1 J F C k 0 j i 1 J | F C i 0 j k ¬ k + 1 C ¬ k + 1 k
189 187 188 condan φ k 1 J F C k 0 j i 1 J | F C i 0 j k k + 1 C
190 163 simprd φ k + 1 1 J k + 1 C F C k + 1 = F C k + 1 - 1 + 1
191 190 imp φ k + 1 1 J k + 1 C F C k + 1 = F C k + 1 - 1 + 1
192 159 191 sylan φ k 1 J F C k 0 k + 1 C F C k + 1 = F C k + 1 - 1 + 1
193 15 adantr φ k 1 J F C k 0 k + 1 C k 1 J
194 171 oveq1d k 1 J F C k + 1 - 1 + 1 = F C k + 1
195 194 eqeq2d k 1 J F C k + 1 = F C k + 1 - 1 + 1 F C k + 1 = F C k + 1
196 193 195 syl φ k 1 J F C k 0 k + 1 C F C k + 1 = F C k + 1 - 1 + 1 F C k + 1 = F C k + 1
197 192 196 mpbid φ k 1 J F C k 0 k + 1 C F C k + 1 = F C k + 1
198 197 adantlrr φ k 1 J F C k 0 j i 1 J | F C i 0 j k k + 1 C F C k + 1 = F C k + 1
199 189 198 mpdan φ k 1 J F C k 0 j i 1 J | F C i 0 j k F C k + 1 = F C k + 1
200 breq1 F C k + 1 = F C k + 1 F C k + 1 0 F C k + 1 0
201 200 notbid F C k + 1 = F C k + 1 ¬ F C k + 1 0 ¬ F C k + 1 0
202 199 201 syl φ k 1 J F C k 0 j i 1 J | F C i 0 j k ¬ F C k + 1 0 ¬ F C k + 1 0
203 142 202 mpbid φ k 1 J F C k 0 j i 1 J | F C i 0 j k ¬ F C k + 1 0
204 15 44 syl φ k 1 J F C k 0 k 0 J
205 204 49 syldan φ k 1 J F C k 0 F C k
206 205 adantrr φ k 1 J F C k 0 j i 1 J | F C i 0 j k F C k
207 zleltp1 0 F C k 0 F C k 0 < F C k + 1
208 176 207 mpan F C k 0 F C k 0 < F C k + 1
209 0red F C k 0
210 zre F C k F C k
211 1red F C k 1
212 210 211 readdcld F C k F C k + 1
213 209 212 ltnled F C k 0 < F C k + 1 ¬ F C k + 1 0
214 208 213 bitrd F C k 0 F C k ¬ F C k + 1 0
215 206 214 syl φ k 1 J F C k 0 j i 1 J | F C i 0 j k 0 F C k ¬ F C k + 1 0
216 203 215 mpbird φ k 1 J F C k 0 j i 1 J | F C i 0 j k 0 F C k
217 206 zred φ k 1 J F C k 0 j i 1 J | F C i 0 j k F C k
218 0red φ k 1 J F C k 0 j i 1 J | F C i 0 j k 0
219 217 218 letri3d φ k 1 J F C k 0 j i 1 J | F C i 0 j k F C k = 0 F C k 0 0 F C k
220 14 216 219 mpbir2and φ k 1 J F C k 0 j i 1 J | F C i 0 j k F C k = 0
221 13 220 sylan2b φ k i 1 J | F C i 0 j i 1 J | F C i 0 j k F C k = 0
222 ssrab2 i 1 J | F C i 0 1 J
223 222 21 sstri i 1 J | F C i 0
224 223 a1i φ i 1 J | F C i 0
225 fzfi 1 J Fin
226 ssfi 1 J Fin i 1 J | F C i 0 1 J i 1 J | F C i 0 Fin
227 225 222 226 mp2an i 1 J | F C i 0 Fin
228 227 a1i φ i 1 J | F C i 0 Fin
229 rabn0 i 1 J | F C i 0 i 1 J F C i 0
230 8 229 sylibr φ i 1 J | F C i 0
231 fimaxre i 1 J | F C i 0 i 1 J | F C i 0 Fin i 1 J | F C i 0 k i 1 J | F C i 0 j i 1 J | F C i 0 j k
232 224 228 230 231 syl3anc φ k i 1 J | F C i 0 j i 1 J | F C i 0 j k
233 221 232 reximddv φ k i 1 J | F C i 0 F C k = 0
234 elrabi k i 1 J | F C i 0 k 1 J
235 234 anim1i k i 1 J | F C i 0 F C k = 0 k 1 J F C k = 0
236 235 reximi2 k i 1 J | F C i 0 F C k = 0 k 1 J F C k = 0
237 233 236 syl φ k 1 J F C k = 0