Metamath Proof Explorer


Theorem ballotlemi

Description: Value of I for a given counting C . (Contributed by Thierry Arnoux, 1-Dec-2016) (Revised by AV, 6-Oct-2020)

Ref Expression
Hypotheses ballotth.m
|- M e. NN
ballotth.n
|- N e. NN
ballotth.o
|- O = { c e. ~P ( 1 ... ( M + N ) ) | ( # ` c ) = M }
ballotth.p
|- P = ( x e. ~P O |-> ( ( # ` x ) / ( # ` O ) ) )
ballotth.f
|- F = ( c e. O |-> ( i e. ZZ |-> ( ( # ` ( ( 1 ... i ) i^i c ) ) - ( # ` ( ( 1 ... i ) \ c ) ) ) ) )
ballotth.e
|- E = { c e. O | A. i e. ( 1 ... ( M + N ) ) 0 < ( ( F ` c ) ` i ) }
ballotth.mgtn
|- N < M
ballotth.i
|- I = ( c e. ( O \ E ) |-> inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` c ) ` k ) = 0 } , RR , < ) )
Assertion ballotlemi
|- ( C e. ( O \ E ) -> ( I ` C ) = inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` C ) ` k ) = 0 } , RR , < ) )

Proof

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 fveq2
 |-  ( d = C -> ( F ` d ) = ( F ` C ) )
10 9 fveq1d
 |-  ( d = C -> ( ( F ` d ) ` k ) = ( ( F ` C ) ` k ) )
11 10 eqeq1d
 |-  ( d = C -> ( ( ( F ` d ) ` k ) = 0 <-> ( ( F ` C ) ` k ) = 0 ) )
12 11 rabbidv
 |-  ( d = C -> { k e. ( 1 ... ( M + N ) ) | ( ( F ` d ) ` k ) = 0 } = { k e. ( 1 ... ( M + N ) ) | ( ( F ` C ) ` k ) = 0 } )
13 12 infeq1d
 |-  ( d = C -> inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` d ) ` k ) = 0 } , RR , < ) = inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` C ) ` k ) = 0 } , RR , < ) )
14 fveq2
 |-  ( c = d -> ( F ` c ) = ( F ` d ) )
15 14 fveq1d
 |-  ( c = d -> ( ( F ` c ) ` k ) = ( ( F ` d ) ` k ) )
16 15 eqeq1d
 |-  ( c = d -> ( ( ( F ` c ) ` k ) = 0 <-> ( ( F ` d ) ` k ) = 0 ) )
17 16 rabbidv
 |-  ( c = d -> { k e. ( 1 ... ( M + N ) ) | ( ( F ` c ) ` k ) = 0 } = { k e. ( 1 ... ( M + N ) ) | ( ( F ` d ) ` k ) = 0 } )
18 17 infeq1d
 |-  ( c = d -> inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` c ) ` k ) = 0 } , RR , < ) = inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` d ) ` k ) = 0 } , RR , < ) )
19 18 cbvmptv
 |-  ( c e. ( O \ E ) |-> inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` c ) ` k ) = 0 } , RR , < ) ) = ( d e. ( O \ E ) |-> inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` d ) ` k ) = 0 } , RR , < ) )
20 8 19 eqtri
 |-  I = ( d e. ( O \ E ) |-> inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` d ) ` k ) = 0 } , RR , < ) )
21 ltso
 |-  < Or RR
22 21 infex
 |-  inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` C ) ` k ) = 0 } , RR , < ) e. _V
23 13 20 22 fvmpt
 |-  ( C e. ( O \ E ) -> ( I ` C ) = inf ( { k e. ( 1 ... ( M + N ) ) | ( ( F ` C ) ` k ) = 0 } , RR , < ) )