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 |
1 2 3 4 5 6 7 8
|
ballotlemiex |
|- ( C e. ( O \ E ) -> ( ( I ` C ) e. ( 1 ... ( M + N ) ) /\ ( ( F ` C ) ` ( I ` C ) ) = 0 ) ) |
11 |
10
|
simpld |
|- ( C e. ( O \ E ) -> ( I ` C ) e. ( 1 ... ( M + N ) ) ) |
12 |
1 2 3 4 5 6 7 8 9
|
ballotlemsv |
|- ( ( C e. ( O \ E ) /\ ( I ` C ) e. ( 1 ... ( M + N ) ) ) -> ( ( S ` C ) ` ( I ` C ) ) = if ( ( I ` C ) <_ ( I ` C ) , ( ( ( I ` C ) + 1 ) - ( I ` C ) ) , ( I ` C ) ) ) |
13 |
11 12
|
mpdan |
|- ( C e. ( O \ E ) -> ( ( S ` C ) ` ( I ` C ) ) = if ( ( I ` C ) <_ ( I ` C ) , ( ( ( I ` C ) + 1 ) - ( I ` C ) ) , ( I ` C ) ) ) |
14 |
|
elfzelz |
|- ( ( I ` C ) e. ( 1 ... ( M + N ) ) -> ( I ` C ) e. ZZ ) |
15 |
14
|
zred |
|- ( ( I ` C ) e. ( 1 ... ( M + N ) ) -> ( I ` C ) e. RR ) |
16 |
11 15
|
syl |
|- ( C e. ( O \ E ) -> ( I ` C ) e. RR ) |
17 |
16
|
leidd |
|- ( C e. ( O \ E ) -> ( I ` C ) <_ ( I ` C ) ) |
18 |
17
|
iftrued |
|- ( C e. ( O \ E ) -> if ( ( I ` C ) <_ ( I ` C ) , ( ( ( I ` C ) + 1 ) - ( I ` C ) ) , ( I ` C ) ) = ( ( ( I ` C ) + 1 ) - ( I ` C ) ) ) |
19 |
16
|
recnd |
|- ( C e. ( O \ E ) -> ( I ` C ) e. CC ) |
20 |
|
1cnd |
|- ( C e. ( O \ E ) -> 1 e. CC ) |
21 |
19 20
|
pncan2d |
|- ( C e. ( O \ E ) -> ( ( ( I ` C ) + 1 ) - ( I ` C ) ) = 1 ) |
22 |
13 18 21
|
3eqtrd |
|- ( C e. ( O \ E ) -> ( ( S ` C ) ` ( I ` C ) ) = 1 ) |