Step |
Hyp |
Ref |
Expression |
1 |
|
ballotth.m |
|- M e. NN |
2 |
|
ballotth.n |
|- N e. NN |
3 |
|
ballotth.o |
|- O = { c e. ~P ( 1 ... ( M + N ) ) | ( # ` c ) = M } |
4 |
|
ballotth.p |
|- P = ( x e. ~P O |-> ( ( # ` x ) / ( # ` O ) ) ) |
5 |
|
ballotth.f |
|- F = ( c e. O |-> ( i e. ZZ |-> ( ( # ` ( ( 1 ... i ) i^i c ) ) - ( # ` ( ( 1 ... i ) \ c ) ) ) ) ) |
6 |
|
ballotth.e |
|- E = { c e. O | A. i e. ( 1 ... ( M + N ) ) 0 < ( ( F ` c ) ` i ) } |
7 |
|
ballotth.mgtn |
|- N < M |
8 |
|
ballotth.i |
|- I = ( c e. ( O \ E ) |-> inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` c ) ` k ) = 0 } , RR , < ) ) |
9 |
|
ballotth.s |
|- S = ( c e. ( O \ E ) |-> ( i e. ( 1 ... ( M + N ) ) |-> if ( i <_ ( I ` c ) , ( ( ( I ` c ) + 1 ) - i ) , i ) ) ) |
10 |
|
ballotth.r |
|- R = ( c e. ( O \ E ) |-> ( ( S ` c ) " c ) ) |
11 |
|
ballotlemg |
|- .^ = ( u e. Fin , v e. Fin |-> ( ( # ` ( v i^i u ) ) - ( # ` ( v \ u ) ) ) ) |
12 |
|
eldifi |
|- ( C e. ( O \ E ) -> C e. O ) |
13 |
12
|
adantr |
|- ( ( C e. ( O \ E ) /\ J e. ( 0 ... ( M + N ) ) ) -> C e. O ) |
14 |
|
elfzelz |
|- ( J e. ( 0 ... ( M + N ) ) -> J e. ZZ ) |
15 |
14
|
adantl |
|- ( ( C e. ( O \ E ) /\ J e. ( 0 ... ( M + N ) ) ) -> J e. ZZ ) |
16 |
1 2 3 4 5 13 15
|
ballotlemfval |
|- ( ( C e. ( O \ E ) /\ J e. ( 0 ... ( M + N ) ) ) -> ( ( F ` C ) ` J ) = ( ( # ` ( ( 1 ... J ) i^i C ) ) - ( # ` ( ( 1 ... J ) \ C ) ) ) ) |
17 |
|
fzfi |
|- ( 1 ... ( M + N ) ) e. Fin |
18 |
1 2 3
|
ballotlemelo |
|- ( C e. O <-> ( C C_ ( 1 ... ( M + N ) ) /\ ( # ` C ) = M ) ) |
19 |
18
|
simplbi |
|- ( C e. O -> C C_ ( 1 ... ( M + N ) ) ) |
20 |
|
ssfi |
|- ( ( ( 1 ... ( M + N ) ) e. Fin /\ C C_ ( 1 ... ( M + N ) ) ) -> C e. Fin ) |
21 |
17 19 20
|
sylancr |
|- ( C e. O -> C e. Fin ) |
22 |
13 21
|
syl |
|- ( ( C e. ( O \ E ) /\ J e. ( 0 ... ( M + N ) ) ) -> C e. Fin ) |
23 |
|
fzfid |
|- ( ( C e. ( O \ E ) /\ J e. ( 0 ... ( M + N ) ) ) -> ( 1 ... J ) e. Fin ) |
24 |
1 2 3 4 5 6 7 8 9 10 11
|
ballotlemgval |
|- ( ( C e. Fin /\ ( 1 ... J ) e. Fin ) -> ( C .^ ( 1 ... J ) ) = ( ( # ` ( ( 1 ... J ) i^i C ) ) - ( # ` ( ( 1 ... J ) \ C ) ) ) ) |
25 |
22 23 24
|
syl2anc |
|- ( ( C e. ( O \ E ) /\ J e. ( 0 ... ( M + N ) ) ) -> ( C .^ ( 1 ... J ) ) = ( ( # ` ( ( 1 ... J ) i^i C ) ) - ( # ` ( ( 1 ... J ) \ C ) ) ) ) |
26 |
16 25
|
eqtr4d |
|- ( ( C e. ( O \ E ) /\ J e. ( 0 ... ( M + N ) ) ) -> ( ( F ` C ) ` J ) = ( C .^ ( 1 ... J ) ) ) |