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 31761
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 5933 . . . . . 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 31759 . . . . . . . 8 (𝐶 ∈ (𝑂𝐸) → ((𝑆𝐶):(1...(𝑀 + 𝑁))–1-1-onto→(1...(𝑀 + 𝑁)) ∧ (𝑆𝐶) = (𝑆𝐶)))
1211simpld 497 . . . . . . 7 (𝐶 ∈ (𝑂𝐸) → (𝑆𝐶):(1...(𝑀 + 𝑁))–1-1-onto→(1...(𝑀 + 𝑁)))
13 f1of 6608 . . . . . . 7 ((𝑆𝐶):(1...(𝑀 + 𝑁))–1-1-onto→(1...(𝑀 + 𝑁)) → (𝑆𝐶):(1...(𝑀 + 𝑁))⟶(1...(𝑀 + 𝑁)))
14 frn 6513 . . . . . . 7 ((𝑆𝐶):(1...(𝑀 + 𝑁))⟶(1...(𝑀 + 𝑁)) → ran (𝑆𝐶) ⊆ (1...(𝑀 + 𝑁)))
1512, 13, 143syl 18 . . . . . 6 (𝐶 ∈ (𝑂𝐸) → ran (𝑆𝐶) ⊆ (1...(𝑀 + 𝑁)))
161, 15sstrid 3976 . . . . 5 (𝐶 ∈ (𝑂𝐸) → ((𝑆𝐶) “ (1...𝐽)) ⊆ (1...(𝑀 + 𝑁)))
17 fzssuz 12940 . . . . . 6 (1...(𝑀 + 𝑁)) ⊆ (ℤ‘1)
18 uzssz 12256 . . . . . 6 (ℤ‘1) ⊆ ℤ
1917, 18sstri 3974 . . . . 5 (1...(𝑀 + 𝑁)) ⊆ ℤ
2016, 19sstrdi 3977 . . . 4 (𝐶 ∈ (𝑂𝐸) → ((𝑆𝐶) “ (1...𝐽)) ⊆ ℤ)
2120adantr 483 . . 3 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → ((𝑆𝐶) “ (1...𝐽)) ⊆ ℤ)
2221sselda 3965 . 2 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ((𝑆𝐶) “ (1...𝐽))) → 𝑘 ∈ ℤ)
23 elfzelz 12900 . . 3 (𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) → 𝑘 ∈ ℤ)
2423adantl 484 . 2 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶))) → 𝑘 ∈ ℤ)
25 f1ofn 6609 . . . . . . 7 ((𝑆𝐶):(1...(𝑀 + 𝑁))–1-1-onto→(1...(𝑀 + 𝑁)) → (𝑆𝐶) Fn (1...(𝑀 + 𝑁)))
2612, 25syl 17 . . . . . 6 (𝐶 ∈ (𝑂𝐸) → (𝑆𝐶) Fn (1...(𝑀 + 𝑁)))
2726adantr 483 . . . . 5 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑆𝐶) Fn (1...(𝑀 + 𝑁)))
282, 3, 4, 5, 6, 7, 8, 9ballotlemiex 31747 . . . . . . . . . 10 (𝐶 ∈ (𝑂𝐸) → ((𝐼𝐶) ∈ (1...(𝑀 + 𝑁)) ∧ ((𝐹𝐶)‘(𝐼𝐶)) = 0))
2928simpld 497 . . . . . . . . 9 (𝐶 ∈ (𝑂𝐸) → (𝐼𝐶) ∈ (1...(𝑀 + 𝑁)))
3029adantr 483 . . . . . . . 8 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝐼𝐶) ∈ (1...(𝑀 + 𝑁)))
31 elfzuz3 12897 . . . . . . . 8 ((𝐼𝐶) ∈ (1...(𝑀 + 𝑁)) → (𝑀 + 𝑁) ∈ (ℤ‘(𝐼𝐶)))
3230, 31syl 17 . . . . . . 7 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑀 + 𝑁) ∈ (ℤ‘(𝐼𝐶)))
33 elfzuz3 12897 . . . . . . . 8 (𝐽 ∈ (1...(𝐼𝐶)) → (𝐼𝐶) ∈ (ℤ𝐽))
3433adantl 484 . . . . . . 7 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝐼𝐶) ∈ (ℤ𝐽))
35 uztrn 12253 . . . . . . 7 (((𝑀 + 𝑁) ∈ (ℤ‘(𝐼𝐶)) ∧ (𝐼𝐶) ∈ (ℤ𝐽)) → (𝑀 + 𝑁) ∈ (ℤ𝐽))
3632, 34, 35syl2anc 586 . . . . . 6 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑀 + 𝑁) ∈ (ℤ𝐽))
37 fzss2 12939 . . . . . 6 ((𝑀 + 𝑁) ∈ (ℤ𝐽) → (1...𝐽) ⊆ (1...(𝑀 + 𝑁)))
3836, 37syl 17 . . . . 5 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (1...𝐽) ⊆ (1...(𝑀 + 𝑁)))
39 fvelimab 6730 . . . . 5 (((𝑆𝐶) Fn (1...(𝑀 + 𝑁)) ∧ (1...𝐽) ⊆ (1...(𝑀 + 𝑁))) → (𝑘 ∈ ((𝑆𝐶) “ (1...𝐽)) ↔ ∃𝑗 ∈ (1...𝐽)((𝑆𝐶)‘𝑗) = 𝑘))
4027, 38, 39syl2anc 586 . . . 4 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑘 ∈ ((𝑆𝐶) “ (1...𝐽)) ↔ ∃𝑗 ∈ (1...𝐽)((𝑆𝐶)‘𝑗) = 𝑘))
4140adantr 483 . . 3 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ ((𝑆𝐶) “ (1...𝐽)) ↔ ∃𝑗 ∈ (1...𝐽)((𝑆𝐶)‘𝑗) = 𝑘))
42 1zzd 12005 . . . . . . . . . . 11 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 1 ∈ ℤ)
432nnzi 11998 . . . . . . . . . . . . 13 𝑀 ∈ ℤ
443nnzi 11998 . . . . . . . . . . . . 13 𝑁 ∈ ℤ
45 zaddcl 12014 . . . . . . . . . . . . 13 ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → (𝑀 + 𝑁) ∈ ℤ)
4643, 44, 45mp2an 690 . . . . . . . . . . . 12 (𝑀 + 𝑁) ∈ ℤ
4746a1i 11 . . . . . . . . . . 11 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑀 + 𝑁) ∈ ℤ)
48 elfzelz 12900 . . . . . . . . . . . 12 (𝐽 ∈ (1...(𝐼𝐶)) → 𝐽 ∈ ℤ)
4948adantl 484 . . . . . . . . . . 11 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ∈ ℤ)
50 elfzle1 12902 . . . . . . . . . . . 12 (𝐽 ∈ (1...(𝐼𝐶)) → 1 ≤ 𝐽)
5150adantl 484 . . . . . . . . . . 11 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 1 ≤ 𝐽)
5249zred 12079 . . . . . . . . . . . 12 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ∈ ℝ)
53 elfzelz 12900 . . . . . . . . . . . . . . 15 ((𝐼𝐶) ∈ (1...(𝑀 + 𝑁)) → (𝐼𝐶) ∈ ℤ)
5429, 53syl 17 . . . . . . . . . . . . . 14 (𝐶 ∈ (𝑂𝐸) → (𝐼𝐶) ∈ ℤ)
5554adantr 483 . . . . . . . . . . . . 13 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝐼𝐶) ∈ ℤ)
5655zred 12079 . . . . . . . . . . . 12 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝐼𝐶) ∈ ℝ)
5747zred 12079 . . . . . . . . . . . 12 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑀 + 𝑁) ∈ ℝ)
58 elfzle2 12903 . . . . . . . . . . . . 13 (𝐽 ∈ (1...(𝐼𝐶)) → 𝐽 ≤ (𝐼𝐶))
5958adantl 484 . . . . . . . . . . . 12 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ≤ (𝐼𝐶))
60 elfzle2 12903 . . . . . . . . . . . . . 14 ((𝐼𝐶) ∈ (1...(𝑀 + 𝑁)) → (𝐼𝐶) ≤ (𝑀 + 𝑁))
6129, 60syl 17 . . . . . . . . . . . . 13 (𝐶 ∈ (𝑂𝐸) → (𝐼𝐶) ≤ (𝑀 + 𝑁))
6261adantr 483 . . . . . . . . . . . 12 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝐼𝐶) ≤ (𝑀 + 𝑁))
6352, 56, 57, 59, 62letrd 10789 . . . . . . . . . . 11 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ≤ (𝑀 + 𝑁))
64 elfz4 12893 . . . . . . . . . . 11 (((1 ∈ ℤ ∧ (𝑀 + 𝑁) ∈ ℤ ∧ 𝐽 ∈ ℤ) ∧ (1 ≤ 𝐽𝐽 ≤ (𝑀 + 𝑁))) → 𝐽 ∈ (1...(𝑀 + 𝑁)))
6542, 47, 49, 51, 63, 64syl32anc 1372 . . . . . . . . . 10 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ∈ (1...(𝑀 + 𝑁)))
662, 3, 4, 5, 6, 7, 8, 9, 10ballotlemsv 31755 . . . . . . . . . 10 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝑀 + 𝑁))) → ((𝑆𝐶)‘𝐽) = if(𝐽 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝐽), 𝐽))
6765, 66syldan 593 . . . . . . . . 9 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → ((𝑆𝐶)‘𝐽) = if(𝐽 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝐽), 𝐽))
68 simpr 487 . . . . . . . . . 10 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → 𝐽 ∈ (1...(𝐼𝐶)))
69 iftrue 4471 . . . . . . . . . 10 (𝐽 ≤ (𝐼𝐶) → if(𝐽 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝐽), 𝐽) = (((𝐼𝐶) + 1) − 𝐽))
7068, 58, 693syl 18 . . . . . . . . 9 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → if(𝐽 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝐽), 𝐽) = (((𝐼𝐶) + 1) − 𝐽))
7167, 70eqtrd 2854 . . . . . . . 8 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → ((𝑆𝐶)‘𝐽) = (((𝐼𝐶) + 1) − 𝐽))
7271oveq1d 7163 . . . . . . 7 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) = ((((𝐼𝐶) + 1) − 𝐽)...(𝐼𝐶)))
7372eleq2d 2896 . . . . . 6 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → (𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) ↔ 𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(𝐼𝐶))))
7473adantr 483 . . . . 5 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) ↔ 𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(𝐼𝐶))))
7554ad2antrr 724 . . . . . . . . 9 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝐼𝐶) ∈ ℤ)
7675zcnd 12080 . . . . . . . 8 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝐼𝐶) ∈ ℂ)
77 1cnd 10628 . . . . . . . 8 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → 1 ∈ ℂ)
7876, 77pncand 10990 . . . . . . 7 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (((𝐼𝐶) + 1) − 1) = (𝐼𝐶))
7978oveq2d 7164 . . . . . 6 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → ((((𝐼𝐶) + 1) − 𝐽)...(((𝐼𝐶) + 1) − 1)) = ((((𝐼𝐶) + 1) − 𝐽)...(𝐼𝐶)))
8079eleq2d 2896 . . . . 5 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(((𝐼𝐶) + 1) − 1)) ↔ 𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(𝐼𝐶))))
81 1zzd 12005 . . . . . 6 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → 1 ∈ ℤ)
8248ad2antlr 725 . . . . . 6 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → 𝐽 ∈ ℤ)
8375peano2zd 12082 . . . . . 6 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → ((𝐼𝐶) + 1) ∈ ℤ)
84 simpr 487 . . . . . 6 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → 𝑘 ∈ ℤ)
85 fzrev 12962 . . . . . 6 (((1 ∈ ℤ ∧ 𝐽 ∈ ℤ) ∧ (((𝐼𝐶) + 1) ∈ ℤ ∧ 𝑘 ∈ ℤ)) → (𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(((𝐼𝐶) + 1) − 1)) ↔ (((𝐼𝐶) + 1) − 𝑘) ∈ (1...𝐽)))
8681, 82, 83, 84, 85syl22anc 836 . . . . 5 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ ((((𝐼𝐶) + 1) − 𝐽)...(((𝐼𝐶) + 1) − 1)) ↔ (((𝐼𝐶) + 1) − 𝑘) ∈ (1...𝐽)))
8774, 80, 863bitr2d 309 . . . 4 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) ↔ (((𝐼𝐶) + 1) − 𝑘) ∈ (1...𝐽)))
88 risset 3265 . . . . 5 ((((𝐼𝐶) + 1) − 𝑘) ∈ (1...𝐽) ↔ ∃𝑗 ∈ (1...𝐽)𝑗 = (((𝐼𝐶) + 1) − 𝑘))
8988a1i 11 . . . 4 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → ((((𝐼𝐶) + 1) − 𝑘) ∈ (1...𝐽) ↔ ∃𝑗 ∈ (1...𝐽)𝑗 = (((𝐼𝐶) + 1) − 𝑘)))
90 eqcom 2826 . . . . . . 7 ((((𝐼𝐶) + 1) − 𝑘) = 𝑗𝑗 = (((𝐼𝐶) + 1) − 𝑘))
9154ad2antrr 724 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → (𝐼𝐶) ∈ ℤ)
9291adantlr 713 . . . . . . . . . 10 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → (𝐼𝐶) ∈ ℤ)
9392zcnd 12080 . . . . . . . . 9 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → (𝐼𝐶) ∈ ℂ)
94 1cnd 10628 . . . . . . . . 9 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → 1 ∈ ℂ)
9593, 94addcld 10652 . . . . . . . 8 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → ((𝐼𝐶) + 1) ∈ ℂ)
96 simplr 767 . . . . . . . . 9 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → 𝑘 ∈ ℤ)
9796zcnd 12080 . . . . . . . 8 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → 𝑘 ∈ ℂ)
98 elfzelz 12900 . . . . . . . . . 10 (𝑗 ∈ (1...𝐽) → 𝑗 ∈ ℤ)
9998adantl 484 . . . . . . . . 9 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ∈ ℤ)
10099zcnd 12080 . . . . . . . 8 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ∈ ℂ)
101 subsub23 10883 . . . . . . . 8 ((((𝐼𝐶) + 1) ∈ ℂ ∧ 𝑘 ∈ ℂ ∧ 𝑗 ∈ ℂ) → ((((𝐼𝐶) + 1) − 𝑘) = 𝑗 ↔ (((𝐼𝐶) + 1) − 𝑗) = 𝑘))
10295, 97, 100, 101syl3anc 1365 . . . . . . 7 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → ((((𝐼𝐶) + 1) − 𝑘) = 𝑗 ↔ (((𝐼𝐶) + 1) − 𝑗) = 𝑘))
10390, 102syl5bbr 287 . . . . . 6 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → (𝑗 = (((𝐼𝐶) + 1) − 𝑘) ↔ (((𝐼𝐶) + 1) − 𝑗) = 𝑘))
104 simpll 765 . . . . . . . . . 10 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝐶 ∈ (𝑂𝐸))
10538sselda 3965 . . . . . . . . . 10 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ∈ (1...(𝑀 + 𝑁)))
1062, 3, 4, 5, 6, 7, 8, 9, 10ballotlemsv 31755 . . . . . . . . . 10 ((𝐶 ∈ (𝑂𝐸) ∧ 𝑗 ∈ (1...(𝑀 + 𝑁))) → ((𝑆𝐶)‘𝑗) = if(𝑗 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝑗), 𝑗))
107104, 105, 106syl2anc 586 . . . . . . . . 9 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → ((𝑆𝐶)‘𝑗) = if(𝑗 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝑗), 𝑗))
10898adantl 484 . . . . . . . . . . . 12 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ∈ ℤ)
109108zred 12079 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ∈ ℝ)
11048ad2antlr 725 . . . . . . . . . . . 12 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝐽 ∈ ℤ)
111110zred 12079 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝐽 ∈ ℝ)
11291zred 12079 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → (𝐼𝐶) ∈ ℝ)
113 elfzle2 12903 . . . . . . . . . . . 12 (𝑗 ∈ (1...𝐽) → 𝑗𝐽)
114113adantl 484 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗𝐽)
11558ad2antlr 725 . . . . . . . . . . 11 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝐽 ≤ (𝐼𝐶))
116109, 111, 112, 114, 115letrd 10789 . . . . . . . . . 10 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → 𝑗 ≤ (𝐼𝐶))
117 iftrue 4471 . . . . . . . . . 10 (𝑗 ≤ (𝐼𝐶) → if(𝑗 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝑗), 𝑗) = (((𝐼𝐶) + 1) − 𝑗))
118116, 117syl 17 . . . . . . . . 9 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → if(𝑗 ≤ (𝐼𝐶), (((𝐼𝐶) + 1) − 𝑗), 𝑗) = (((𝐼𝐶) + 1) − 𝑗))
119107, 118eqtrd 2854 . . . . . . . 8 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → ((𝑆𝐶)‘𝑗) = (((𝐼𝐶) + 1) − 𝑗))
120119eqeq1d 2821 . . . . . . 7 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑗 ∈ (1...𝐽)) → (((𝑆𝐶)‘𝑗) = 𝑘 ↔ (((𝐼𝐶) + 1) − 𝑗) = 𝑘))
121120adantlr 713 . . . . . 6 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → (((𝑆𝐶)‘𝑗) = 𝑘 ↔ (((𝐼𝐶) + 1) − 𝑗) = 𝑘))
122103, 121bitr4d 284 . . . . 5 ((((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) ∧ 𝑗 ∈ (1...𝐽)) → (𝑗 = (((𝐼𝐶) + 1) − 𝑘) ↔ ((𝑆𝐶)‘𝑗) = 𝑘))
123122rexbidva 3294 . . . 4 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (∃𝑗 ∈ (1...𝐽)𝑗 = (((𝐼𝐶) + 1) − 𝑘) ↔ ∃𝑗 ∈ (1...𝐽)((𝑆𝐶)‘𝑗) = 𝑘))
12487, 89, 1233bitrd 307 . . 3 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶)) ↔ ∃𝑗 ∈ (1...𝐽)((𝑆𝐶)‘𝑗) = 𝑘))
12541, 124bitr4d 284 . 2 (((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) ∧ 𝑘 ∈ ℤ) → (𝑘 ∈ ((𝑆𝐶) “ (1...𝐽)) ↔ 𝑘 ∈ (((𝑆𝐶)‘𝐽)...(𝐼𝐶))))
12622, 24, 125eqrdav 2818 1 ((𝐶 ∈ (𝑂𝐸) ∧ 𝐽 ∈ (1...(𝐼𝐶))) → ((𝑆𝐶) “ (1...𝐽)) = (((𝑆𝐶)‘𝐽)...(𝐼𝐶)))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 208  wa 398   = wceq 1530  wcel 2107  wral 3136  wrex 3137  {crab 3140  cdif 3931  cin 3933  wss 3934  ifcif 4465  𝒫 cpw 4537   class class class wbr 5057  cmpt 5137  ccnv 5547  ran crn 5549  cima 5551   Fn wfn 6343  wf 6344  1-1-ontowf1o 6347  cfv 6348  (class class class)co 7148  infcinf 8897  cc 10527  cr 10528  0cc0 10529  1c1 10530   + caddc 10532   < clt 10667  cle 10668  cmin 10862   / cdiv 11289  cn 11630  cz 11973  cuz 12235  ...cfz 12884  chash 13682
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1789  ax-4 1803  ax-5 1904  ax-6 1963  ax-7 2008  ax-8 2109  ax-9 2117  ax-10 2138  ax-11 2153  ax-12 2169  ax-ext 2791  ax-rep 5181  ax-sep 5194  ax-nul 5201  ax-pow 5257  ax-pr 5320  ax-un 7453  ax-cnex 10585  ax-resscn 10586  ax-1cn 10587  ax-icn 10588  ax-addcl 10589  ax-addrcl 10590  ax-mulcl 10591  ax-mulrcl 10592  ax-mulcom 10593  ax-addass 10594  ax-mulass 10595  ax-distr 10596  ax-i2m1 10597  ax-1ne0 10598  ax-1rid 10599  ax-rnegex 10600  ax-rrecex 10601  ax-cnre 10602  ax-pre-lttri 10603  ax-pre-lttrn 10604  ax-pre-ltadd 10605  ax-pre-mulgt0 10606
This theorem depends on definitions:  df-bi 209  df-an 399  df-or 844  df-3or 1082  df-3an 1083  df-tru 1533  df-ex 1774  df-nf 1778  df-sb 2063  df-mo 2616  df-eu 2648  df-clab 2798  df-cleq 2812  df-clel 2891  df-nfc 2961  df-ne 3015  df-nel 3122  df-ral 3141  df-rex 3142  df-reu 3143  df-rmo 3144  df-rab 3145  df-v 3495  df-sbc 3771  df-csb 3882  df-dif 3937  df-un 3939  df-in 3941  df-ss 3950  df-pss 3952  df-nul 4290  df-if 4466  df-pw 4539  df-sn 4560  df-pr 4562  df-tp 4564  df-op 4566  df-uni 4831  df-int 4868  df-iun 4912  df-br 5058  df-opab 5120  df-mpt 5138  df-tr 5164  df-id 5453  df-eprel 5458  df-po 5467  df-so 5468  df-fr 5507  df-we 5509  df-xp 5554  df-rel 5555  df-cnv 5556  df-co 5557  df-dm 5558  df-rn 5559  df-res 5560  df-ima 5561  df-pred 6141  df-ord 6187  df-on 6188  df-lim 6189  df-suc 6190  df-iota 6307  df-fun 6350  df-fn 6351  df-f 6352  df-f1 6353  df-fo 6354  df-f1o 6355  df-fv 6356  df-riota 7106  df-ov 7151  df-oprab 7152  df-mpo 7153  df-om 7573  df-1st 7681  df-2nd 7682  df-wrecs 7939  df-recs 8000  df-rdg 8038  df-1o 8094  df-oadd 8098  df-er 8281  df-en 8502  df-dom 8503  df-sdom 8504  df-fin 8505  df-sup 8898  df-inf 8899  df-dju 9322  df-card 9360  df-pnf 10669  df-mnf 10670  df-xr 10671  df-ltxr 10672  df-le 10673  df-sub 10864  df-neg 10865  df-nn 11631  df-2 11692  df-n0 11890  df-z 11974  df-uz 12236  df-rp 12382  df-fz 12885  df-hash 13683
This theorem is referenced by:  ballotlemfrc  31772
  Copyright terms: Public domain W3C validator