Proof of Theorem ballotlemgun
Step | Hyp | Ref
| Expression |
1 | | indir 4209 |
. . . . . 6
⊢ ((𝑉 ∪ 𝑊) ∩ 𝑈) = ((𝑉 ∩ 𝑈) ∪ (𝑊 ∩ 𝑈)) |
2 | 1 | fveq2i 6777 |
. . . . 5
⊢
(♯‘((𝑉
∪ 𝑊) ∩ 𝑈)) = (♯‘((𝑉 ∩ 𝑈) ∪ (𝑊 ∩ 𝑈))) |
3 | | ballotlemgun.2 |
. . . . . . 7
⊢ (𝜑 → 𝑉 ∈ Fin) |
4 | | infi 9043 |
. . . . . . 7
⊢ (𝑉 ∈ Fin → (𝑉 ∩ 𝑈) ∈ Fin) |
5 | 3, 4 | syl 17 |
. . . . . 6
⊢ (𝜑 → (𝑉 ∩ 𝑈) ∈ Fin) |
6 | | ballotlemgun.3 |
. . . . . . 7
⊢ (𝜑 → 𝑊 ∈ Fin) |
7 | | infi 9043 |
. . . . . . 7
⊢ (𝑊 ∈ Fin → (𝑊 ∩ 𝑈) ∈ Fin) |
8 | 6, 7 | syl 17 |
. . . . . 6
⊢ (𝜑 → (𝑊 ∩ 𝑈) ∈ Fin) |
9 | | ballotlemgun.4 |
. . . . . . . 8
⊢ (𝜑 → (𝑉 ∩ 𝑊) = ∅) |
10 | 9 | ineq1d 4145 |
. . . . . . 7
⊢ (𝜑 → ((𝑉 ∩ 𝑊) ∩ 𝑈) = (∅ ∩ 𝑈)) |
11 | | inindir 4161 |
. . . . . . 7
⊢ ((𝑉 ∩ 𝑊) ∩ 𝑈) = ((𝑉 ∩ 𝑈) ∩ (𝑊 ∩ 𝑈)) |
12 | | 0in 4327 |
. . . . . . 7
⊢ (∅
∩ 𝑈) =
∅ |
13 | 10, 11, 12 | 3eqtr3g 2801 |
. . . . . 6
⊢ (𝜑 → ((𝑉 ∩ 𝑈) ∩ (𝑊 ∩ 𝑈)) = ∅) |
14 | | hashun 14097 |
. . . . . 6
⊢ (((𝑉 ∩ 𝑈) ∈ Fin ∧ (𝑊 ∩ 𝑈) ∈ Fin ∧ ((𝑉 ∩ 𝑈) ∩ (𝑊 ∩ 𝑈)) = ∅) → (♯‘((𝑉 ∩ 𝑈) ∪ (𝑊 ∩ 𝑈))) = ((♯‘(𝑉 ∩ 𝑈)) + (♯‘(𝑊 ∩ 𝑈)))) |
15 | 5, 8, 13, 14 | syl3anc 1370 |
. . . . 5
⊢ (𝜑 → (♯‘((𝑉 ∩ 𝑈) ∪ (𝑊 ∩ 𝑈))) = ((♯‘(𝑉 ∩ 𝑈)) + (♯‘(𝑊 ∩ 𝑈)))) |
16 | 2, 15 | eqtrid 2790 |
. . . 4
⊢ (𝜑 → (♯‘((𝑉 ∪ 𝑊) ∩ 𝑈)) = ((♯‘(𝑉 ∩ 𝑈)) + (♯‘(𝑊 ∩ 𝑈)))) |
17 | | difundir 4214 |
. . . . . 6
⊢ ((𝑉 ∪ 𝑊) ∖ 𝑈) = ((𝑉 ∖ 𝑈) ∪ (𝑊 ∖ 𝑈)) |
18 | 17 | fveq2i 6777 |
. . . . 5
⊢
(♯‘((𝑉
∪ 𝑊) ∖ 𝑈)) = (♯‘((𝑉 ∖ 𝑈) ∪ (𝑊 ∖ 𝑈))) |
19 | | diffi 8962 |
. . . . . . 7
⊢ (𝑉 ∈ Fin → (𝑉 ∖ 𝑈) ∈ Fin) |
20 | 3, 19 | syl 17 |
. . . . . 6
⊢ (𝜑 → (𝑉 ∖ 𝑈) ∈ Fin) |
21 | | diffi 8962 |
. . . . . . 7
⊢ (𝑊 ∈ Fin → (𝑊 ∖ 𝑈) ∈ Fin) |
22 | 6, 21 | syl 17 |
. . . . . 6
⊢ (𝜑 → (𝑊 ∖ 𝑈) ∈ Fin) |
23 | 9 | difeq1d 4056 |
. . . . . . 7
⊢ (𝜑 → ((𝑉 ∩ 𝑊) ∖ 𝑈) = (∅ ∖ 𝑈)) |
24 | | difindir 4216 |
. . . . . . 7
⊢ ((𝑉 ∩ 𝑊) ∖ 𝑈) = ((𝑉 ∖ 𝑈) ∩ (𝑊 ∖ 𝑈)) |
25 | | 0dif 4335 |
. . . . . . 7
⊢ (∅
∖ 𝑈) =
∅ |
26 | 23, 24, 25 | 3eqtr3g 2801 |
. . . . . 6
⊢ (𝜑 → ((𝑉 ∖ 𝑈) ∩ (𝑊 ∖ 𝑈)) = ∅) |
27 | | hashun 14097 |
. . . . . 6
⊢ (((𝑉 ∖ 𝑈) ∈ Fin ∧ (𝑊 ∖ 𝑈) ∈ Fin ∧ ((𝑉 ∖ 𝑈) ∩ (𝑊 ∖ 𝑈)) = ∅) → (♯‘((𝑉 ∖ 𝑈) ∪ (𝑊 ∖ 𝑈))) = ((♯‘(𝑉 ∖ 𝑈)) + (♯‘(𝑊 ∖ 𝑈)))) |
28 | 20, 22, 26, 27 | syl3anc 1370 |
. . . . 5
⊢ (𝜑 → (♯‘((𝑉 ∖ 𝑈) ∪ (𝑊 ∖ 𝑈))) = ((♯‘(𝑉 ∖ 𝑈)) + (♯‘(𝑊 ∖ 𝑈)))) |
29 | 18, 28 | eqtrid 2790 |
. . . 4
⊢ (𝜑 → (♯‘((𝑉 ∪ 𝑊) ∖ 𝑈)) = ((♯‘(𝑉 ∖ 𝑈)) + (♯‘(𝑊 ∖ 𝑈)))) |
30 | 16, 29 | oveq12d 7293 |
. . 3
⊢ (𝜑 → ((♯‘((𝑉 ∪ 𝑊) ∩ 𝑈)) − (♯‘((𝑉 ∪ 𝑊) ∖ 𝑈))) = (((♯‘(𝑉 ∩ 𝑈)) + (♯‘(𝑊 ∩ 𝑈))) − ((♯‘(𝑉 ∖ 𝑈)) + (♯‘(𝑊 ∖ 𝑈))))) |
31 | | hashcl 14071 |
. . . . . 6
⊢ ((𝑉 ∩ 𝑈) ∈ Fin → (♯‘(𝑉 ∩ 𝑈)) ∈
ℕ0) |
32 | 3, 4, 31 | 3syl 18 |
. . . . 5
⊢ (𝜑 → (♯‘(𝑉 ∩ 𝑈)) ∈
ℕ0) |
33 | 32 | nn0cnd 12295 |
. . . 4
⊢ (𝜑 → (♯‘(𝑉 ∩ 𝑈)) ∈ ℂ) |
34 | | hashcl 14071 |
. . . . . 6
⊢ ((𝑊 ∩ 𝑈) ∈ Fin → (♯‘(𝑊 ∩ 𝑈)) ∈
ℕ0) |
35 | 6, 7, 34 | 3syl 18 |
. . . . 5
⊢ (𝜑 → (♯‘(𝑊 ∩ 𝑈)) ∈
ℕ0) |
36 | 35 | nn0cnd 12295 |
. . . 4
⊢ (𝜑 → (♯‘(𝑊 ∩ 𝑈)) ∈ ℂ) |
37 | | hashcl 14071 |
. . . . . 6
⊢ ((𝑉 ∖ 𝑈) ∈ Fin → (♯‘(𝑉 ∖ 𝑈)) ∈
ℕ0) |
38 | 3, 19, 37 | 3syl 18 |
. . . . 5
⊢ (𝜑 → (♯‘(𝑉 ∖ 𝑈)) ∈
ℕ0) |
39 | 38 | nn0cnd 12295 |
. . . 4
⊢ (𝜑 → (♯‘(𝑉 ∖ 𝑈)) ∈ ℂ) |
40 | | hashcl 14071 |
. . . . . 6
⊢ ((𝑊 ∖ 𝑈) ∈ Fin → (♯‘(𝑊 ∖ 𝑈)) ∈
ℕ0) |
41 | 6, 21, 40 | 3syl 18 |
. . . . 5
⊢ (𝜑 → (♯‘(𝑊 ∖ 𝑈)) ∈
ℕ0) |
42 | 41 | nn0cnd 12295 |
. . . 4
⊢ (𝜑 → (♯‘(𝑊 ∖ 𝑈)) ∈ ℂ) |
43 | 33, 36, 39, 42 | addsub4d 11379 |
. . 3
⊢ (𝜑 → (((♯‘(𝑉 ∩ 𝑈)) + (♯‘(𝑊 ∩ 𝑈))) − ((♯‘(𝑉 ∖ 𝑈)) + (♯‘(𝑊 ∖ 𝑈)))) = (((♯‘(𝑉 ∩ 𝑈)) − (♯‘(𝑉 ∖ 𝑈))) + ((♯‘(𝑊 ∩ 𝑈)) − (♯‘(𝑊 ∖ 𝑈))))) |
44 | 30, 43 | eqtrd 2778 |
. 2
⊢ (𝜑 → ((♯‘((𝑉 ∪ 𝑊) ∩ 𝑈)) − (♯‘((𝑉 ∪ 𝑊) ∖ 𝑈))) = (((♯‘(𝑉 ∩ 𝑈)) − (♯‘(𝑉 ∖ 𝑈))) + ((♯‘(𝑊 ∩ 𝑈)) − (♯‘(𝑊 ∖ 𝑈))))) |
45 | | ballotlemgun.1 |
. . 3
⊢ (𝜑 → 𝑈 ∈ Fin) |
46 | | unfi 8955 |
. . . 4
⊢ ((𝑉 ∈ Fin ∧ 𝑊 ∈ Fin) → (𝑉 ∪ 𝑊) ∈ Fin) |
47 | 3, 6, 46 | syl2anc 584 |
. . 3
⊢ (𝜑 → (𝑉 ∪ 𝑊) ∈ Fin) |
48 | | ballotth.m |
. . . 4
⊢ 𝑀 ∈ ℕ |
49 | | ballotth.n |
. . . 4
⊢ 𝑁 ∈ ℕ |
50 | | ballotth.o |
. . . 4
⊢ 𝑂 = {𝑐 ∈ 𝒫 (1...(𝑀 + 𝑁)) ∣ (♯‘𝑐) = 𝑀} |
51 | | ballotth.p |
. . . 4
⊢ 𝑃 = (𝑥 ∈ 𝒫 𝑂 ↦ ((♯‘𝑥) / (♯‘𝑂))) |
52 | | ballotth.f |
. . . 4
⊢ 𝐹 = (𝑐 ∈ 𝑂 ↦ (𝑖 ∈ ℤ ↦
((♯‘((1...𝑖)
∩ 𝑐)) −
(♯‘((1...𝑖)
∖ 𝑐))))) |
53 | | ballotth.e |
. . . 4
⊢ 𝐸 = {𝑐 ∈ 𝑂 ∣ ∀𝑖 ∈ (1...(𝑀 + 𝑁))0 < ((𝐹‘𝑐)‘𝑖)} |
54 | | ballotth.mgtn |
. . . 4
⊢ 𝑁 < 𝑀 |
55 | | ballotth.i |
. . . 4
⊢ 𝐼 = (𝑐 ∈ (𝑂 ∖ 𝐸) ↦ inf({𝑘 ∈ (1...(𝑀 + 𝑁)) ∣ ((𝐹‘𝑐)‘𝑘) = 0}, ℝ, < )) |
56 | | ballotth.s |
. . . 4
⊢ 𝑆 = (𝑐 ∈ (𝑂 ∖ 𝐸) ↦ (𝑖 ∈ (1...(𝑀 + 𝑁)) ↦ if(𝑖 ≤ (𝐼‘𝑐), (((𝐼‘𝑐) + 1) − 𝑖), 𝑖))) |
57 | | ballotth.r |
. . . 4
⊢ 𝑅 = (𝑐 ∈ (𝑂 ∖ 𝐸) ↦ ((𝑆‘𝑐) “ 𝑐)) |
58 | | ballotlemg |
. . . 4
⊢ ↑ = (𝑢 ∈ Fin, 𝑣 ∈ Fin ↦ ((♯‘(𝑣 ∩ 𝑢)) − (♯‘(𝑣 ∖ 𝑢)))) |
59 | 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 | ballotlemgval 32490 |
. . 3
⊢ ((𝑈 ∈ Fin ∧ (𝑉 ∪ 𝑊) ∈ Fin) → (𝑈 ↑ (𝑉 ∪ 𝑊)) = ((♯‘((𝑉 ∪ 𝑊) ∩ 𝑈)) − (♯‘((𝑉 ∪ 𝑊) ∖ 𝑈)))) |
60 | 45, 47, 59 | syl2anc 584 |
. 2
⊢ (𝜑 → (𝑈 ↑ (𝑉 ∪ 𝑊)) = ((♯‘((𝑉 ∪ 𝑊) ∩ 𝑈)) − (♯‘((𝑉 ∪ 𝑊) ∖ 𝑈)))) |
61 | 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 | ballotlemgval 32490 |
. . . 4
⊢ ((𝑈 ∈ Fin ∧ 𝑉 ∈ Fin) → (𝑈 ↑ 𝑉) = ((♯‘(𝑉 ∩ 𝑈)) − (♯‘(𝑉 ∖ 𝑈)))) |
62 | 45, 3, 61 | syl2anc 584 |
. . 3
⊢ (𝜑 → (𝑈 ↑ 𝑉) = ((♯‘(𝑉 ∩ 𝑈)) − (♯‘(𝑉 ∖ 𝑈)))) |
63 | 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58 | ballotlemgval 32490 |
. . . 4
⊢ ((𝑈 ∈ Fin ∧ 𝑊 ∈ Fin) → (𝑈 ↑ 𝑊) = ((♯‘(𝑊 ∩ 𝑈)) − (♯‘(𝑊 ∖ 𝑈)))) |
64 | 45, 6, 63 | syl2anc 584 |
. . 3
⊢ (𝜑 → (𝑈 ↑ 𝑊) = ((♯‘(𝑊 ∩ 𝑈)) − (♯‘(𝑊 ∖ 𝑈)))) |
65 | 62, 64 | oveq12d 7293 |
. 2
⊢ (𝜑 → ((𝑈 ↑ 𝑉) + (𝑈 ↑ 𝑊)) = (((♯‘(𝑉 ∩ 𝑈)) − (♯‘(𝑉 ∖ 𝑈))) + ((♯‘(𝑊 ∩ 𝑈)) − (♯‘(𝑊 ∖ 𝑈))))) |
66 | 44, 60, 65 | 3eqtr4d 2788 |
1
⊢ (𝜑 → (𝑈 ↑ (𝑉 ∪ 𝑊)) = ((𝑈 ↑ 𝑉) + (𝑈 ↑ 𝑊))) |