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 |
|
1zzd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → 1 ∈ ℤ ) |
11 |
1 2 3 4 5 6 7 8
|
ballotlemiex |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( ( 𝐼 ‘ 𝐶 ) ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ∧ ( ( 𝐹 ‘ 𝐶 ) ‘ ( 𝐼 ‘ 𝐶 ) ) = 0 ) ) |
12 |
11
|
simpld |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝐼 ‘ 𝐶 ) ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
13 |
12
|
elfzelzd |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝐼 ‘ 𝐶 ) ∈ ℤ ) |
14 |
13
|
adantr |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( 𝐼 ‘ 𝐶 ) ∈ ℤ ) |
15 |
|
nnaddcl |
⊢ ( ( 𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ) → ( 𝑀 + 𝑁 ) ∈ ℕ ) |
16 |
1 2 15
|
mp2an |
⊢ ( 𝑀 + 𝑁 ) ∈ ℕ |
17 |
16
|
nnzi |
⊢ ( 𝑀 + 𝑁 ) ∈ ℤ |
18 |
17
|
a1i |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑀 + 𝑁 ) ∈ ℤ ) |
19 |
|
elfzle2 |
⊢ ( ( 𝐼 ‘ 𝐶 ) ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) → ( 𝐼 ‘ 𝐶 ) ≤ ( 𝑀 + 𝑁 ) ) |
20 |
12 19
|
syl |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝐼 ‘ 𝐶 ) ≤ ( 𝑀 + 𝑁 ) ) |
21 |
|
eluz2 |
⊢ ( ( 𝑀 + 𝑁 ) ∈ ( ℤ≥ ‘ ( 𝐼 ‘ 𝐶 ) ) ↔ ( ( 𝐼 ‘ 𝐶 ) ∈ ℤ ∧ ( 𝑀 + 𝑁 ) ∈ ℤ ∧ ( 𝐼 ‘ 𝐶 ) ≤ ( 𝑀 + 𝑁 ) ) ) |
22 |
13 18 20 21
|
syl3anbrc |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 𝑀 + 𝑁 ) ∈ ( ℤ≥ ‘ ( 𝐼 ‘ 𝐶 ) ) ) |
23 |
|
fzss2 |
⊢ ( ( 𝑀 + 𝑁 ) ∈ ( ℤ≥ ‘ ( 𝐼 ‘ 𝐶 ) ) → ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ⊆ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
24 |
22 23
|
syl |
⊢ ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) → ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ⊆ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
25 |
24
|
sselda |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → 𝐽 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
26 |
1 2 3 4 5 6 7 8 9
|
ballotlemsdom |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) → ( ( 𝑆 ‘ 𝐶 ) ‘ 𝐽 ) ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
27 |
25 26
|
syldan |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( ( 𝑆 ‘ 𝐶 ) ‘ 𝐽 ) ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) |
28 |
27
|
elfzelzd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( ( 𝑆 ‘ 𝐶 ) ‘ 𝐽 ) ∈ ℤ ) |
29 |
|
elfzelz |
⊢ ( 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) → 𝐽 ∈ ℤ ) |
30 |
29
|
adantl |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → 𝐽 ∈ ℤ ) |
31 |
30
|
zred |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → 𝐽 ∈ ℝ ) |
32 |
14
|
zred |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( 𝐼 ‘ 𝐶 ) ∈ ℝ ) |
33 |
|
1red |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → 1 ∈ ℝ ) |
34 |
32 33
|
readdcld |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( ( 𝐼 ‘ 𝐶 ) + 1 ) ∈ ℝ ) |
35 |
|
elfzle2 |
⊢ ( 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) → 𝐽 ≤ ( 𝐼 ‘ 𝐶 ) ) |
36 |
35
|
adantl |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → 𝐽 ≤ ( 𝐼 ‘ 𝐶 ) ) |
37 |
14
|
zcnd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( 𝐼 ‘ 𝐶 ) ∈ ℂ ) |
38 |
|
1cnd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → 1 ∈ ℂ ) |
39 |
37 38
|
pncand |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 1 ) = ( 𝐼 ‘ 𝐶 ) ) |
40 |
36 39
|
breqtrrd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → 𝐽 ≤ ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 1 ) ) |
41 |
31 34 33 40
|
lesubd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → 1 ≤ ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝐽 ) ) |
42 |
1 2 3 4 5 6 7 8 9
|
ballotlemsv |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) → ( ( 𝑆 ‘ 𝐶 ) ‘ 𝐽 ) = if ( 𝐽 ≤ ( 𝐼 ‘ 𝐶 ) , ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝐽 ) , 𝐽 ) ) |
43 |
25 42
|
syldan |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( ( 𝑆 ‘ 𝐶 ) ‘ 𝐽 ) = if ( 𝐽 ≤ ( 𝐼 ‘ 𝐶 ) , ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝐽 ) , 𝐽 ) ) |
44 |
36
|
iftrued |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → if ( 𝐽 ≤ ( 𝐼 ‘ 𝐶 ) , ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝐽 ) , 𝐽 ) = ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝐽 ) ) |
45 |
43 44
|
eqtrd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( ( 𝑆 ‘ 𝐶 ) ‘ 𝐽 ) = ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝐽 ) ) |
46 |
41 45
|
breqtrrd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → 1 ≤ ( ( 𝑆 ‘ 𝐶 ) ‘ 𝐽 ) ) |
47 |
13
|
adantr |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) → ( 𝐼 ‘ 𝐶 ) ∈ ℤ ) |
48 |
|
elfznn |
⊢ ( 𝐽 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) → 𝐽 ∈ ℕ ) |
49 |
48
|
adantl |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) → 𝐽 ∈ ℕ ) |
50 |
47 49
|
ltesubnnd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝑀 + 𝑁 ) ) ) → ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝐽 ) ≤ ( 𝐼 ‘ 𝐶 ) ) |
51 |
25 50
|
syldan |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( ( ( 𝐼 ‘ 𝐶 ) + 1 ) − 𝐽 ) ≤ ( 𝐼 ‘ 𝐶 ) ) |
52 |
45 51
|
eqbrtrd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( ( 𝑆 ‘ 𝐶 ) ‘ 𝐽 ) ≤ ( 𝐼 ‘ 𝐶 ) ) |
53 |
10 14 28 46 52
|
elfzd |
⊢ ( ( 𝐶 ∈ ( 𝑂 ∖ 𝐸 ) ∧ 𝐽 ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) → ( ( 𝑆 ‘ 𝐶 ) ‘ 𝐽 ) ∈ ( 1 ... ( 𝐼 ‘ 𝐶 ) ) ) |