Metamath Proof Explorer


Theorem ballotlem5

Description: If A is not ahead throughout, there is a k where votes are tied. (Contributed by Thierry Arnoux, 1-Dec-2016)

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
Assertion ballotlem5
|- ( C e. ( O \ E ) -> E. k e. ( 1 ... ( M + N ) ) ( ( F ` C ) ` k ) = 0 )

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 eldifi
 |-  ( C e. ( O \ E ) -> C e. O )
9 1 a1i
 |-  ( C e. ( O \ E ) -> M e. NN )
10 2 a1i
 |-  ( C e. ( O \ E ) -> N e. NN )
11 9 10 nnaddcld
 |-  ( C e. ( O \ E ) -> ( M + N ) e. NN )
12 1 2 3 4 5 6 ballotlemodife
 |-  ( C e. ( O \ E ) <-> ( C e. O /\ E. i e. ( 1 ... ( M + N ) ) ( ( F ` C ) ` i ) <_ 0 ) )
13 12 simprbi
 |-  ( C e. ( O \ E ) -> E. i e. ( 1 ... ( M + N ) ) ( ( F ` C ) ` i ) <_ 0 )
14 2 nnrei
 |-  N e. RR
15 1 nnrei
 |-  M e. RR
16 14 15 posdifi
 |-  ( N < M <-> 0 < ( M - N ) )
17 7 16 mpbi
 |-  0 < ( M - N )
18 1 2 3 4 5 ballotlemfmpn
 |-  ( C e. O -> ( ( F ` C ) ` ( M + N ) ) = ( M - N ) )
19 8 18 syl
 |-  ( C e. ( O \ E ) -> ( ( F ` C ) ` ( M + N ) ) = ( M - N ) )
20 17 19 breqtrrid
 |-  ( C e. ( O \ E ) -> 0 < ( ( F ` C ) ` ( M + N ) ) )
21 1 2 3 4 5 8 11 13 20 ballotlemfc0
 |-  ( C e. ( O \ E ) -> E. k e. ( 1 ... ( M + N ) ) ( ( F ` C ) ` k ) = 0 )