Metamath Proof Explorer


Theorem ballotlemfrceq

Description: Value of F for a reverse counting ( RC ) . (Contributed by Thierry Arnoux, 27-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
ballotth.r R = c O E S c c
ballotlemg × ˙ = u Fin , v Fin v u v u
Assertion ballotlemfrceq C O E J 1 I C F C S C J 1 = F R C J

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 ballotth.r R = c O E S c c
11 ballotlemg × ˙ = u Fin , v Fin v u v u
12 1 2 3 4 5 6 7 8 9 ballotlemsel1i C O E J 1 I C S C J 1 I C
13 1zzd C O E J 1 I C 1
14 1 2 3 4 5 6 7 8 ballotlemiex C O E I C 1 M + N F C I C = 0
15 14 adantr C O E J 1 I C I C 1 M + N F C I C = 0
16 15 simpld C O E J 1 I C I C 1 M + N
17 16 elfzelzd C O E J 1 I C I C
18 elfzuz3 I C 1 M + N M + N I C
19 fzss2 M + N I C 1 I C 1 M + N
20 16 18 19 3syl C O E J 1 I C 1 I C 1 M + N
21 simpr C O E J 1 I C J 1 I C
22 20 21 sseldd C O E J 1 I C J 1 M + N
23 1 2 3 4 5 6 7 8 9 ballotlemsdom C O E J 1 M + N S C J 1 M + N
24 22 23 syldan C O E J 1 I C S C J 1 M + N
25 24 elfzelzd C O E J 1 I C S C J
26 fzsubel 1 I C S C J 1 S C J 1 I C S C J 1 1 1 I C 1
27 13 17 25 13 26 syl22anc C O E J 1 I C S C J 1 I C S C J 1 1 1 I C 1
28 12 27 mpbid C O E J 1 I C S C J 1 1 1 I C 1
29 1m1e0 1 1 = 0
30 29 oveq1i 1 1 I C 1 = 0 I C 1
31 28 30 eleqtrdi C O E J 1 I C S C J 1 0 I C 1
32 14 simpld C O E I C 1 M + N
33 32 elfzelzd C O E I C
34 1zzd C O E 1
35 33 34 zsubcld C O E I C 1
36 nnaddcl M N M + N
37 1 2 36 mp2an M + N
38 37 nnzi M + N
39 38 a1i C O E M + N
40 elfzle2 I C 1 M + N I C M + N
41 32 40 syl C O E I C M + N
42 zlem1lt I C M + N I C M + N I C 1 < M + N
43 33 39 42 syl2anc C O E I C M + N I C 1 < M + N
44 35 zred C O E I C 1
45 39 zred C O E M + N
46 ltle I C 1 M + N I C 1 < M + N I C 1 M + N
47 44 45 46 syl2anc C O E I C 1 < M + N I C 1 M + N
48 43 47 sylbid C O E I C M + N I C 1 M + N
49 41 48 mpd C O E I C 1 M + N
50 eluz2 M + N I C 1 I C 1 M + N I C 1 M + N
51 35 39 49 50 syl3anbrc C O E M + N I C 1
52 fzss2 M + N I C 1 0 I C 1 0 M + N
53 51 52 syl C O E 0 I C 1 0 M + N
54 53 sselda C O E S C J 1 0 I C 1 S C J 1 0 M + N
55 31 54 syldan C O E J 1 I C S C J 1 0 M + N
56 1 2 3 4 5 6 7 8 9 10 11 ballotlemfg C O E S C J 1 0 M + N F C S C J 1 = C × ˙ 1 S C J 1
57 55 56 syldan C O E J 1 I C F C S C J 1 = C × ˙ 1 S C J 1
58 1 2 3 4 5 6 7 8 9 10 11 ballotlemfrc C O E J 1 I C F R C J = C × ˙ S C J I C
59 57 58 oveq12d C O E J 1 I C F C S C J 1 + F R C J = C × ˙ 1 S C J 1 + C × ˙ S C J I C
60 fzsplit3 S C J 1 I C 1 I C = 1 S C J 1 S C J I C
61 12 60 syl C O E J 1 I C 1 I C = 1 S C J 1 S C J I C
62 61 oveq2d C O E J 1 I C C × ˙ 1 I C = C × ˙ 1 S C J 1 S C J I C
63 fz1ssfz0 1 M + N 0 M + N
64 63 sseli I C 1 M + N I C 0 M + N
65 1 2 3 4 5 6 7 8 9 10 11 ballotlemfg C O E I C 0 M + N F C I C = C × ˙ 1 I C
66 64 65 sylan2 C O E I C 1 M + N F C I C = C × ˙ 1 I C
67 16 66 syldan C O E J 1 I C F C I C = C × ˙ 1 I C
68 15 simprd C O E J 1 I C F C I C = 0
69 67 68 eqtr3d C O E J 1 I C C × ˙ 1 I C = 0
70 fzfi 1 M + N Fin
71 eldifi C O E C O
72 1 2 3 ballotlemelo C O C 1 M + N C = M
73 72 simplbi C O C 1 M + N
74 71 73 syl C O E C 1 M + N
75 ssfi 1 M + N Fin C 1 M + N C Fin
76 70 74 75 sylancr C O E C Fin
77 76 adantr C O E J 1 I C C Fin
78 fzfid C O E J 1 I C 1 S C J 1 Fin
79 fzfid C O E J 1 I C S C J I C Fin
80 25 zred C O E J 1 I C S C J
81 ltm1 S C J S C J 1 < S C J
82 fzdisj S C J 1 < S C J 1 S C J 1 S C J I C =
83 80 81 82 3syl C O E J 1 I C 1 S C J 1 S C J I C =
84 1 2 3 4 5 6 7 8 9 10 11 77 78 79 83 ballotlemgun C O E J 1 I C C × ˙ 1 S C J 1 S C J I C = C × ˙ 1 S C J 1 + C × ˙ S C J I C
85 62 69 84 3eqtr3rd C O E J 1 I C C × ˙ 1 S C J 1 + C × ˙ S C J I C = 0
86 59 85 eqtrd C O E J 1 I C F C S C J 1 + F R C J = 0
87 71 adantr C O E J 1 I C C O
88 25 13 zsubcld C O E J 1 I C S C J 1
89 1 2 3 4 5 87 88 ballotlemfelz C O E J 1 I C F C S C J 1
90 89 zcnd C O E J 1 I C F C S C J 1
91 1 2 3 4 5 6 7 8 9 10 ballotlemro C O E R C O
92 91 adantr C O E J 1 I C R C O
93 21 elfzelzd C O E J 1 I C J
94 1 2 3 4 5 92 93 ballotlemfelz C O E J 1 I C F R C J
95 94 zcnd C O E J 1 I C F R C J
96 addeq0 F C S C J 1 F R C J F C S C J 1 + F R C J = 0 F C S C J 1 = F R C J
97 90 95 96 syl2anc C O E J 1 I C F C S C J 1 + F R C J = 0 F C S C J 1 = F R C J
98 86 97 mpbid C O E J 1 I C F C S C J 1 = F R C J