Step | Hyp | Ref
| Expression |
1 | | ballotth.m |
. . . . 5
⊢ 𝑀 ∈ ℕ |
2 | | ballotth.n |
. . . . 5
⊢ 𝑁 ∈ ℕ |
3 | | ballotth.o |
. . . . 5
⊢ 𝑂 = {𝑐 ∈ 𝒫 (1...(𝑀 + 𝑁)) ∣ (#‘𝑐) = 𝑀} |
4 | | ballotth.p |
. . . . 5
⊢ 𝑃 = (𝑥 ∈ 𝒫 𝑂 ↦ ((#‘𝑥) / (#‘𝑂))) |
5 | | ballotth.f |
. . . . 5
⊢ 𝐹 = (𝑐 ∈ 𝑂 ↦ (𝑖 ∈ ℤ ↦ ((#‘((1...𝑖) ∩ 𝑐)) − (#‘((1...𝑖) ∖ 𝑐))))) |
6 | | ballotth.e |
. . . . 5
⊢ 𝐸 = {𝑐 ∈ 𝑂 ∣ ∀𝑖 ∈ (1...(𝑀 + 𝑁))0 < ((𝐹‘𝑐)‘𝑖)} |
7 | | ballotth.mgtn |
. . . . 5
⊢ 𝑁 < 𝑀 |
8 | | ballotth.i |
. . . . 5
⊢ 𝐼 = (𝑐 ∈ (𝑂 ∖ 𝐸) ↦ inf({𝑘 ∈ (1...(𝑀 + 𝑁)) ∣ ((𝐹‘𝑐)‘𝑘) = 0}, ℝ, < )) |
9 | | ballotth.s |
. . . . 5
⊢ 𝑆 = (𝑐 ∈ (𝑂 ∖ 𝐸) ↦ (𝑖 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑖 ≤ (𝐼‘𝑐), (((𝐼‘𝑐) + 1) − 𝑖), 𝑖))) |
10 | 1, 2, 3, 4, 5, 6, 7, 8, 9 | ballotlemsval 29897 |
. . . 4
⊢ (𝐶 ∈ (𝑂 ∖ 𝐸) → (𝑆‘𝐶) = (𝑖 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑖 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝑖), 𝑖))) |
11 | | breq1 4586 |
. . . . . 6
⊢ (𝑖 = 𝑗 → (𝑖 ≤ (𝐼‘𝐶) ↔ 𝑗 ≤ (𝐼‘𝐶))) |
12 | | oveq2 6557 |
. . . . . 6
⊢ (𝑖 = 𝑗 → (((𝐼‘𝐶) + 1) − 𝑖) = (((𝐼‘𝐶) + 1) − 𝑗)) |
13 | | id 22 |
. . . . . 6
⊢ (𝑖 = 𝑗 → 𝑖 = 𝑗) |
14 | 11, 12, 13 | ifbieq12d 4063 |
. . . . 5
⊢ (𝑖 = 𝑗 → if(𝑖 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝑖), 𝑖) = if(𝑗 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝑗), 𝑗)) |
15 | 14 | cbvmptv 4678 |
. . . 4
⊢ (𝑖 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑖 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝑖), 𝑖)) = (𝑗 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑗 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝑗), 𝑗)) |
16 | 10, 15 | syl6eq 2660 |
. . 3
⊢ (𝐶 ∈ (𝑂 ∖ 𝐸) → (𝑆‘𝐶) = (𝑗 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑗 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝑗), 𝑗))) |
17 | 16 | adantr 480 |
. 2
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) → (𝑆‘𝐶) = (𝑗 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑗 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝑗), 𝑗))) |
18 | | simpr 476 |
. . . . 5
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝑗 = 𝐽) → 𝑗 = 𝐽) |
19 | 18 | breq1d 4593 |
. . . 4
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝑗 = 𝐽) → (𝑗 ≤ (𝐼‘𝐶) ↔ 𝐽 ≤ (𝐼‘𝐶))) |
20 | 18 | oveq2d 6565 |
. . . 4
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝑗 = 𝐽) → (((𝐼‘𝐶) + 1) − 𝑗) = (((𝐼‘𝐶) + 1) − 𝐽)) |
21 | 19, 20, 18 | ifbieq12d 4063 |
. . 3
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝑗 = 𝐽) → if(𝑗 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝑗), 𝑗) = if(𝐽 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝐽), 𝐽)) |
22 | 21 | adantlr 747 |
. 2
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝑗 = 𝐽) → if(𝑗 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝑗), 𝑗) = if(𝐽 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝐽), 𝐽)) |
23 | | simpr 476 |
. 2
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) → 𝐽 ∈ (1...(𝑀 + 𝑁))) |
24 | | ovex 6577 |
. . . 4
⊢ (((𝐼‘𝐶) + 1) − 𝐽) ∈ V |
25 | 24 | a1i 11 |
. . 3
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ 𝐽 ≤ (𝐼‘𝐶)) → (((𝐼‘𝐶) + 1) − 𝐽) ∈ V) |
26 | | elex 3185 |
. . . 4
⊢ (𝐽 ∈ (1...(𝑀 + 𝑁)) → 𝐽 ∈ V) |
27 | 26 | ad2antlr 759 |
. . 3
⊢ (((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) ∧ ¬ 𝐽 ≤ (𝐼‘𝐶)) → 𝐽 ∈ V) |
28 | 25, 27 | ifclda 4070 |
. 2
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) → if(𝐽 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝐽), 𝐽) ∈ V) |
29 | 17, 22, 23, 28 | fvmptd 6197 |
1
⊢ ((𝐶 ∈ (𝑂 ∖ 𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) → ((𝑆‘𝐶)‘𝐽) = if(𝐽 ≤ (𝐼‘𝐶), (((𝐼‘𝐶) + 1) − 𝐽), 𝐽)) |