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

Theorem ballotlem7 31907
Description: 𝑅 is a bijection between two subsets of (𝑂𝐸): one where a vote for A is picked first, and one where a vote for B is picked first. (Contributed by Thierry Arnoux, 12-Dec-2016.)
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) − 𝑖), 𝑖)))
ballotth.r 𝑅 = (𝑐 ∈ (𝑂𝐸) ↦ ((𝑆𝑐) “ 𝑐))
Assertion
Ref Expression
ballotlem7 (𝑅 ↾ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}):{𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}–1-1-onto→{𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
Distinct variable groups:   𝑀,𝑐   𝑁,𝑐   𝑂,𝑐   𝑖,𝑀   𝑖,𝑁   𝑖,𝑂   𝑘,𝑀   𝑘,𝑁   𝑘,𝑂   𝑖,𝑐,𝐹,𝑘   𝑖,𝐸,𝑘   𝑘,𝐼,𝑐   𝐸,𝑐   𝑖,𝐼,𝑐   𝑆,𝑘,𝑖,𝑐   𝑅,𝑖,𝑘   𝑥,𝑐,𝐹   𝑥,𝑀   𝑥,𝑁,𝑘,𝑖
Allowed substitution hints:   𝑃(𝑥,𝑖,𝑘,𝑐)   𝑅(𝑥,𝑐)   𝑆(𝑥)   𝐸(𝑥)   𝐼(𝑥)   𝑂(𝑥)

Proof of Theorem ballotlem7
Dummy variable 𝑏 is distinct from all other variables.
StepHypRef Expression
1 ballotth.r . . 3 𝑅 = (𝑐 ∈ (𝑂𝐸) ↦ ((𝑆𝑐) “ 𝑐))
21funmpt2 6367 . 2 Fun 𝑅
3 ballotth.m . . 3 𝑀 ∈ ℕ
4 ballotth.n . . 3 𝑁 ∈ ℕ
5 ballotth.o . . 3 𝑂 = {𝑐 ∈ 𝒫 (1...(𝑀 + 𝑁)) ∣ (♯‘𝑐) = 𝑀}
6 ballotth.p . . 3 𝑃 = (𝑥 ∈ 𝒫 𝑂 ↦ ((♯‘𝑥) / (♯‘𝑂)))
7 ballotth.f . . 3 𝐹 = (𝑐𝑂 ↦ (𝑖 ∈ ℤ ↦ ((♯‘((1...𝑖) ∩ 𝑐)) − (♯‘((1...𝑖) ∖ 𝑐)))))
8 ballotth.e . . 3 𝐸 = {𝑐𝑂 ∣ ∀𝑖 ∈ (1...(𝑀 + 𝑁))0 < ((𝐹𝑐)‘𝑖)}
9 ballotth.mgtn . . 3 𝑁 < 𝑀
10 ballotth.i . . 3 𝐼 = (𝑐 ∈ (𝑂𝐸) ↦ inf({𝑘 ∈ (1...(𝑀 + 𝑁)) ∣ ((𝐹𝑐)‘𝑘) = 0}, ℝ, < ))
11 ballotth.s . . 3 𝑆 = (𝑐 ∈ (𝑂𝐸) ↦ (𝑖 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑖 ≤ (𝐼𝑐), (((𝐼𝑐) + 1) − 𝑖), 𝑖)))
123, 4, 5, 6, 7, 8, 9, 10, 11, 1ballotlemrinv 31905 . 2 𝑅 = 𝑅
13 rabid 3334 . . . . . 6 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ (𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐))
143, 4, 5, 6, 7, 8, 9, 10, 11, 1ballotlemrc 31902 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (𝑅𝑐) ∈ (𝑂𝐸))
1514adantr 484 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → (𝑅𝑐) ∈ (𝑂𝐸))
163, 4, 5, 6, 7, 8, 9, 10ballotlem1c 31879 . . . . . . . . . 10 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ¬ (𝐼𝑐) ∈ 𝑐)
1716ex 416 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (1 ∈ 𝑐 → ¬ (𝐼𝑐) ∈ 𝑐))
183, 4, 5, 6, 7, 8, 9, 10, 11, 1ballotlem1ri 31906 . . . . . . . . . 10 (𝑐 ∈ (𝑂𝐸) → (1 ∈ (𝑅𝑐) ↔ (𝐼𝑐) ∈ 𝑐))
1918notbid 321 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ (𝑅𝑐) ↔ ¬ (𝐼𝑐) ∈ 𝑐))
2017, 19sylibrd 262 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (1 ∈ 𝑐 → ¬ 1 ∈ (𝑅𝑐)))
2120imp 410 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ¬ 1 ∈ (𝑅𝑐))
2215, 21jca 515 . . . . . 6 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
2313, 22sylbi 220 . . . . 5 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
2423rgen 3119 . . . 4 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐))
25 eleq2 2881 . . . . . . . 8 (𝑏 = (𝑅𝑐) → (1 ∈ 𝑏 ↔ 1 ∈ (𝑅𝑐)))
2625notbid 321 . . . . . . 7 (𝑏 = (𝑅𝑐) → (¬ 1 ∈ 𝑏 ↔ ¬ 1 ∈ (𝑅𝑐)))
2726elrab 3631 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} ↔ ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
28 eleq2 2881 . . . . . . . . 9 (𝑏 = 𝑐 → (1 ∈ 𝑏 ↔ 1 ∈ 𝑐))
2928notbid 321 . . . . . . . 8 (𝑏 = 𝑐 → (¬ 1 ∈ 𝑏 ↔ ¬ 1 ∈ 𝑐))
3029cbvrabv 3442 . . . . . . 7 {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} = {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
3130eleq2i 2884 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3227, 31bitr3i 280 . . . . 5 (((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)) ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3332ralbii 3136 . . . 4 (∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)) ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3424, 33mpbi 233 . . 3 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
35 ssrab2 4010 . . . . 5 {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ (𝑂𝐸)
36 fvex 6662 . . . . . . 7 (𝑆𝑐) ∈ V
37 imaexg 7606 . . . . . . 7 ((𝑆𝑐) ∈ V → ((𝑆𝑐) “ 𝑐) ∈ V)
3836, 37ax-mp 5 . . . . . 6 ((𝑆𝑐) “ 𝑐) ∈ V
3938, 1dmmpti 6468 . . . . 5 dom 𝑅 = (𝑂𝐸)
4035, 39sseqtrri 3955 . . . 4 {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ dom 𝑅
41 nfrab1 3340 . . . . 5 𝑐{𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
42 nfrab1 3340 . . . . 5 𝑐{𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
43 nfmpt1 5131 . . . . . 6 𝑐(𝑐 ∈ (𝑂𝐸) ↦ ((𝑆𝑐) “ 𝑐))
441, 43nfcxfr 2956 . . . . 5 𝑐𝑅
4541, 42, 44funimass4f 30400 . . . 4 ((Fun 𝑅 ∧ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ dom 𝑅) → ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}))
462, 40, 45mp2an 691 . . 3 ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
4734, 46mpbir 234 . 2 (𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
48 rabid 3334 . . . . . 6 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ (𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐))
4914adantr 484 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → (𝑅𝑐) ∈ (𝑂𝐸))
503, 4, 5, 6, 7, 8, 9, 10ballotlemic 31878 . . . . . . . . . 10 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → (𝐼𝑐) ∈ 𝑐)
5150ex 416 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ 𝑐 → (𝐼𝑐) ∈ 𝑐))
5251, 18sylibrd 262 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ 𝑐 → 1 ∈ (𝑅𝑐)))
5352imp 410 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → 1 ∈ (𝑅𝑐))
5449, 53jca 515 . . . . . 6 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5548, 54sylbi 220 . . . . 5 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5655rgen 3119 . . . 4 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐))
5725elrab 3631 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} ↔ ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5828cbvrabv 3442 . . . . . . 7 {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} = {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
5958eleq2i 2884 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6057, 59bitr3i 280 . . . . 5 (((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)) ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6160ralbii 3136 . . . 4 (∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)) ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6256, 61mpbi 233 . . 3 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
63 ssrab2 4010 . . . . 5 {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ (𝑂𝐸)
6463, 39sseqtrri 3955 . . . 4 {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ dom 𝑅
6542, 41, 44funimass4f 30400 . . . 4 ((Fun 𝑅 ∧ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ dom 𝑅) → ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}))
662, 64, 65mp2an 691 . . 3 ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6762, 66mpbir 234 . 2 (𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
682, 12, 47, 67, 40, 64rinvf1o 30393 1 (𝑅 ↾ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}):{𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}–1-1-onto→{𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wb 209  wa 399   = wceq 1538  wcel 2112  wral 3109  {crab 3113  Vcvv 3444  cdif 3881  cin 3883  wss 3884  ifcif 4428  𝒫 cpw 4500   class class class wbr 5033  cmpt 5113  dom cdm 5523  cres 5525  cima 5526  Fun wfun 6322  1-1-ontowf1o 6327  cfv 6328  (class class class)co 7139  infcinf 8893  cr 10529  0cc0 10530  1c1 10531   + caddc 10533   < clt 10668  cle 10669  cmin 10863   / cdiv 11290  cn 11629  cz 11973  ...cfz 12889  chash 13690
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2114  ax-9 2122  ax-10 2143  ax-11 2159  ax-12 2176  ax-ext 2773  ax-rep 5157  ax-sep 5170  ax-nul 5177  ax-pow 5234  ax-pr 5298  ax-un 7445  ax-cnex 10586  ax-resscn 10587  ax-1cn 10588  ax-icn 10589  ax-addcl 10590  ax-addrcl 10591  ax-mulcl 10592  ax-mulrcl 10593  ax-mulcom 10594  ax-addass 10595  ax-mulass 10596  ax-distr 10597  ax-i2m1 10598  ax-1ne0 10599  ax-1rid 10600  ax-rnegex 10601  ax-rrecex 10602  ax-cnre 10603  ax-pre-lttri 10604  ax-pre-lttrn 10605  ax-pre-ltadd 10606  ax-pre-mulgt0 10607
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2601  df-eu 2632  df-clab 2780  df-cleq 2794  df-clel 2873  df-nfc 2941  df-ne 2991  df-nel 3095  df-ral 3114  df-rex 3115  df-reu 3116  df-rmo 3117  df-rab 3118  df-v 3446  df-sbc 3724  df-csb 3832  df-dif 3887  df-un 3889  df-in 3891  df-ss 3901  df-pss 3903  df-nul 4247  df-if 4429  df-pw 4502  df-sn 4529  df-pr 4531  df-tp 4533  df-op 4535  df-uni 4804  df-int 4842  df-iun 4886  df-br 5034  df-opab 5096  df-mpt 5114  df-tr 5140  df-id 5428  df-eprel 5433  df-po 5442  df-so 5443  df-fr 5482  df-we 5484  df-xp 5529  df-rel 5530  df-cnv 5531  df-co 5532  df-dm 5533  df-rn 5534  df-res 5535  df-ima 5536  df-pred 6120  df-ord 6166  df-on 6167  df-lim 6168  df-suc 6169  df-iota 6287  df-fun 6330  df-fn 6331  df-f 6332  df-f1 6333  df-fo 6334  df-f1o 6335  df-fv 6336  df-riota 7097  df-ov 7142  df-oprab 7143  df-mpo 7144  df-om 7565  df-1st 7675  df-2nd 7676  df-wrecs 7934  df-recs 7995  df-rdg 8033  df-1o 8089  df-oadd 8093  df-er 8276  df-en 8497  df-dom 8498  df-sdom 8499  df-fin 8500  df-sup 8894  df-inf 8895  df-dju 9318  df-card 9356  df-pnf 10670  df-mnf 10671  df-xr 10672  df-ltxr 10673  df-le 10674  df-sub 10865  df-neg 10866  df-nn 11630  df-2 11692  df-n0 11890  df-z 11974  df-uz 12236  df-rp 12382  df-fz 12890  df-hash 13691
This theorem is referenced by:  ballotlem8  31908
  Copyright terms: Public domain W3C validator