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 |
1 2 3 4 5 6 7 8 9 10
|
ballotlemrval |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑅 ‘ 𝐶 ) = ( ( 𝑆 ‘ 𝐶 ) “ 𝐶 ) ) |
12 |
|
imassrn |
⊢ ( ( 𝑆 ‘ 𝐶 ) “ 𝐶 ) ⊆ ran ( 𝑆 ‘ 𝐶 ) |
13 |
1 2 3 4 5 6 7 8 9
|
ballotlemsf1o |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( ( 𝑆 ‘ 𝐶 ) : ( 1 ... ( 𝑀 + 𝑁 ) ) –1-1-onto→ ( 1 ... ( 𝑀 + 𝑁 ) ) ∧ ◡ ( 𝑆 ‘ 𝐶 ) = ( 𝑆 ‘ 𝐶 ) ) ) |
14 |
13
|
simpld |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑆 ‘ 𝐶 ) : ( 1 ... ( 𝑀 + 𝑁 ) ) –1-1-onto→ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
15 |
|
f1ofo |
⊢ ( ( 𝑆 ‘ 𝐶 ) : ( 1 ... ( 𝑀 + 𝑁 ) ) –1-1-onto→ ( 1 ... ( 𝑀 + 𝑁 ) ) → ( 𝑆 ‘ 𝐶 ) : ( 1 ... ( 𝑀 + 𝑁 ) ) –onto→ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
16 |
|
forn |
⊢ ( ( 𝑆 ‘ 𝐶 ) : ( 1 ... ( 𝑀 + 𝑁 ) ) –onto→ ( 1 ... ( 𝑀 + 𝑁 ) ) → ran ( 𝑆 ‘ 𝐶 ) = ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
17 |
14 15 16
|
3syl |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ran ( 𝑆 ‘ 𝐶 ) = ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
18 |
12 17
|
sseqtrid |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( ( 𝑆 ‘ 𝐶 ) “ 𝐶 ) ⊆ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
19 |
11 18
|
eqsstrd |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑅 ‘ 𝐶 ) ⊆ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
20 |
|
f1of1 |
⊢ ( ( 𝑆 ‘ 𝐶 ) : ( 1 ... ( 𝑀 + 𝑁 ) ) –1-1-onto→ ( 1 ... ( 𝑀 + 𝑁 ) ) → ( 𝑆 ‘ 𝐶 ) : ( 1 ... ( 𝑀 + 𝑁 ) ) –1-1→ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
21 |
14 20
|
syl |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑆 ‘ 𝐶 ) : ( 1 ... ( 𝑀 + 𝑁 ) ) –1-1→ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
22 |
|
eldifi |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → 𝐶 ∈ 𝑂 ) |
23 |
1 2 3
|
ballotlemelo |
⊢ ( 𝐶 ∈ 𝑂 ↔ ( 𝐶 ⊆ ( 1 ... ( 𝑀 + 𝑁 ) ) ∧ ( ♯ ‘ 𝐶 ) = 𝑀 ) ) |
24 |
22 23
|
sylib |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝐶 ⊆ ( 1 ... ( 𝑀 + 𝑁 ) ) ∧ ( ♯ ‘ 𝐶 ) = 𝑀 ) ) |
25 |
24
|
simpld |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → 𝐶 ⊆ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
26 |
|
id |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ) |
27 |
|
f1imaeng |
⊢ ( ( ( 𝑆 ‘ 𝐶 ) : ( 1 ... ( 𝑀 + 𝑁 ) ) –1-1→ ( 1 ... ( 𝑀 + 𝑁 ) ) ∧ 𝐶 ⊆ ( 1 ... ( 𝑀 + 𝑁 ) ) ∧ 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ) → ( ( 𝑆 ‘ 𝐶 ) “ 𝐶 ) ≈ 𝐶 ) |
28 |
21 25 26 27
|
syl3anc |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( ( 𝑆 ‘ 𝐶 ) “ 𝐶 ) ≈ 𝐶 ) |
29 |
11 28
|
eqbrtrd |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑅 ‘ 𝐶 ) ≈ 𝐶 ) |
30 |
|
hasheni |
⊢ ( ( 𝑅 ‘ 𝐶 ) ≈ 𝐶 → ( ♯ ‘ ( 𝑅 ‘ 𝐶 ) ) = ( ♯ ‘ 𝐶 ) ) |
31 |
29 30
|
syl |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( ♯ ‘ ( 𝑅 ‘ 𝐶 ) ) = ( ♯ ‘ 𝐶 ) ) |
32 |
24
|
simprd |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( ♯ ‘ 𝐶 ) = 𝑀 ) |
33 |
31 32
|
eqtrd |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( ♯ ‘ ( 𝑅 ‘ 𝐶 ) ) = 𝑀 ) |
34 |
1 2 3
|
ballotlemelo |
⊢ ( ( 𝑅 ‘ 𝐶 ) ∈ 𝑂 ↔ ( ( 𝑅 ‘ 𝐶 ) ⊆ ( 1 ... ( 𝑀 + 𝑁 ) ) ∧ ( ♯ ‘ ( 𝑅 ‘ 𝐶 ) ) = 𝑀 ) ) |
35 |
19 33 34
|
sylanbrc |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑅 ‘ 𝐶 ) ∈ 𝑂 ) |