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 𝑀 ∈ ℕ
ballotth.n 𝑁 ∈ ℕ
ballotth.o 𝑂 = { 𝑐 ∈ 𝒫 ( 1 ... ( 𝑀 + 𝑁 ) ) ∣ ( ♯ ‘ 𝑐 ) = 𝑀 }
ballotth.p 𝑃 = ( 𝑥 ∈ 𝒫 𝑂 ↦ ( ( ♯ ‘ 𝑥 ) / ( ♯ ‘ 𝑂 ) ) )
ballotth.f 𝐹 = ( 𝑐𝑂 ↦ ( 𝑖 ∈ ℤ ↦ ( ( ♯ ‘ ( ( 1 ... 𝑖 ) ∩ 𝑐 ) ) − ( ♯ ‘ ( ( 1 ... 𝑖 ) ∖ 𝑐 ) ) ) ) )
ballotth.e 𝐸 = { 𝑐𝑂 ∣ ∀ 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) 0 < ( ( 𝐹𝑐 ) ‘ 𝑖 ) }
ballotth.mgtn 𝑁 < 𝑀
Assertion ballotlem5 ( 𝐶 ∈ ( 𝑂𝐸 ) → ∃ 𝑘 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ( ( 𝐹𝐶 ) ‘ 𝑘 ) = 0 )

Proof

Step Hyp Ref Expression
1 ballotth.m 𝑀 ∈ ℕ
2 ballotth.n 𝑁 ∈ ℕ
3 ballotth.o 𝑂 = { 𝑐 ∈ 𝒫 ( 1 ... ( 𝑀 + 𝑁 ) ) ∣ ( ♯ ‘ 𝑐 ) = 𝑀 }
4 ballotth.p 𝑃 = ( 𝑥 ∈ 𝒫 𝑂 ↦ ( ( ♯ ‘ 𝑥 ) / ( ♯ ‘ 𝑂 ) ) )
5 ballotth.f 𝐹 = ( 𝑐𝑂 ↦ ( 𝑖 ∈ ℤ ↦ ( ( ♯ ‘ ( ( 1 ... 𝑖 ) ∩ 𝑐 ) ) − ( ♯ ‘ ( ( 1 ... 𝑖 ) ∖ 𝑐 ) ) ) ) )
6 ballotth.e 𝐸 = { 𝑐𝑂 ∣ ∀ 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) 0 < ( ( 𝐹𝑐 ) ‘ 𝑖 ) }
7 ballotth.mgtn 𝑁 < 𝑀
8 eldifi ( 𝐶 ∈ ( 𝑂𝐸 ) → 𝐶𝑂 )
9 1 a1i ( 𝐶 ∈ ( 𝑂𝐸 ) → 𝑀 ∈ ℕ )
10 2 a1i ( 𝐶 ∈ ( 𝑂𝐸 ) → 𝑁 ∈ ℕ )
11 9 10 nnaddcld ( 𝐶 ∈ ( 𝑂𝐸 ) → ( 𝑀 + 𝑁 ) ∈ ℕ )
12 1 2 3 4 5 6 ballotlemodife ( 𝐶 ∈ ( 𝑂𝐸 ) ↔ ( 𝐶𝑂 ∧ ∃ 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ( ( 𝐹𝐶 ) ‘ 𝑖 ) ≤ 0 ) )
13 12 simprbi ( 𝐶 ∈ ( 𝑂𝐸 ) → ∃ 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ( ( 𝐹𝐶 ) ‘ 𝑖 ) ≤ 0 )
14 2 nnrei 𝑁 ∈ ℝ
15 1 nnrei 𝑀 ∈ ℝ
16 14 15 posdifi ( 𝑁 < 𝑀 ↔ 0 < ( 𝑀𝑁 ) )
17 7 16 mpbi 0 < ( 𝑀𝑁 )
18 1 2 3 4 5 ballotlemfmpn ( 𝐶𝑂 → ( ( 𝐹𝐶 ) ‘ ( 𝑀 + 𝑁 ) ) = ( 𝑀𝑁 ) )
19 8 18 syl ( 𝐶 ∈ ( 𝑂𝐸 ) → ( ( 𝐹𝐶 ) ‘ ( 𝑀 + 𝑁 ) ) = ( 𝑀𝑁 ) )
20 17 19 breqtrrid ( 𝐶 ∈ ( 𝑂𝐸 ) → 0 < ( ( 𝐹𝐶 ) ‘ ( 𝑀 + 𝑁 ) ) )
21 1 2 3 4 5 8 11 13 20 ballotlemfc0 ( 𝐶 ∈ ( 𝑂𝐸 ) → ∃ 𝑘 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ( ( 𝐹𝐶 ) ‘ 𝑘 ) = 0 )