Metamath Proof Explorer


Theorem ballotlemsdom

Description: Domain of S for a given counting C . (Contributed by Thierry Arnoux, 12-Apr-2017)

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
ballotth.e E = c O | i 1 M + N 0 < F c i
ballotth.mgtn N < M
ballotth.i I = c O E sup k 1 M + N | F c k = 0 <
ballotth.s S = c O E i 1 M + N if i I c I c + 1 - i i
Assertion ballotlemsdom C O E J 1 M + N S C J 1 M + N

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 ballotth.e E = c O | i 1 M + N 0 < F c i
7 ballotth.mgtn N < M
8 ballotth.i I = c O E sup k 1 M + N | F c k = 0 <
9 ballotth.s S = c O E i 1 M + N if i I c I c + 1 - i i
10 1 2 3 4 5 6 7 8 9 ballotlemsv C O E J 1 M + N S C J = if J I C I C + 1 - J J
11 1 2 3 4 5 6 7 8 ballotlemiex C O E I C 1 M + N F C I C = 0
12 11 simpld C O E I C 1 M + N
13 12 elfzelzd C O E I C
14 13 ad2antrr C O E J 1 M + N J I C I C
15 nnaddcl M N M + N
16 1 2 15 mp2an M + N
17 16 nnzi M + N
18 17 a1i C O E J 1 M + N J I C M + N
19 12 ad2antrr C O E J 1 M + N J I C I C 1 M + N
20 elfzle2 I C 1 M + N I C M + N
21 19 20 syl C O E J 1 M + N J I C I C M + N
22 eluz2 M + N I C I C M + N I C M + N
23 fzss2 M + N I C 1 I C 1 M + N
24 22 23 sylbir I C M + N I C M + N 1 I C 1 M + N
25 14 18 21 24 syl3anc C O E J 1 M + N J I C 1 I C 1 M + N
26 1zzd C O E J 1 M + N J I C 1
27 simplr C O E J 1 M + N J I C J 1 M + N
28 27 elfzelzd C O E J 1 M + N J I C J
29 elfzle1 J 1 M + N 1 J
30 27 29 syl C O E J 1 M + N J I C 1 J
31 simpr C O E J 1 M + N J I C J I C
32 26 14 28 30 31 elfzd C O E J 1 M + N J I C J 1 I C
33 fzrev3i J 1 I C 1 + I C - J 1 I C
34 32 33 syl C O E J 1 M + N J I C 1 + I C - J 1 I C
35 1cnd C O E 1
36 13 zcnd C O E I C
37 35 36 addcomd C O E 1 + I C = I C + 1
38 37 oveq1d C O E 1 + I C - J = I C + 1 - J
39 38 eleq1d C O E 1 + I C - J 1 I C I C + 1 - J 1 I C
40 39 ad2antrr C O E J 1 M + N J I C 1 + I C - J 1 I C I C + 1 - J 1 I C
41 34 40 mpbid C O E J 1 M + N J I C I C + 1 - J 1 I C
42 25 41 sseldd C O E J 1 M + N J I C I C + 1 - J 1 M + N
43 simplr C O E J 1 M + N ¬ J I C J 1 M + N
44 42 43 ifclda C O E J 1 M + N if J I C I C + 1 - J J 1 M + N
45 10 44 eqeltrd C O E J 1 M + N S C J 1 M + N