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 |
|
ballotth.i |
⊢ 𝐼 = ( 𝑐 ∈ ( 𝑂 ∖ 𝐸 ) ↦ inf ( { 𝑘 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ∣ ( ( 𝐹 ‘ 𝑐 ) ‘ 𝑘 ) = 0 } , ℝ , < ) ) |
9 |
|
ballotth.s |
⊢ 𝑆 = ( 𝑐 ∈ ( 𝑂 ∖ 𝐸 ) ↦ ( 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ↦ if ( 𝑖 ≤ ( 𝐼 ‘ 𝑐 ) , ( ( ( 𝐼 ‘ 𝑐 ) + 1 ) − 𝑖 ) , 𝑖 ) ) ) |
10 |
|
simpl |
⊢ ( ( ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) ∧ 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) → ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) ) |
11 |
10
|
breq2d |
⊢ ( ( ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) ∧ 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) → ( 𝑖 ≤ ( 𝐼 ‘ 𝐶 ) ↔ 𝑖 ≤ ( 𝐼 ‘ 𝐷 ) ) ) |
12 |
10
|
oveq1d |
⊢ ( ( ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) ∧ 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) → ( ( 𝐼 ‘ 𝐶 ) + 1 ) = ( ( 𝐼 ‘ 𝐷 ) + 1 ) ) |
13 |
12
|
oveq1d |
⊢ ( ( ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) ∧ 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) → ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝑖 ) = ( ( ( 𝐼 ‘ 𝐷 ) + 1 ) − 𝑖 ) ) |
14 |
11 13
|
ifbieq1d |
⊢ ( ( ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) ∧ 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) → if ( 𝑖 ≤ ( 𝐼 ‘ 𝐶 ) , ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝑖 ) , 𝑖 ) = if ( 𝑖 ≤ ( 𝐼 ‘ 𝐷 ) , ( ( ( 𝐼 ‘ 𝐷 ) + 1 ) − 𝑖 ) , 𝑖 ) ) |
15 |
14
|
mpteq2dva |
⊢ ( ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) → ( 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ↦ if ( 𝑖 ≤ ( 𝐼 ‘ 𝐶 ) , ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝑖 ) , 𝑖 ) ) = ( 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ↦ if ( 𝑖 ≤ ( 𝐼 ‘ 𝐷 ) , ( ( ( 𝐼 ‘ 𝐷 ) + 1 ) − 𝑖 ) , 𝑖 ) ) ) |
16 |
15
|
3ad2ant3 |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐷 ∈ ( 𝑂 ∖ 𝐸 ) ∧ ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) ) → ( 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ↦ if ( 𝑖 ≤ ( 𝐼 ‘ 𝐶 ) , ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝑖 ) , 𝑖 ) ) = ( 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ↦ if ( 𝑖 ≤ ( 𝐼 ‘ 𝐷 ) , ( ( ( 𝐼 ‘ 𝐷 ) + 1 ) − 𝑖 ) , 𝑖 ) ) ) |
17 |
1 2 3 4 5 6 7 8 9
|
ballotlemsval |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑆 ‘ 𝐶 ) = ( 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ↦ if ( 𝑖 ≤ ( 𝐼 ‘ 𝐶 ) , ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝑖 ) , 𝑖 ) ) ) |
18 |
17
|
3ad2ant1 |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐷 ∈ ( 𝑂 ∖ 𝐸 ) ∧ ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) ) → ( 𝑆 ‘ 𝐶 ) = ( 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ↦ if ( 𝑖 ≤ ( 𝐼 ‘ 𝐶 ) , ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝑖 ) , 𝑖 ) ) ) |
19 |
1 2 3 4 5 6 7 8 9
|
ballotlemsval |
⊢ ( 𝐷 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑆 ‘ 𝐷 ) = ( 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ↦ if ( 𝑖 ≤ ( 𝐼 ‘ 𝐷 ) , ( ( ( 𝐼 ‘ 𝐷 ) + 1 ) − 𝑖 ) , 𝑖 ) ) ) |
20 |
19
|
3ad2ant2 |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐷 ∈ ( 𝑂 ∖ 𝐸 ) ∧ ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) ) → ( 𝑆 ‘ 𝐷 ) = ( 𝑖 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ↦ if ( 𝑖 ≤ ( 𝐼 ‘ 𝐷 ) , ( ( ( 𝐼 ‘ 𝐷 ) + 1 ) − 𝑖 ) , 𝑖 ) ) ) |
21 |
16 18 20
|
3eqtr4d |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐷 ∈ ( 𝑂 ∖ 𝐸 ) ∧ ( 𝐼 ‘ 𝐶 ) = ( 𝐼 ‘ 𝐷 ) ) → ( 𝑆 ‘ 𝐶 ) = ( 𝑆 ‘ 𝐷 ) ) |