Users' Mathboxes Mathbox for Thierry Arnoux < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  ballotlemsima Structured version   Visualization version   GIF version

Theorem ballotlemsima 32382
Description: The image by 𝑆 of an interval before the first pick. (Contributed by Thierry Arnoux, 5-May-2017.)
Hypotheses
Ref Expression
ballotth.m 𝑀 ∈ ℕ
ballotth.n 𝑁 ∈ ℕ
ballotth.o 𝑂 = {𝑐 ∈ 𝒫 (1...(𝑀 + 𝑁)) ∣ (♯‘𝑐) = 𝑀}
ballotth.p 𝑃 = (𝑥 ∈ 𝒫 𝑂 ↦ ((♯‘𝑥) / (♯‘𝑂)))
ballotth.f 𝐹 = (𝑐𝑂 ↦ (𝑖 ∈ ℤ ↦ ((♯‘((1...𝑖) ∩ 𝑐)) − (♯‘((1...𝑖) ∖ 𝑐)))))
ballotth.e 𝐸 = {𝑐𝑂 ∣ ∀𝑖 ∈ (1...(𝑀 + 𝑁))0 < ((𝐹𝑐)‘𝑖)}
ballotth.mgtn 𝑁 < 𝑀
ballotth.i 𝐼 = (𝑐 ∈ (𝑂𝐸) ↦ inf({𝑘 ∈ (1...(𝑀 + 𝑁)) ∣ ((𝐹𝑐)‘𝑘) = 0}, ℝ, < ))
ballotth.s 𝑆 = (𝑐 ∈ (𝑂𝐸) ↦ (𝑖 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑖 ≤ (𝐼𝑐), (((𝐼𝑐) + 1) − 𝑖), 𝑖)))
Assertion
Ref Expression
ballotlemsima ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → ((𝑆𝐶) “ (1...𝐽)) = (((𝑆𝐶)‘𝐽)...(𝐼𝐶)))
Distinct variable groups:   𝑀,𝑐   𝑁,𝑐   𝑂,𝑐   𝑖,𝑀   𝑖,𝑁   𝑖,𝑂   𝑘,𝑀   𝑘,𝑁   𝑘,𝑂   𝑖,𝑐,𝐹,𝑘   𝐶,𝑖,𝑘   𝑖,𝐸,𝑘   𝐶,𝑘   𝑘,𝐼,𝑐   𝐸,𝑐   𝑖,𝐼,𝑐   𝑘,𝐽   𝑆,𝑘
Allowed substitution hints:   𝐶(𝑥,𝑐)   𝑃(𝑥,𝑖,𝑘,𝑐)   𝑆(𝑥,𝑖,𝑐)   𝐸(𝑥)   𝐹(𝑥)   𝐼(𝑥)   𝐽(𝑥,𝑖,𝑐)   𝑀(𝑥)   𝑁(𝑥)   𝑂(𝑥)

Proof of Theorem ballotlemsima
Dummy variable 𝑗 is distinct from all other variables.
StepHypRef Expression
1 imassrn 5969 . . . . . 6 ((𝑆𝐶) “ (1...𝐽)) ⊆ ran (𝑆𝐶)
2 ballotth.m . . . . . . . . 9 𝑀 ∈ ℕ
3 ballotth.n . . . . . . . . 9 𝑁 ∈ ℕ
4 ballotth.o . . . . . . . . 9 𝑂 = {𝑐 ∈ 𝒫 (1...(𝑀 + 𝑁)) ∣ (♯‘𝑐) = 𝑀}
5 ballotth.p . . . . . . . . 9 𝑃 = (𝑥 ∈ 𝒫 𝑂 ↦ ((♯‘𝑥) / (♯‘𝑂)))
6 ballotth.f . . . . . . . . 9 𝐹 = (𝑐𝑂 ↦ (𝑖 ∈ ℤ ↦ ((♯‘((1...𝑖) ∩ 𝑐)) − (♯‘((1...𝑖) ∖ 𝑐)))))
7 ballotth.e . . . . . . . . 9 𝐸 = {𝑐𝑂 ∣ ∀𝑖 ∈ (1...(𝑀 + 𝑁))0 < ((𝐹𝑐)‘𝑖)}
8 ballotth.mgtn . . . . . . . . 9 𝑁 < 𝑀
9 ballotth.i . . . . . . . . 9 𝐼 = (𝑐 ∈ (𝑂𝐸) ↦ inf({𝑘 ∈ (1...(𝑀 + 𝑁)) ∣ ((𝐹𝑐)‘𝑘) = 0}, ℝ, < ))
10 ballotth.s . . . . . . . . 9 𝑆 = (𝑐 ∈ (𝑂𝐸) ↦ (𝑖 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑖 ≤ (𝐼𝑐), (((𝐼𝑐) + 1) − 𝑖), 𝑖)))
112, 3, 4, 5, 6, 7, 8, 9, 10ballotlemsf1o 32380 . . . . . . . 8 (𝐶 ∈ (𝑂𝐸) → ((𝑆𝐶):(1...(𝑀 + 𝑁))–1-1-onto→(1...(𝑀 + 𝑁)) ∧ (𝑆𝐶) = (𝑆𝐶)))
1211simpld 494 . . . . . . 7 (𝐶 ∈ (𝑂𝐸) → (𝑆𝐶):(1...(𝑀 + 𝑁))–1-1-onto→(1...(𝑀 + 𝑁)))
13 f1of 6700 . . . . . . 7 ((𝑆𝐶):(1...(𝑀 + 𝑁))–1-1-onto→(1...(𝑀 + 𝑁)) → (𝑆𝐶):(1...(𝑀 + 𝑁))⟶(1...(𝑀 + 𝑁)))
14 frn 6591 . . . . . . 7 ((𝑆𝐶):(1...(𝑀 + 𝑁))⟶(1...(𝑀 + 𝑁)) → ran (𝑆𝐶) ⊆ (1...(𝑀 + 𝑁)))
1512, 13, 143syl 18 . . . . . 6 (𝐶 ∈ (𝑂𝐸) → ran (𝑆𝐶) ⊆ (1...(𝑀 + 𝑁)))
161, 15sstrid 3928 . . . . 5 (𝐶 ∈ (𝑂𝐸) → ((𝑆𝐶) “ (1...𝐽)) ⊆ (1...(𝑀 + 𝑁)))
17 fzssuz 13226 . . . . . 6 (1...(𝑀 + 𝑁)) ⊆ (ℤ‘1)
18 uzssz 12532 . . . . . 6 (ℤ‘1) ⊆ ℤ
1917, 18sstri 3926 . . . . 5 (1...(𝑀 + 𝑁)) ⊆ ℤ
2016, 19sstrdi 3929 . . . 4 (𝐶 ∈ (𝑂𝐸) → ((𝑆𝐶) “ (1...𝐽)) ⊆ ℤ)
2120adantr 480 . . 3 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → ((𝑆𝐶) “ (1...𝐽)) ⊆ ℤ)
2221sselda 3917 . 2 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ((𝑆𝐶) “ (1...𝐽))) → 𝑘 ∈ ℤ)
23 elfzelz 13185 . . 3 (𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) → 𝑘 ∈ ℤ)
2423adantl 481 . 2 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶))) → 𝑘 ∈ ℤ)
25 f1ofn 6701 . . . . . . 7 ((𝑆𝐶):(1...(𝑀 + 𝑁))–1-1-onto→(1...(𝑀 + 𝑁)) → (𝑆𝐶) Fn (1...(𝑀 + 𝑁)))
2612, 25syl 17 . . . . . 6 (𝐶 ∈ (𝑂𝐸) → (𝑆𝐶) Fn (1...(𝑀 + 𝑁)))
2726adantr 480 . . . . 5 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑆𝐶) Fn (1...(𝑀 + 𝑁)))
282, 3, 4, 5, 6, 7, 8, 9ballotlemiex 32368 . . . . . . . . . 10 (𝐶 ∈ (𝑂𝐸) → ((𝐼𝐶) ∈ (1...(𝑀 + 𝑁)) ∧ ((𝐹𝐶)‘(𝐼𝐶)) = 0))
2928simpld 494 . . . . . . . . 9 (𝐶 ∈ (𝑂𝐸) → (𝐼𝐶) ∈ (1...(𝑀 + 𝑁)))
3029adantr 480 . . . . . . . 8 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝐼𝐶) ∈ (1...(𝑀 + 𝑁)))
31 elfzuz3 13182 . . . . . . . 8 ((𝐼𝐶) ∈ (1...(𝑀 + 𝑁)) → (𝑀 + 𝑁) ∈ (ℤ‘(𝐼𝐶)))
3230, 31syl 17 . . . . . . 7 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑀 + 𝑁) ∈ (ℤ‘(𝐼𝐶)))
33 elfzuz3 13182 . . . . . . . 8 (𝐽 ∈ (1...(𝐼𝐶)) → (𝐼𝐶) ∈ (ℤ𝐽))
3433adantl 481 . . . . . . 7 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝐼𝐶) ∈ (ℤ𝐽))
35 uztrn 12529 . . . . . . 7 (((𝑀 + 𝑁) ∈ (ℤ‘(𝐼𝐶)) ∧ (𝐼𝐶) ∈ (ℤ𝐽)) → (𝑀 + 𝑁) ∈ (ℤ𝐽))
3632, 34, 35syl2anc 583 . . . . . 6 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑀 + 𝑁) ∈ (ℤ𝐽))
37 fzss2 13225 . . . . . 6 ((𝑀 + 𝑁) ∈ (ℤ𝐽) → (1...𝐽) ⊆ (1...(𝑀 + 𝑁)))
3836, 37syl 17 . . . . 5 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (1...𝐽) ⊆ (1...(𝑀 + 𝑁)))
39 fvelimab 6823 . . . . 5 (((𝑆𝐶) Fn (1...(𝑀 + 𝑁)) ∧ (1...𝐽) ⊆ (1...(𝑀 + 𝑁))) → (𝑘 ∈ ((𝑆𝐶) “ (1...𝐽)) ↔ ∃𝑗 ∈ (1...𝐽)((𝑆𝐶)‘𝑗) = 𝑘))
4027, 38, 39syl2anc 583 . . . 4 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑘 ∈ ((𝑆𝐶) “ (1...𝐽)) ↔ ∃𝑗 ∈ (1...𝐽)((𝑆𝐶)‘𝑗) = 𝑘))
4140adantr 480 . . 3 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ ((𝑆𝐶) “ (1...𝐽)) ↔ ∃𝑗 ∈ (1...𝐽)((𝑆𝐶)‘𝑗) = 𝑘))
42 1zzd 12281 . . . . . . . . . . 11 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 1 ∈ ℤ)
432nnzi 12274 . . . . . . . . . . . . 13 𝑀 ∈ ℤ
443nnzi 12274 . . . . . . . . . . . . 13 𝑁 ∈ ℤ
45 zaddcl 12290 . . . . . . . . . . . . 13 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 + 𝑁) ∈ ℤ)
4643, 44, 45mp2an 688 . . . . . . . . . . . 12 (𝑀 + 𝑁) ∈ ℤ
4746a1i 11 . . . . . . . . . . 11 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑀 + 𝑁) ∈ ℤ)
48 elfzelz 13185 . . . . . . . . . . . 12 (𝐽 ∈ (1...(𝐼𝐶)) → 𝐽 ∈ ℤ)
4948adantl 481 . . . . . . . . . . 11 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ∈ ℤ)
50 elfzle1 13188 . . . . . . . . . . . 12 (𝐽 ∈ (1...(𝐼𝐶)) → 1 ≤ 𝐽)
5150adantl 481 . . . . . . . . . . 11 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 1 ≤ 𝐽)
5249zred 12355 . . . . . . . . . . . 12 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ∈ ℝ)
53 elfzelz 13185 . . . . . . . . . . . . . . 15 ((𝐼𝐶) ∈ (1...(𝑀 + 𝑁)) → (𝐼𝐶) ∈ ℤ)
5429, 53syl 17 . . . . . . . . . . . . . 14 (𝐶 ∈ (𝑂𝐸) → (𝐼𝐶) ∈ ℤ)
5554adantr 480 . . . . . . . . . . . . 13 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝐼𝐶) ∈ ℤ)
5655zred 12355 . . . . . . . . . . . 12 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝐼𝐶) ∈ ℝ)
5747zred 12355 . . . . . . . . . . . 12 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑀 + 𝑁) ∈ ℝ)
58 elfzle2 13189 . . . . . . . . . . . . 13 (𝐽 ∈ (1...(𝐼𝐶)) → 𝐽 ≤ (𝐼𝐶))
5958adantl 481 . . . . . . . . . . . 12 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ≤ (𝐼𝐶))
60 elfzle2 13189 . . . . . . . . . . . . . 14 ((𝐼𝐶) ∈ (1...(𝑀 + 𝑁)) → (𝐼𝐶) ≤ (𝑀 + 𝑁))
6129, 60syl 17 . . . . . . . . . . . . 13 (𝐶 ∈ (𝑂𝐸) → (𝐼𝐶) ≤ (𝑀 + 𝑁))
6261adantr 480 . . . . . . . . . . . 12 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝐼𝐶) ≤ (𝑀 + 𝑁))
6352, 56, 57, 59, 62letrd 11062 . . . . . . . . . . 11 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ≤ (𝑀 + 𝑁))
6442, 47, 49, 51, 63elfzd 13176 . . . . . . . . . 10 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ∈ (1...(𝑀 + 𝑁)))
652, 3, 4, 5, 6, 7, 8, 9, 10ballotlemsv 32376 . . . . . . . . . 10 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) → ((𝑆𝐶)‘𝐽) = if(𝐽 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝐽), 𝐽))
6664, 65syldan 590 . . . . . . . . 9 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → ((𝑆𝐶)‘𝐽) = if(𝐽 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝐽), 𝐽))
67 simpr 484 . . . . . . . . . 10 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ∈ (1...(𝐼𝐶)))
68 iftrue 4462 . . . . . . . . . 10 (𝐽 ≤ (𝐼𝐶) → if(𝐽 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝐽), 𝐽) = (((𝐼𝐶) + 1) − 𝐽))
6967, 58, 683syl 18 . . . . . . . . 9 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → if(𝐽 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝐽), 𝐽) = (((𝐼𝐶) + 1) − 𝐽))
7066, 69eqtrd 2778 . . . . . . . 8 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → ((𝑆𝐶)‘𝐽) = (((𝐼𝐶) + 1) − 𝐽))
7170oveq1d 7270 . . . . . . 7 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) = ((((𝐼𝐶) + 1) − 𝐽)...(𝐼𝐶)))
7271eleq2d 2824 . . . . . 6 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) ↔ 𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(𝐼𝐶))))
7372adantr 480 . . . . 5 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) ↔ 𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(𝐼𝐶))))
7454ad2antrr 722 . . . . . . . . 9 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝐼𝐶) ∈ ℤ)
7574zcnd 12356 . . . . . . . 8 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝐼𝐶) ∈ ℂ)
76 1cnd 10901 . . . . . . . 8 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → 1 ∈ ℂ)
7775, 76pncand 11263 . . . . . . 7 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (((𝐼𝐶) + 1) − 1) = (𝐼𝐶))
7877oveq2d 7271 . . . . . 6 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → ((((𝐼𝐶) + 1) − 𝐽)...(((𝐼𝐶) + 1) − 1)) = ((((𝐼𝐶) + 1) − 𝐽)...(𝐼𝐶)))
7978eleq2d 2824 . . . . 5 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(((𝐼𝐶) + 1) − 1)) ↔ 𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(𝐼𝐶))))
80 1zzd 12281 . . . . . 6 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → 1 ∈ ℤ)
8148ad2antlr 723 . . . . . 6 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → 𝐽 ∈ ℤ)
8274peano2zd 12358 . . . . . 6 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → ((𝐼𝐶) + 1) ∈ ℤ)
83 simpr 484 . . . . . 6 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → 𝑘 ∈ ℤ)
84 fzrev 13248 . . . . . 6 (((1 ∈ ℤ ∧ 𝐽 ∈ ℤ) ∧ (((𝐼𝐶) + 1) ∈ ℤ ∧ 𝑘 ∈ ℤ)) → (𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(((𝐼𝐶) + 1) − 1)) ↔ (((𝐼𝐶) + 1) − 𝑘) ∈ (1...𝐽)))
8580, 81, 82, 83, 84syl22anc 835 . . . . 5 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(((𝐼𝐶) + 1) − 1)) ↔ (((𝐼𝐶) + 1) − 𝑘) ∈ (1...𝐽)))
8673, 79, 853bitr2d 306 . . . 4 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) ↔ (((𝐼𝐶) + 1) − 𝑘) ∈ (1...𝐽)))
87 risset 3193 . . . . 5 ((((𝐼𝐶) + 1) − 𝑘) ∈ (1...𝐽) ↔ ∃𝑗 ∈ (1...𝐽)𝑗 = (((𝐼𝐶) + 1) − 𝑘))
8887a1i 11 . . . 4 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → ((((𝐼𝐶) + 1) − 𝑘) ∈ (1...𝐽) ↔ ∃𝑗 ∈ (1...𝐽)𝑗 = (((𝐼𝐶) + 1) − 𝑘)))
89 eqcom 2745 . . . . . . 7 ((((𝐼𝐶) + 1) − 𝑘) = 𝑗𝑗 = (((𝐼𝐶) + 1) − 𝑘))
9054ad2antrr 722 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → (𝐼𝐶) ∈ ℤ)
9190adantlr 711 . . . . . . . . . 10 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → (𝐼𝐶) ∈ ℤ)
9291zcnd 12356 . . . . . . . . 9 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → (𝐼𝐶) ∈ ℂ)
93 1cnd 10901 . . . . . . . . 9 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → 1 ∈ ℂ)
9492, 93addcld 10925 . . . . . . . 8 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → ((𝐼𝐶) + 1) ∈ ℂ)
95 simplr 765 . . . . . . . . 9 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → 𝑘 ∈ ℤ)
9695zcnd 12356 . . . . . . . 8 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → 𝑘 ∈ ℂ)
97 elfzelz 13185 . . . . . . . . . 10 (𝑗 ∈ (1...𝐽) → 𝑗 ∈ ℤ)
9897adantl 481 . . . . . . . . 9 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ∈ ℤ)
9998zcnd 12356 . . . . . . . 8 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ∈ ℂ)
100 subsub23 11156 . . . . . . . 8 ((((𝐼𝐶) + 1) ∈ ℂ ∧ 𝑘 ∈ ℂ ∧ 𝑗 ∈ ℂ) → ((((𝐼𝐶) + 1) − 𝑘) = 𝑗 ↔ (((𝐼𝐶) + 1) − 𝑗) = 𝑘))
10194, 96, 99, 100syl3anc 1369 . . . . . . 7 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → ((((𝐼𝐶) + 1) − 𝑘) = 𝑗 ↔ (((𝐼𝐶) + 1) − 𝑗) = 𝑘))
10289, 101bitr3id 284 . . . . . 6 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → (𝑗 = (((𝐼𝐶) + 1) − 𝑘) ↔ (((𝐼𝐶) + 1) − 𝑗) = 𝑘))
103 simpll 763 . . . . . . . . . 10 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝐶 ∈ (𝑂𝐸))
10438sselda 3917 . . . . . . . . . 10 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ∈ (1...(𝑀 + 𝑁)))
1052, 3, 4, 5, 6, 7, 8, 9, 10ballotlemsv 32376 . . . . . . . . . 10 ((𝐶 ∈ (𝑂𝐸) ∧ 𝑗 ∈ (1...(𝑀 + 𝑁))) → ((𝑆𝐶)‘𝑗) = if(𝑗 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝑗), 𝑗))
106103, 104, 105syl2anc 583 . . . . . . . . 9 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → ((𝑆𝐶)‘𝑗) = if(𝑗 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝑗), 𝑗))
10797adantl 481 . . . . . . . . . . . 12 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ∈ ℤ)
108107zred 12355 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ∈ ℝ)
10948ad2antlr 723 . . . . . . . . . . . 12 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝐽 ∈ ℤ)
110109zred 12355 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝐽 ∈ ℝ)
11190zred 12355 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → (𝐼𝐶) ∈ ℝ)
112 elfzle2 13189 . . . . . . . . . . . 12 (𝑗 ∈ (1...𝐽) → 𝑗𝐽)
113112adantl 481 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗𝐽)
11458ad2antlr 723 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝐽 ≤ (𝐼𝐶))
115108, 110, 111, 113, 114letrd 11062 . . . . . . . . . 10 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ≤ (𝐼𝐶))
116 iftrue 4462 . . . . . . . . . 10 (𝑗 ≤ (𝐼𝐶) → if(𝑗 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝑗), 𝑗) = (((𝐼𝐶) + 1) − 𝑗))
117115, 116syl 17 . . . . . . . . 9 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → if(𝑗 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝑗), 𝑗) = (((𝐼𝐶) + 1) − 𝑗))
118106, 117eqtrd 2778 . . . . . . . 8 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → ((𝑆𝐶)‘𝑗) = (((𝐼𝐶) + 1) − 𝑗))
119118eqeq1d 2740 . . . . . . 7 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → (((𝑆𝐶)‘𝑗) = 𝑘 ↔ (((𝐼𝐶) + 1) − 𝑗) = 𝑘))
120119adantlr 711 . . . . . 6 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → (((𝑆𝐶)‘𝑗) = 𝑘 ↔ (((𝐼𝐶) + 1) − 𝑗) = 𝑘))
121102, 120bitr4d 281 . . . . 5 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → (𝑗 = (((𝐼𝐶) + 1) − 𝑘) ↔ ((𝑆𝐶)‘𝑗) = 𝑘))
122121rexbidva 3224 . . . 4 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (∃𝑗 ∈ (1...𝐽)𝑗 = (((𝐼𝐶) + 1) − 𝑘) ↔ ∃𝑗 ∈ (1...𝐽)((𝑆𝐶)‘𝑗) = 𝑘))
12386, 88, 1223bitrd 304 . . 3 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) ↔ ∃𝑗 ∈ (1...𝐽)((𝑆𝐶)‘𝑗) = 𝑘))
12441, 123bitr4d 281 . 2 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ ((𝑆𝐶) “ (1...𝐽)) ↔ 𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶))))
12522, 24, 124eqrdav 2737 1 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → ((𝑆𝐶) “ (1...𝐽)) = (((𝑆𝐶)‘𝐽)...(𝐼𝐶)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 395   = wceq 1539  wcel 2108  wral 3063  wrex 3064  {crab 3067  cdif 3880  cin 3882  wss 3883  ifcif 4456  𝒫 cpw 4530   class class class wbr 5070  cmpt 5153  ccnv 5579  ran crn 5581  cima 5583   Fn wfn 6413  wf 6414  1-1-ontowf1o 6417  cfv 6418  (class class class)co 7255  infcinf 9130  cc 10800  cr 10801  0cc0 10802  1c1 10803   + caddc 10805   < clt 10940  cle 10941  cmin 11135   / cdiv 11562  cn 11903  cz 12249  cuz 12511  ...cfz 13168  chash 13972
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-rep 5205  ax-sep 5218  ax-nul 5225  ax-pow 5283  ax-pr 5347  ax-un 7566  ax-cnex 10858  ax-resscn 10859  ax-1cn 10860  ax-icn 10861  ax-addcl 10862  ax-addrcl 10863  ax-mulcl 10864  ax-mulrcl 10865  ax-mulcom 10866  ax-addass 10867  ax-mulass 10868  ax-distr 10869  ax-i2m1 10870  ax-1ne0 10871  ax-1rid 10872  ax-rnegex 10873  ax-rrecex 10874  ax-cnre 10875  ax-pre-lttri 10876  ax-pre-lttrn 10877  ax-pre-ltadd 10878  ax-pre-mulgt0 10879
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3or 1086  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-nel 3049  df-ral 3068  df-rex 3069  df-reu 3070  df-rmo 3071  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-pss 3902  df-nul 4254  df-if 4457  df-pw 4532  df-sn 4559  df-pr 4561  df-tp 4563  df-op 4565  df-uni 4837  df-int 4877  df-iun 4923  df-br 5071  df-opab 5133  df-mpt 5154  df-tr 5188  df-id 5480  df-eprel 5486  df-po 5494  df-so 5495  df-fr 5535  df-we 5537  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-pred 6191  df-ord 6254  df-on 6255  df-lim 6256  df-suc 6257  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425  df-fv 6426  df-riota 7212  df-ov 7258  df-oprab 7259  df-mpo 7260  df-om 7688  df-1st 7804  df-2nd 7805  df-frecs 8068  df-wrecs 8099  df-recs 8173  df-rdg 8212  df-1o 8267  df-oadd 8271  df-er 8456  df-en 8692  df-dom 8693  df-sdom 8694  df-fin 8695  df-sup 9131  df-inf 9132  df-dju 9590  df-card 9628  df-pnf 10942  df-mnf 10943  df-xr 10944  df-ltxr 10945  df-le 10946  df-sub 11137  df-neg 11138  df-nn 11904  df-2 11966  df-n0 12164  df-z 12250  df-uz 12512  df-rp 12660  df-fz 13169  df-hash 13973
This theorem is referenced by:  ballotlemfrc  32393
  Copyright terms: Public domain W3C validator