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 30898
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 6080 . 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 30896 . 2 𝑅 = 𝑅
13 rabid 3246 . . . . . 6 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ (𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐))
143, 4, 5, 6, 7, 8, 9, 10, 11, 1ballotlemrc 30893 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (𝑅𝑐) ∈ (𝑂𝐸))
1514adantr 472 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → (𝑅𝑐) ∈ (𝑂𝐸))
163, 4, 5, 6, 7, 8, 9, 10ballotlem1c 30870 . . . . . . . . . 10 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ¬ (𝐼𝑐) ∈ 𝑐)
1716ex 449 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (1 ∈ 𝑐 → ¬ (𝐼𝑐) ∈ 𝑐))
183, 4, 5, 6, 7, 8, 9, 10, 11, 1ballotlem1ri 30897 . . . . . . . . . 10 (𝑐 ∈ (𝑂𝐸) → (1 ∈ (𝑅𝑐) ↔ (𝐼𝑐) ∈ 𝑐))
1918notbid 307 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ (𝑅𝑐) ↔ ¬ (𝐼𝑐) ∈ 𝑐))
2017, 19sylibrd 249 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (1 ∈ 𝑐 → ¬ 1 ∈ (𝑅𝑐)))
2120imp 444 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ¬ 1 ∈ (𝑅𝑐))
2215, 21jca 555 . . . . . 6 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
2313, 22sylbi 207 . . . . 5 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
2423rgen 3052 . . . 4 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐))
25 eleq2 2820 . . . . . . . 8 (𝑏 = (𝑅𝑐) → (1 ∈ 𝑏 ↔ 1 ∈ (𝑅𝑐)))
2625notbid 307 . . . . . . 7 (𝑏 = (𝑅𝑐) → (¬ 1 ∈ 𝑏 ↔ ¬ 1 ∈ (𝑅𝑐)))
2726elrab 3496 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} ↔ ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
28 eleq2 2820 . . . . . . . . 9 (𝑏 = 𝑐 → (1 ∈ 𝑏 ↔ 1 ∈ 𝑐))
2928notbid 307 . . . . . . . 8 (𝑏 = 𝑐 → (¬ 1 ∈ 𝑏 ↔ ¬ 1 ∈ 𝑐))
3029cbvrabv 3331 . . . . . . 7 {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} = {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
3130eleq2i 2823 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3227, 31bitr3i 266 . . . . 5 (((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)) ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3332ralbii 3110 . . . 4 (∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)) ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3424, 33mpbi 220 . . 3 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
35 ssrab2 3820 . . . . 5 {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ (𝑂𝐸)
36 fvex 6354 . . . . . . 7 (𝑆𝑐) ∈ V
37 imaexg 7260 . . . . . . 7 ((𝑆𝑐) ∈ V → ((𝑆𝑐) “ 𝑐) ∈ V)
3836, 37ax-mp 5 . . . . . 6 ((𝑆𝑐) “ 𝑐) ∈ V
3938, 1dmmpti 6176 . . . . 5 dom 𝑅 = (𝑂𝐸)
4035, 39sseqtr4i 3771 . . . 4 {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ dom 𝑅
41 nfrab1 3253 . . . . 5 𝑐{𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
42 nfrab1 3253 . . . . 5 𝑐{𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
43 nfmpt1 4891 . . . . . 6 𝑐(𝑐 ∈ (𝑂𝐸) ↦ ((𝑆𝑐) “ 𝑐))
441, 43nfcxfr 2892 . . . . 5 𝑐𝑅
4541, 42, 44funimass4f 29738 . . . 4 ((Fun 𝑅 ∧ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ dom 𝑅) → ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}))
462, 40, 45mp2an 710 . . 3 ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
4734, 46mpbir 221 . 2 (𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
48 rabid 3246 . . . . . 6 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ (𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐))
4914adantr 472 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → (𝑅𝑐) ∈ (𝑂𝐸))
503, 4, 5, 6, 7, 8, 9, 10ballotlemic 30869 . . . . . . . . . 10 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → (𝐼𝑐) ∈ 𝑐)
5150ex 449 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ 𝑐 → (𝐼𝑐) ∈ 𝑐))
5251, 18sylibrd 249 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ 𝑐 → 1 ∈ (𝑅𝑐)))
5352imp 444 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → 1 ∈ (𝑅𝑐))
5449, 53jca 555 . . . . . 6 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5548, 54sylbi 207 . . . . 5 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5655rgen 3052 . . . 4 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐))
5725elrab 3496 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} ↔ ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5828cbvrabv 3331 . . . . . . 7 {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} = {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
5958eleq2i 2823 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6057, 59bitr3i 266 . . . . 5 (((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)) ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6160ralbii 3110 . . . 4 (∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)) ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6256, 61mpbi 220 . . 3 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
63 ssrab2 3820 . . . . 5 {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ (𝑂𝐸)
6463, 39sseqtr4i 3771 . . . 4 {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ dom 𝑅
6542, 41, 44funimass4f 29738 . . . 4 ((Fun 𝑅 ∧ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ dom 𝑅) → ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}))
662, 64, 65mp2an 710 . . 3 ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6762, 66mpbir 221 . 2 (𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
682, 12, 47, 67, 40, 64rinvf1o 29733 1 (𝑅 ↾ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}):{𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}–1-1-onto→{𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wb 196  wa 383   = wceq 1624  wcel 2131  wral 3042  {crab 3046  Vcvv 3332  cdif 3704  cin 3706  wss 3707  ifcif 4222  𝒫 cpw 4294   class class class wbr 4796  cmpt 4873  dom cdm 5258  cres 5260  cima 5261  Fun wfun 6035  1-1-ontowf1o 6040  cfv 6041  (class class class)co 6805  infcinf 8504  cr 10119  0cc0 10120  1c1 10121   + caddc 10123   < clt 10258  cle 10259  cmin 10450   / cdiv 10868  cn 11204  cz 11561  ...cfz 12511  chash 13303
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1863  ax-4 1878  ax-5 1980  ax-6 2046  ax-7 2082  ax-8 2133  ax-9 2140  ax-10 2160  ax-11 2175  ax-12 2188  ax-13 2383  ax-ext 2732  ax-rep 4915  ax-sep 4925  ax-nul 4933  ax-pow 4984  ax-pr 5047  ax-un 7106  ax-cnex 10176  ax-resscn 10177  ax-1cn 10178  ax-icn 10179  ax-addcl 10180  ax-addrcl 10181  ax-mulcl 10182  ax-mulrcl 10183  ax-mulcom 10184  ax-addass 10185  ax-mulass 10186  ax-distr 10187  ax-i2m1 10188  ax-1ne0 10189  ax-1rid 10190  ax-rnegex 10191  ax-rrecex 10192  ax-cnre 10193  ax-pre-lttri 10194  ax-pre-lttrn 10195  ax-pre-ltadd 10196  ax-pre-mulgt0 10197
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1073  df-3an 1074  df-tru 1627  df-ex 1846  df-nf 1851  df-sb 2039  df-eu 2603  df-mo 2604  df-clab 2739  df-cleq 2745  df-clel 2748  df-nfc 2883  df-ne 2925  df-nel 3028  df-ral 3047  df-rex 3048  df-reu 3049  df-rmo 3050  df-rab 3051  df-v 3334  df-sbc 3569  df-csb 3667  df-dif 3710  df-un 3712  df-in 3714  df-ss 3721  df-pss 3723  df-nul 4051  df-if 4223  df-pw 4296  df-sn 4314  df-pr 4316  df-tp 4318  df-op 4320  df-uni 4581  df-int 4620  df-iun 4666  df-br 4797  df-opab 4857  df-mpt 4874  df-tr 4897  df-id 5166  df-eprel 5171  df-po 5179  df-so 5180  df-fr 5217  df-we 5219  df-xp 5264  df-rel 5265  df-cnv 5266  df-co 5267  df-dm 5268  df-rn 5269  df-res 5270  df-ima 5271  df-pred 5833  df-ord 5879  df-on 5880  df-lim 5881  df-suc 5882  df-iota 6004  df-fun 6043  df-fn 6044  df-f 6045  df-f1 6046  df-fo 6047  df-f1o 6048  df-fv 6049  df-riota 6766  df-ov 6808  df-oprab 6809  df-mpt2 6810  df-om 7223  df-1st 7325  df-2nd 7326  df-wrecs 7568  df-recs 7629  df-rdg 7667  df-1o 7721  df-oadd 7725  df-er 7903  df-en 8114  df-dom 8115  df-sdom 8116  df-fin 8117  df-sup 8505  df-inf 8506  df-card 8947  df-cda 9174  df-pnf 10260  df-mnf 10261  df-xr 10262  df-ltxr 10263  df-le 10264  df-sub 10452  df-neg 10453  df-nn 11205  df-2 11263  df-n0 11477  df-z 11562  df-uz 11872  df-rp 12018  df-fz 12512  df-hash 13304
This theorem is referenced by:  ballotlem8  30899
  Copyright terms: Public domain W3C validator