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 30980
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 6107 . 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 30978 . 2 𝑅 = 𝑅
13 rabid 3263 . . . . . 6 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ (𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐))
143, 4, 5, 6, 7, 8, 9, 10, 11, 1ballotlemrc 30975 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (𝑅𝑐) ∈ (𝑂𝐸))
1514adantr 472 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → (𝑅𝑐) ∈ (𝑂𝐸))
163, 4, 5, 6, 7, 8, 9, 10ballotlem1c 30952 . . . . . . . . . 10 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ¬ (𝐼𝑐) ∈ 𝑐)
1716ex 401 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (1 ∈ 𝑐 → ¬ (𝐼𝑐) ∈ 𝑐))
183, 4, 5, 6, 7, 8, 9, 10, 11, 1ballotlem1ri 30979 . . . . . . . . . 10 (𝑐 ∈ (𝑂𝐸) → (1 ∈ (𝑅𝑐) ↔ (𝐼𝑐) ∈ 𝑐))
1918notbid 309 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ (𝑅𝑐) ↔ ¬ (𝐼𝑐) ∈ 𝑐))
2017, 19sylibrd 250 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (1 ∈ 𝑐 → ¬ 1 ∈ (𝑅𝑐)))
2120imp 395 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ¬ 1 ∈ (𝑅𝑐))
2215, 21jca 507 . . . . . 6 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
2313, 22sylbi 208 . . . . 5 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
2423rgen 3069 . . . 4 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐))
25 eleq2 2833 . . . . . . . 8 (𝑏 = (𝑅𝑐) → (1 ∈ 𝑏 ↔ 1 ∈ (𝑅𝑐)))
2625notbid 309 . . . . . . 7 (𝑏 = (𝑅𝑐) → (¬ 1 ∈ 𝑏 ↔ ¬ 1 ∈ (𝑅𝑐)))
2726elrab 3519 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} ↔ ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
28 eleq2 2833 . . . . . . . . 9 (𝑏 = 𝑐 → (1 ∈ 𝑏 ↔ 1 ∈ 𝑐))
2928notbid 309 . . . . . . . 8 (𝑏 = 𝑐 → (¬ 1 ∈ 𝑏 ↔ ¬ 1 ∈ 𝑐))
3029cbvrabv 3348 . . . . . . 7 {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} = {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
3130eleq2i 2836 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3227, 31bitr3i 268 . . . . 5 (((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)) ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3332ralbii 3127 . . . 4 (∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)) ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3424, 33mpbi 221 . . 3 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
35 ssrab2 3847 . . . . 5 {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ (𝑂𝐸)
36 fvex 6388 . . . . . . 7 (𝑆𝑐) ∈ V
37 imaexg 7301 . . . . . . 7 ((𝑆𝑐) ∈ V → ((𝑆𝑐) “ 𝑐) ∈ V)
3836, 37ax-mp 5 . . . . . 6 ((𝑆𝑐) “ 𝑐) ∈ V
3938, 1dmmpti 6201 . . . . 5 dom 𝑅 = (𝑂𝐸)
4035, 39sseqtr4i 3798 . . . 4 {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ dom 𝑅
41 nfrab1 3270 . . . . 5 𝑐{𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
42 nfrab1 3270 . . . . 5 𝑐{𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
43 nfmpt1 4906 . . . . . 6 𝑐(𝑐 ∈ (𝑂𝐸) ↦ ((𝑆𝑐) “ 𝑐))
441, 43nfcxfr 2905 . . . . 5 𝑐𝑅
4541, 42, 44funimass4f 29822 . . . 4 ((Fun 𝑅 ∧ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ dom 𝑅) → ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}))
462, 40, 45mp2an 683 . . 3 ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
4734, 46mpbir 222 . 2 (𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
48 rabid 3263 . . . . . 6 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ (𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐))
4914adantr 472 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → (𝑅𝑐) ∈ (𝑂𝐸))
503, 4, 5, 6, 7, 8, 9, 10ballotlemic 30951 . . . . . . . . . 10 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → (𝐼𝑐) ∈ 𝑐)
5150ex 401 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ 𝑐 → (𝐼𝑐) ∈ 𝑐))
5251, 18sylibrd 250 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ 𝑐 → 1 ∈ (𝑅𝑐)))
5352imp 395 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → 1 ∈ (𝑅𝑐))
5449, 53jca 507 . . . . . 6 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5548, 54sylbi 208 . . . . 5 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5655rgen 3069 . . . 4 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐))
5725elrab 3519 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} ↔ ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5828cbvrabv 3348 . . . . . . 7 {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} = {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
5958eleq2i 2836 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6057, 59bitr3i 268 . . . . 5 (((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)) ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6160ralbii 3127 . . . 4 (∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)) ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6256, 61mpbi 221 . . 3 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
63 ssrab2 3847 . . . . 5 {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ (𝑂𝐸)
6463, 39sseqtr4i 3798 . . . 4 {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ dom 𝑅
6542, 41, 44funimass4f 29822 . . . 4 ((Fun 𝑅 ∧ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ dom 𝑅) → ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}))
662, 64, 65mp2an 683 . . 3 ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6762, 66mpbir 222 . 2 (𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
682, 12, 47, 67, 40, 64rinvf1o 29817 1 (𝑅 ↾ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}):{𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}–1-1-onto→{𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wb 197  wa 384   = wceq 1652  wcel 2155  wral 3055  {crab 3059  Vcvv 3350  cdif 3729  cin 3731  wss 3732  ifcif 4243  𝒫 cpw 4315   class class class wbr 4809  cmpt 4888  dom cdm 5277  cres 5279  cima 5280  Fun wfun 6062  1-1-ontowf1o 6067  cfv 6068  (class class class)co 6842  infcinf 8554  cr 10188  0cc0 10189  1c1 10190   + caddc 10192   < clt 10328  cle 10329  cmin 10520   / cdiv 10938  cn 11274  cz 11624  ...cfz 12533  chash 13321
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1890  ax-4 1904  ax-5 2005  ax-6 2070  ax-7 2105  ax-8 2157  ax-9 2164  ax-10 2183  ax-11 2198  ax-12 2211  ax-13 2352  ax-ext 2743  ax-rep 4930  ax-sep 4941  ax-nul 4949  ax-pow 5001  ax-pr 5062  ax-un 7147  ax-cnex 10245  ax-resscn 10246  ax-1cn 10247  ax-icn 10248  ax-addcl 10249  ax-addrcl 10250  ax-mulcl 10251  ax-mulrcl 10252  ax-mulcom 10253  ax-addass 10254  ax-mulass 10255  ax-distr 10256  ax-i2m1 10257  ax-1ne0 10258  ax-1rid 10259  ax-rnegex 10260  ax-rrecex 10261  ax-cnre 10262  ax-pre-lttri 10263  ax-pre-lttrn 10264  ax-pre-ltadd 10265  ax-pre-mulgt0 10266
This theorem depends on definitions:  df-bi 198  df-an 385  df-or 874  df-3or 1108  df-3an 1109  df-tru 1656  df-ex 1875  df-nf 1879  df-sb 2063  df-mo 2565  df-eu 2582  df-clab 2752  df-cleq 2758  df-clel 2761  df-nfc 2896  df-ne 2938  df-nel 3041  df-ral 3060  df-rex 3061  df-reu 3062  df-rmo 3063  df-rab 3064  df-v 3352  df-sbc 3597  df-csb 3692  df-dif 3735  df-un 3737  df-in 3739  df-ss 3746  df-pss 3748  df-nul 4080  df-if 4244  df-pw 4317  df-sn 4335  df-pr 4337  df-tp 4339  df-op 4341  df-uni 4595  df-int 4634  df-iun 4678  df-br 4810  df-opab 4872  df-mpt 4889  df-tr 4912  df-id 5185  df-eprel 5190  df-po 5198  df-so 5199  df-fr 5236  df-we 5238  df-xp 5283  df-rel 5284  df-cnv 5285  df-co 5286  df-dm 5287  df-rn 5288  df-res 5289  df-ima 5290  df-pred 5865  df-ord 5911  df-on 5912  df-lim 5913  df-suc 5914  df-iota 6031  df-fun 6070  df-fn 6071  df-f 6072  df-f1 6073  df-fo 6074  df-f1o 6075  df-fv 6076  df-riota 6803  df-ov 6845  df-oprab 6846  df-mpt2 6847  df-om 7264  df-1st 7366  df-2nd 7367  df-wrecs 7610  df-recs 7672  df-rdg 7710  df-1o 7764  df-oadd 7768  df-er 7947  df-en 8161  df-dom 8162  df-sdom 8163  df-fin 8164  df-sup 8555  df-inf 8556  df-card 9016  df-cda 9243  df-pnf 10330  df-mnf 10331  df-xr 10332  df-ltxr 10333  df-le 10334  df-sub 10522  df-neg 10523  df-nn 11275  df-2 11335  df-n0 11539  df-z 11625  df-uz 11887  df-rp 12029  df-fz 12534  df-hash 13322
This theorem is referenced by:  ballotlem8  30981
  Copyright terms: Public domain W3C validator