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 |
|
simpl |
|- ( ( d = C /\ i e. ( 1 ... ( M + N ) ) ) -> d = C ) |
11 |
10
|
fveq2d |
|- ( ( d = C /\ i e. ( 1 ... ( M + N ) ) ) -> ( I ` d ) = ( I ` C ) ) |
12 |
11
|
breq2d |
|- ( ( d = C /\ i e. ( 1 ... ( M + N ) ) ) -> ( i <_ ( I ` d ) <-> i <_ ( I ` C ) ) ) |
13 |
11
|
oveq1d |
|- ( ( d = C /\ i e. ( 1 ... ( M + N ) ) ) -> ( ( I ` d ) + 1 ) = ( ( I ` C ) + 1 ) ) |
14 |
13
|
oveq1d |
|- ( ( d = C /\ i e. ( 1 ... ( M + N ) ) ) -> ( ( ( I ` d ) + 1 ) - i ) = ( ( ( I ` C ) + 1 ) - i ) ) |
15 |
12 14
|
ifbieq1d |
|- ( ( d = C /\ i e. ( 1 ... ( M + N ) ) ) -> if ( i <_ ( I ` d ) , ( ( ( I ` d ) + 1 ) - i ) , i ) = if ( i <_ ( I ` C ) , ( ( ( I ` C ) + 1 ) - i ) , i ) ) |
16 |
15
|
mpteq2dva |
|- ( d = C -> ( i e. ( 1 ... ( M + N ) ) |-> if ( i <_ ( I ` d ) , ( ( ( I ` d ) + 1 ) - i ) , i ) ) = ( i e. ( 1 ... ( M + N ) ) |-> if ( i <_ ( I ` C ) , ( ( ( I ` C ) + 1 ) - i ) , i ) ) ) |
17 |
|
simpl |
|- ( ( c = d /\ i e. ( 1 ... ( M + N ) ) ) -> c = d ) |
18 |
17
|
fveq2d |
|- ( ( c = d /\ i e. ( 1 ... ( M + N ) ) ) -> ( I ` c ) = ( I ` d ) ) |
19 |
18
|
breq2d |
|- ( ( c = d /\ i e. ( 1 ... ( M + N ) ) ) -> ( i <_ ( I ` c ) <-> i <_ ( I ` d ) ) ) |
20 |
18
|
oveq1d |
|- ( ( c = d /\ i e. ( 1 ... ( M + N ) ) ) -> ( ( I ` c ) + 1 ) = ( ( I ` d ) + 1 ) ) |
21 |
20
|
oveq1d |
|- ( ( c = d /\ i e. ( 1 ... ( M + N ) ) ) -> ( ( ( I ` c ) + 1 ) - i ) = ( ( ( I ` d ) + 1 ) - i ) ) |
22 |
19 21
|
ifbieq1d |
|- ( ( c = d /\ i e. ( 1 ... ( M + N ) ) ) -> if ( i <_ ( I ` c ) , ( ( ( I ` c ) + 1 ) - i ) , i ) = if ( i <_ ( I ` d ) , ( ( ( I ` d ) + 1 ) - i ) , i ) ) |
23 |
22
|
mpteq2dva |
|- ( c = d -> ( i e. ( 1 ... ( M + N ) ) |-> if ( i <_ ( I ` c ) , ( ( ( I ` c ) + 1 ) - i ) , i ) ) = ( i e. ( 1 ... ( M + N ) ) |-> if ( i <_ ( I ` d ) , ( ( ( I ` d ) + 1 ) - i ) , i ) ) ) |
24 |
23
|
cbvmptv |
|- ( c e. ( O \ E ) |-> ( i e. ( 1 ... ( M + N ) ) |-> if ( i <_ ( I ` c ) , ( ( ( I ` c ) + 1 ) - i ) , i ) ) ) = ( d e. ( O \ E ) |-> ( i e. ( 1 ... ( M + N ) ) |-> if ( i <_ ( I ` d ) , ( ( ( I ` d ) + 1 ) - i ) , i ) ) ) |
25 |
9 24
|
eqtri |
|- S = ( d e. ( O \ E ) |-> ( i e. ( 1 ... ( M + N ) ) |-> if ( i <_ ( I ` d ) , ( ( ( I ` d ) + 1 ) - i ) , i ) ) ) |
26 |
|
ovex |
|- ( 1 ... ( M + N ) ) e. _V |
27 |
26
|
mptex |
|- ( i e. ( 1 ... ( M + N ) ) |-> if ( i <_ ( I ` C ) , ( ( ( I ` C ) + 1 ) - i ) , i ) ) e. _V |
28 |
16 25 27
|
fvmpt |
|- ( C e. ( O \ E ) -> ( S ` C ) = ( i e. ( 1 ... ( M + N ) ) |-> if ( i <_ ( I ` C ) , ( ( ( I ` C ) + 1 ) - i ) , i ) ) ) |