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 30402
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 5890 . 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 30400 . 2 𝑅 = 𝑅
13 rabid 3109 . . . . . 6 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ (𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐))
143, 4, 5, 6, 7, 8, 9, 10, 11, 1ballotlemrc 30397 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (𝑅𝑐) ∈ (𝑂𝐸))
1514adantr 481 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → (𝑅𝑐) ∈ (𝑂𝐸))
163, 4, 5, 6, 7, 8, 9, 10ballotlem1c 30374 . . . . . . . . . 10 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ¬ (𝐼𝑐) ∈ 𝑐)
1716ex 450 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (1 ∈ 𝑐 → ¬ (𝐼𝑐) ∈ 𝑐))
183, 4, 5, 6, 7, 8, 9, 10, 11, 1ballotlem1ri 30401 . . . . . . . . . 10 (𝑐 ∈ (𝑂𝐸) → (1 ∈ (𝑅𝑐) ↔ (𝐼𝑐) ∈ 𝑐))
1918notbid 308 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ (𝑅𝑐) ↔ ¬ (𝐼𝑐) ∈ 𝑐))
2017, 19sylibrd 249 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (1 ∈ 𝑐 → ¬ 1 ∈ (𝑅𝑐)))
2120imp 445 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ¬ 1 ∈ (𝑅𝑐))
2215, 21jca 554 . . . . . 6 ((𝑐 ∈ (𝑂𝐸) ∧ 1 ∈ 𝑐) → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
2313, 22sylbi 207 . . . . 5 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
2423rgen 2917 . . . 4 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐))
25 eleq2 2687 . . . . . . . 8 (𝑏 = (𝑅𝑐) → (1 ∈ 𝑏 ↔ 1 ∈ (𝑅𝑐)))
2625notbid 308 . . . . . . 7 (𝑏 = (𝑅𝑐) → (¬ 1 ∈ 𝑏 ↔ ¬ 1 ∈ (𝑅𝑐)))
2726elrab 3350 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} ↔ ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)))
28 eleq2 2687 . . . . . . . . 9 (𝑏 = 𝑐 → (1 ∈ 𝑏 ↔ 1 ∈ 𝑐))
2928notbid 308 . . . . . . . 8 (𝑏 = 𝑐 → (¬ 1 ∈ 𝑏 ↔ ¬ 1 ∈ 𝑐))
3029cbvrabv 3188 . . . . . . 7 {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} = {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
3130eleq2i 2690 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑏} ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3227, 31bitr3i 266 . . . . 5 (((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)) ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3332ralbii 2975 . . . 4 (∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ ¬ 1 ∈ (𝑅𝑐)) ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
3424, 33mpbi 220 . . 3 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
35 ssrab2 3671 . . . . 5 {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ (𝑂𝐸)
36 fvex 6163 . . . . . . 7 (𝑆𝑐) ∈ V
37 imaexg 7057 . . . . . . 7 ((𝑆𝑐) ∈ V → ((𝑆𝑐) “ 𝑐) ∈ V)
3836, 37ax-mp 5 . . . . . 6 ((𝑆𝑐) “ 𝑐) ∈ V
3938, 1dmmpti 5985 . . . . 5 dom 𝑅 = (𝑂𝐸)
4035, 39sseqtr4i 3622 . . . 4 {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ dom 𝑅
41 nfrab1 3114 . . . . 5 𝑐{𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
42 nfrab1 3114 . . . . 5 𝑐{𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
43 nfmpt1 4712 . . . . . 6 𝑐(𝑐 ∈ (𝑂𝐸) ↦ ((𝑆𝑐) “ 𝑐))
441, 43nfcxfr 2759 . . . . 5 𝑐𝑅
4541, 42, 44funimass4f 29303 . . . 4 ((Fun 𝑅 ∧ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ⊆ dom 𝑅) → ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}))
462, 40, 45mp2an 707 . . 3 ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐})
4734, 46mpbir 221 . 2 (𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
48 rabid 3109 . . . . . 6 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ↔ (𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐))
4914adantr 481 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → (𝑅𝑐) ∈ (𝑂𝐸))
503, 4, 5, 6, 7, 8, 9, 10ballotlemic 30373 . . . . . . . . . 10 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → (𝐼𝑐) ∈ 𝑐)
5150ex 450 . . . . . . . . 9 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ 𝑐 → (𝐼𝑐) ∈ 𝑐))
5251, 18sylibrd 249 . . . . . . . 8 (𝑐 ∈ (𝑂𝐸) → (¬ 1 ∈ 𝑐 → 1 ∈ (𝑅𝑐)))
5352imp 445 . . . . . . 7 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → 1 ∈ (𝑅𝑐))
5449, 53jca 554 . . . . . 6 ((𝑐 ∈ (𝑂𝐸) ∧ ¬ 1 ∈ 𝑐) → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5548, 54sylbi 207 . . . . 5 (𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} → ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5655rgen 2917 . . . 4 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐))
5725elrab 3350 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} ↔ ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)))
5828cbvrabv 3188 . . . . . . 7 {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} = {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
5958eleq2i 2690 . . . . . 6 ((𝑅𝑐) ∈ {𝑏 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑏} ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6057, 59bitr3i 266 . . . . 5 (((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)) ↔ (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6160ralbii 2975 . . . 4 (∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ((𝑅𝑐) ∈ (𝑂𝐸) ∧ 1 ∈ (𝑅𝑐)) ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6256, 61mpbi 220 . . 3 𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
63 ssrab2 3671 . . . . 5 {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ (𝑂𝐸)
6463, 39sseqtr4i 3622 . . . 4 {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ dom 𝑅
6542, 41, 44funimass4f 29303 . . . 4 ((Fun 𝑅 ∧ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} ⊆ dom 𝑅) → ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}))
662, 64, 65mp2an 707 . . 3 ((𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐} ↔ ∀𝑐 ∈ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐} (𝑅𝑐) ∈ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐})
6762, 66mpbir 221 . 2 (𝑅 “ {𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}) ⊆ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}
682, 12, 47, 67, 40, 64rinvf1o 29299 1 (𝑅 ↾ {𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}):{𝑐 ∈ (𝑂𝐸) ∣ 1 ∈ 𝑐}–1-1-onto→{𝑐 ∈ (𝑂𝐸) ∣ ¬ 1 ∈ 𝑐}
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wb 196  wa 384   = wceq 1480  wcel 1987  wral 2907  {crab 2911  Vcvv 3189  cdif 3556  cin 3558  wss 3559  ifcif 4063  𝒫 cpw 4135   class class class wbr 4618  cmpt 4678  dom cdm 5079  cres 5081  cima 5082  Fun wfun 5846  1-1-ontowf1o 5851  cfv 5852  (class class class)co 6610  infcinf 8299  cr 9887  0cc0 9888  1c1 9889   + caddc 9891   < clt 10026  cle 10027  cmin 10218   / cdiv 10636  cn 10972  cz 11329  ...cfz 12276  #chash 13065
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4736  ax-sep 4746  ax-nul 4754  ax-pow 4808  ax-pr 4872  ax-un 6909  ax-cnex 9944  ax-resscn 9945  ax-1cn 9946  ax-icn 9947  ax-addcl 9948  ax-addrcl 9949  ax-mulcl 9950  ax-mulrcl 9951  ax-mulcom 9952  ax-addass 9953  ax-mulass 9954  ax-distr 9955  ax-i2m1 9956  ax-1ne0 9957  ax-1rid 9958  ax-rnegex 9959  ax-rrecex 9960  ax-cnre 9961  ax-pre-lttri 9962  ax-pre-lttrn 9963  ax-pre-ltadd 9964  ax-pre-mulgt0 9965
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-nel 2894  df-ral 2912  df-rex 2913  df-reu 2914  df-rmo 2915  df-rab 2916  df-v 3191  df-sbc 3422  df-csb 3519  df-dif 3562  df-un 3564  df-in 3566  df-ss 3573  df-pss 3575  df-nul 3897  df-if 4064  df-pw 4137  df-sn 4154  df-pr 4156  df-tp 4158  df-op 4160  df-uni 4408  df-int 4446  df-iun 4492  df-br 4619  df-opab 4679  df-mpt 4680  df-tr 4718  df-eprel 4990  df-id 4994  df-po 5000  df-so 5001  df-fr 5038  df-we 5040  df-xp 5085  df-rel 5086  df-cnv 5087  df-co 5088  df-dm 5089  df-rn 5090  df-res 5091  df-ima 5092  df-pred 5644  df-ord 5690  df-on 5691  df-lim 5692  df-suc 5693  df-iota 5815  df-fun 5854  df-fn 5855  df-f 5856  df-f1 5857  df-fo 5858  df-f1o 5859  df-fv 5860  df-riota 6571  df-ov 6613  df-oprab 6614  df-mpt2 6615  df-om 7020  df-1st 7120  df-2nd 7121  df-wrecs 7359  df-recs 7420  df-rdg 7458  df-1o 7512  df-oadd 7516  df-er 7694  df-en 7908  df-dom 7909  df-sdom 7910  df-fin 7911  df-sup 8300  df-inf 8301  df-card 8717  df-cda 8942  df-pnf 10028  df-mnf 10029  df-xr 10030  df-ltxr 10031  df-le 10032  df-sub 10220  df-neg 10221  df-nn 10973  df-2 11031  df-n0 11245  df-z 11330  df-uz 11640  df-rp 11785  df-fz 12277  df-hash 13066
This theorem is referenced by:  ballotlem8  30403
  Copyright terms: Public domain W3C validator