Proof of Theorem ballotlemsdom
Step | Hyp | Ref
| Expression |
1 | | ballotth.m |
. . 3
⊢ 𝑀 ∈ ℕ |
2 | | ballotth.n |
. . 3
⊢ 𝑁 ∈ ℕ |
3 | | ballotth.o |
. . 3
⊢ 𝑂 = {𝑐 ∈ 𝒫 (1...(𝑀 + 𝑁)) ∣ (♯‘𝑐) = 𝑀} |
4 | | ballotth.p |
. . 3
⊢ 𝑃 = (𝑥 ∈ 𝒫 𝑂 ↦ ((♯‘𝑥) / (♯‘𝑂))) |
5 | | ballotth.f |
. . 3
⊢ 𝐹 = (𝑐 ∈ 𝑂 ↦ (𝑖 ∈ ℤ ↦
((♯‘((1...𝑖)
∩ 𝑐)) −
(♯‘((1...𝑖)
∖ 𝑐))))) |
6 | | ballotth.e |
. . 3
⊢ 𝐸 = {𝑐 ∈ 𝑂 ∣ ∀𝑖 ∈ (1...(𝑀 + 𝑁))0 < ((𝐹‘𝑐)‘𝑖)} |
7 | | ballotth.mgtn |
. . 3
⊢ 𝑁 < 𝑀 |
8 | | ballotth.i |
. . 3
⊢ 𝐼 = (𝑐 ∈ (𝑂 ∖ 𝐸) ↦ inf({𝑘 ∈ (1...(𝑀 + 𝑁)) ∣ ((𝐹‘𝑐)‘𝑘) = 0}, ℝ, < )) |
9 | | ballotth.s |
. . 3
⊢ 𝑆 = (𝑐 ∈ (𝑂 ∖ 𝐸) ↦ (𝑖 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑖 ≤ (𝐼‘𝑐), (((𝐼‘𝑐) + 1) − 𝑖), 𝑖))) |
10 | 1, 2, 3, 4, 5, 6, 7, 8, 9 | ballotlemsv 32376 |
. 2
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) → ((𝑆‘𝐶)‘𝐽) = if(𝐽 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝐽), 𝐽)) |
11 | 1, 2, 3, 4, 5, 6, 7, 8 | ballotlemiex 32368 |
. . . . . . . 8
⊢ (𝐶 ∈ (𝑂 ∖ 𝐸) → ((𝐼‘𝐶) ∈ (1...(𝑀 + 𝑁)) ∧ ((𝐹‘𝐶)‘(𝐼‘𝐶)) = 0)) |
12 | 11 | simpld 494 |
. . . . . . 7
⊢ (𝐶 ∈ (𝑂 ∖ 𝐸) → (𝐼‘𝐶) ∈ (1...(𝑀 + 𝑁))) |
13 | 12 | elfzelzd 13186 |
. . . . . 6
⊢ (𝐶 ∈ (𝑂 ∖ 𝐸) → (𝐼‘𝐶) ∈ ℤ) |
14 | 13 | ad2antrr 722 |
. . . . 5
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → (𝐼‘𝐶) ∈ ℤ) |
15 | | nnaddcl 11926 |
. . . . . . . 8
⊢ ((𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ) → (𝑀 + 𝑁) ∈ ℕ) |
16 | 1, 2, 15 | mp2an 688 |
. . . . . . 7
⊢ (𝑀 + 𝑁) ∈ ℕ |
17 | 16 | nnzi 12274 |
. . . . . 6
⊢ (𝑀 + 𝑁) ∈ ℤ |
18 | 17 | a1i 11 |
. . . . 5
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → (𝑀 + 𝑁) ∈ ℤ) |
19 | 12 | ad2antrr 722 |
. . . . . 6
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → (𝐼‘𝐶) ∈ (1...(𝑀 + 𝑁))) |
20 | | elfzle2 13189 |
. . . . . 6
⊢ ((𝐼‘𝐶) ∈ (1...(𝑀 + 𝑁)) → (𝐼‘𝐶) ≤ (𝑀 + 𝑁)) |
21 | 19, 20 | syl 17 |
. . . . 5
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → (𝐼‘𝐶) ≤ (𝑀 + 𝑁)) |
22 | | eluz2 12517 |
. . . . . 6
⊢ ((𝑀 + 𝑁) ∈
(ℤ≥‘(𝐼‘𝐶)) ↔ ((𝐼‘𝐶) ∈ ℤ ∧ (𝑀 + 𝑁) ∈ ℤ ∧ (𝐼‘𝐶) ≤ (𝑀 + 𝑁))) |
23 | | fzss2 13225 |
. . . . . 6
⊢ ((𝑀 + 𝑁) ∈
(ℤ≥‘(𝐼‘𝐶)) → (1...(𝐼‘𝐶)) ⊆ (1...(𝑀 + 𝑁))) |
24 | 22, 23 | sylbir 234 |
. . . . 5
⊢ (((𝐼‘𝐶) ∈ ℤ ∧ (𝑀 + 𝑁) ∈ ℤ ∧ (𝐼‘𝐶) ≤ (𝑀 + 𝑁)) → (1...(𝐼‘𝐶)) ⊆ (1...(𝑀 + 𝑁))) |
25 | 14, 18, 21, 24 | syl3anc 1369 |
. . . 4
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → (1...(𝐼‘𝐶)) ⊆ (1...(𝑀 + 𝑁))) |
26 | | 1zzd 12281 |
. . . . . . 7
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → 1 ∈ ℤ) |
27 | | simplr 765 |
. . . . . . . 8
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → 𝐽 ∈ (1...(𝑀 + 𝑁))) |
28 | 27 | elfzelzd 13186 |
. . . . . . 7
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → 𝐽 ∈ ℤ) |
29 | | elfzle1 13188 |
. . . . . . . 8
⊢ (𝐽 ∈ (1...(𝑀 + 𝑁)) → 1 ≤ 𝐽) |
30 | 27, 29 | syl 17 |
. . . . . . 7
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → 1 ≤ 𝐽) |
31 | | simpr 484 |
. . . . . . 7
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → 𝐽 ≤ (𝐼‘𝐶)) |
32 | 26, 14, 28, 30, 31 | elfzd 13176 |
. . . . . 6
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → 𝐽 ∈ (1...(𝐼‘𝐶))) |
33 | | fzrev3i 13252 |
. . . . . 6
⊢ (𝐽 ∈ (1...(𝐼‘𝐶)) → ((1 + (𝐼‘𝐶)) − 𝐽) ∈ (1...(𝐼‘𝐶))) |
34 | 32, 33 | syl 17 |
. . . . 5
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → ((1 + (𝐼‘𝐶)) − 𝐽) ∈ (1...(𝐼‘𝐶))) |
35 | | 1cnd 10901 |
. . . . . . . . 9
⊢ (𝐶 ∈ (𝑂 ∖ 𝐸) → 1 ∈ ℂ) |
36 | 13 | zcnd 12356 |
. . . . . . . . 9
⊢ (𝐶 ∈ (𝑂 ∖ 𝐸) → (𝐼‘𝐶) ∈ ℂ) |
37 | 35, 36 | addcomd 11107 |
. . . . . . . 8
⊢ (𝐶 ∈ (𝑂 ∖ 𝐸) → (1 + (𝐼‘𝐶)) = ((𝐼‘𝐶) + 1)) |
38 | 37 | oveq1d 7270 |
. . . . . . 7
⊢ (𝐶 ∈ (𝑂 ∖ 𝐸) → ((1 + (𝐼‘𝐶)) − 𝐽) = (((𝐼‘𝐶) + 1) − 𝐽)) |
39 | 38 | eleq1d 2823 |
. . . . . 6
⊢ (𝐶 ∈ (𝑂 ∖ 𝐸) → (((1 + (𝐼‘𝐶)) − 𝐽) ∈ (1...(𝐼‘𝐶)) ↔ (((𝐼‘𝐶) + 1) − 𝐽) ∈ (1...(𝐼‘𝐶)))) |
40 | 39 | ad2antrr 722 |
. . . . 5
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → (((1 + (𝐼‘𝐶)) − 𝐽) ∈ (1...(𝐼‘𝐶)) ↔ (((𝐼‘𝐶) + 1) − 𝐽) ∈ (1...(𝐼‘𝐶)))) |
41 | 34, 40 | mpbid 231 |
. . . 4
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → (((𝐼‘𝐶) + 1) − 𝐽) ∈ (1...(𝐼‘𝐶))) |
42 | 25, 41 | sseldd 3918 |
. . 3
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → (((𝐼‘𝐶) + 1) − 𝐽) ∈ (1...(𝑀 + 𝑁))) |
43 | | simplr 765 |
. . 3
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ ¬ 𝐽 ≤ (𝐼‘𝐶)) → 𝐽 ∈ (1...(𝑀 + 𝑁))) |
44 | 42, 43 | ifclda 4491 |
. 2
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) → if(𝐽 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝐽), 𝐽) ∈ (1...(𝑀 + 𝑁))) |
45 | 10, 44 | eqeltrd 2839 |
1
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) → ((𝑆‘𝐶)‘𝐽) ∈ (1...(𝑀 + 𝑁))) |