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 |
|
ballotth.r |
⊢ 𝑅 = ( 𝑐 ∈ ( 𝑂 ∖ 𝐸 ) ↦ ( ( 𝑆 ‘ 𝑐 ) “ 𝑐 ) ) |
11 |
|
fveq2 |
⊢ ( 𝑑 = 𝐶 → ( 𝑆 ‘ 𝑑 ) = ( 𝑆 ‘ 𝐶 ) ) |
12 |
|
id |
⊢ ( 𝑑 = 𝐶 → 𝑑 = 𝐶 ) |
13 |
11 12
|
imaeq12d |
⊢ ( 𝑑 = 𝐶 → ( ( 𝑆 ‘ 𝑑 ) “ 𝑑 ) = ( ( 𝑆 ‘ 𝐶 ) “ 𝐶 ) ) |
14 |
|
fveq2 |
⊢ ( 𝑐 = 𝑑 → ( 𝑆 ‘ 𝑐 ) = ( 𝑆 ‘ 𝑑 ) ) |
15 |
|
id |
⊢ ( 𝑐 = 𝑑 → 𝑐 = 𝑑 ) |
16 |
14 15
|
imaeq12d |
⊢ ( 𝑐 = 𝑑 → ( ( 𝑆 ‘ 𝑐 ) “ 𝑐 ) = ( ( 𝑆 ‘ 𝑑 ) “ 𝑑 ) ) |
17 |
16
|
cbvmptv |
⊢ ( 𝑐 ∈ ( 𝑂 ∖ 𝐸 ) ↦ ( ( 𝑆 ‘ 𝑐 ) “ 𝑐 ) ) = ( 𝑑 ∈ ( 𝑂 ∖ 𝐸 ) ↦ ( ( 𝑆 ‘ 𝑑 ) “ 𝑑 ) ) |
18 |
10 17
|
eqtri |
⊢ 𝑅 = ( 𝑑 ∈ ( 𝑂 ∖ 𝐸 ) ↦ ( ( 𝑆 ‘ 𝑑 ) “ 𝑑 ) ) |
19 |
|
fvex |
⊢ ( 𝑆 ‘ 𝐶 ) ∈ V |
20 |
|
imaexg |
⊢ ( ( 𝑆 ‘ 𝐶 ) ∈ V → ( ( 𝑆 ‘ 𝐶 ) “ 𝐶 ) ∈ V ) |
21 |
19 20
|
ax-mp |
⊢ ( ( 𝑆 ‘ 𝐶 ) “ 𝐶 ) ∈ V |
22 |
13 18 21
|
fvmpt |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑅 ‘ 𝐶 ) = ( ( 𝑆 ‘ 𝐶 ) “ 𝐶 ) ) |