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

Theorem ballotlemfp1 35117
Description: If the 𝐽 th ballot is for A, (𝐹‘𝐶) goes up 1. If the 𝐽 th ballot is for B, (𝐹‘𝐶) goes down 1. (Contributed by Thierry Arnoux, 24-Nov-2016.)
Hypotheses
Ref Expression
ballotth.m 𝑀 ∈ ℕ
ballotth.n 𝑁 ∈ ℕ
ballotth.o 𝑂 = {𝑐 ∈ 𝒫 (1...(𝑀 + 𝑁)) ∣ (♯‘𝑐) = 𝑀}
ballotth.p 𝑃 = (𝑥 ∈ 𝒫 𝑂 ↦ ((♯‘𝑥) / (♯‘𝑂)))
ballotth.f 𝐹 = (𝑐 ∈ 𝑂 ↦ (𝑖 ∈ ℤ ↦ ((♯‘((1...𝑖) ∩ 𝑐)) − (♯‘((1...𝑖) ∖ 𝑐)))))
ballotlemfp1.c (𝜑 → 𝐶 ∈ 𝑂)
ballotlemfp1.j (𝜑 → 𝐽 ∈ ℕ)
Assertion
Ref Expression
ballotlemfp1 (𝜑 → ((¬ 𝐽 ∈ 𝐶 → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1)) ∧ (𝐽 ∈ 𝐶 → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) + 1))))
Distinct variable groups:   𝑀,𝑐   𝑁,𝑐   𝑂,𝑐   𝑖,𝑀   𝑖,𝑁   𝑖,𝑂,𝑐   𝐹,𝑐,𝑖   𝐶,𝑖   𝑖,𝐽   𝜑,𝑖
Allowed substitution hints:   𝜑(𝑥, 𝑐)   𝐶(𝑥, 𝑐)   𝑃(𝑥, 𝑖, 𝑐)   𝐹(𝑥)   𝐽(𝑥, 𝑐)   𝑀(𝑥)   𝑁(𝑥)   𝑂(𝑥)

Proof of Theorem ballotlemfp1
StepHypRef Expression
1 ballotth.m . . . . . 6 𝑀 ∈ ℕ
2 ballotth.n . . . . . 6 𝑁 ∈ ℕ
3 ballotth.o . . . . . 6 𝑂 = {𝑐 ∈ 𝒫 (1...(𝑀 + 𝑁)) ∣ (♯‘𝑐) = 𝑀}
4 ballotth.p . . . . . 6 𝑃 = (𝑥 ∈ 𝒫 𝑂 ↦ ((♯‘𝑥) / (♯‘𝑂)))
5 ballotth.f . . . . . 6 𝐹 = (𝑐 ∈ 𝑂 ↦ (𝑖 ∈ ℤ ↦ ((♯‘((1...𝑖) ∩ 𝑐)) − (♯‘((1...𝑖) ∖ 𝑐)))))
6 ballotlemfp1.c . . . . . 6 (𝜑 → 𝐶 ∈ 𝑂)
7 ballotlemfp1.j . . . . . . 7 (𝜑 → 𝐽 ∈ ℕ)
87nnzd 12712 . . . . . 6 (𝜑 → 𝐽 ∈ ℤ)
91, 2, 3, 4, 5, 6, 8ballotlemfval 35115 . . . . 5 (𝜑 → ((𝐹‘𝐶)‘𝐽) = ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))))
109adantr 486 . . . 4 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘𝐽) = ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))))
11 fzfi 14108 . . . . . . . . . 10 (1...(𝐽 − 1)) ∈ Fin
12 inss1 4182 . . . . . . . . . 10 ((1...(𝐽 − 1)) ∩ 𝐶) ⊆ (1...(𝐽 − 1))
13 ssfi 9181 . . . . . . . . . 10 (((1...(𝐽 − 1)) ∈ Fin ∧ ((1...(𝐽 − 1)) ∩ 𝐶) ⊆ (1...(𝐽 − 1))) → ((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin)
1411, 12, 13mp2an 705 . . . . . . . . 9 ((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin
15 hashcl 14493 . . . . . . . . 9 (((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin → (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℕ0)
1614, 15ax-mp 5 . . . . . . . 8 (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℕ0
1716nn0cni 12611 . . . . . . 7 (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℂ
1817a1i 11 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℂ)
19 diffi 9183 . . . . . . . . . 10 ((1...(𝐽 − 1)) ∈ Fin → ((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin)
2011, 19ax-mp 5 . . . . . . . . 9 ((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin
21 hashcl 14493 . . . . . . . . 9 (((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin → (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℕ0)
2220, 21ax-mp 5 . . . . . . . 8 (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℕ0
2322nn0cni 12611 . . . . . . 7 (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℂ
2423a1i 11 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℂ)
25 1cnd 11295 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → 1 ∈ ℂ)
2618, 24, 25subsub4d 11693 . . . . 5 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) − 1) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1)))
27 1zzd 12720 . . . . . . . . 9 (𝜑 → 1 ∈ ℤ)
288, 27zsubcld 12801 . . . . . . . 8 (𝜑 → (𝐽 − 1) ∈ ℤ)
291, 2, 3, 4, 5, 6, 28ballotlemfval 35115 . . . . . . 7 (𝜑 → ((𝐹‘𝐶)‘(𝐽 − 1)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
3029adantr 486 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘(𝐽 − 1)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
3130oveq1d 7433 . . . . 5 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((𝐹‘𝐶)‘(𝐽 − 1)) − 1) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) − 1))
32 elnnuz 12998 . . . . . . . . . . 11 (𝐽 ∈ ℕ ↔ 𝐽 ∈ (ℤ≥‘1))
337, 32sylib 221 . . . . . . . . . 10 (𝜑 → 𝐽 ∈ (ℤ≥‘1))
34 fzspl 33374 . . . . . . . . . . . 12 (𝐽 ∈ (ℤ≥‘1) → (1...𝐽) = ((1...(𝐽 − 1)) ∪ {𝐽}))
3534ineq1d 4165 . . . . . . . . . . 11 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∪ {𝐽}) ∩ 𝐶))
36 indir 4232 . . . . . . . . . . 11 (((1...(𝐽 − 1)) ∪ {𝐽}) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))
3735, 36eqtrdi 2812 . . . . . . . . . 10 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)))
3833, 37syl 18 . . . . . . . . 9 (𝜑 → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)))
3938adantr 486 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)))
40 disjsn 4672 . . . . . . . . . . . 12 ((𝐶 ∩ {𝐽}) = ∅ ↔ ¬ 𝐽 ∈ 𝐶)
41 incom 4155 . . . . . . . . . . . . 13 (𝐶 ∩ {𝐽}) = ({𝐽} ∩ 𝐶)
4241eqeq1i 2766 . . . . . . . . . . . 12 ((𝐶 ∩ {𝐽}) = ∅ ↔ ({𝐽} ∩ 𝐶) = ∅)
4340, 42sylbb1 240 . . . . . . . . . . 11 (¬ 𝐽 ∈ 𝐶 → ({𝐽} ∩ 𝐶) = ∅)
4443adantl 487 . . . . . . . . . 10 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ({𝐽} ∩ 𝐶) = ∅)
4544uneq2d 4115 . . . . . . . . 9 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ∅))
46 un0 4344 . . . . . . . . 9 (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ∅) = ((1...(𝐽 − 1)) ∩ 𝐶)
4745, 46eqtrdi 2812 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)) = ((1...(𝐽 − 1)) ∩ 𝐶))
4839, 47eqtrd 2796 . . . . . . 7 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((1...𝐽) ∩ 𝐶) = ((1...(𝐽 − 1)) ∩ 𝐶))
4948fveq2d 6887 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∩ 𝐶)) = (♯‘((1...(𝐽 − 1)) ∩ 𝐶)))
5034difeq1d 4073 . . . . . . . . . . 11 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∪ {𝐽}) ∖ 𝐶))
51 difundir 4237 . . . . . . . . . . 11 (((1...(𝐽 − 1)) ∪ {𝐽}) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))
5250, 51eqtrdi 2812 . . . . . . . . . 10 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)))
5333, 52syl 18 . . . . . . . . 9 (𝜑 → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)))
54 disj3 4407 . . . . . . . . . . . 12 (({𝐽} ∩ 𝐶) = ∅ ↔ {𝐽} = ({𝐽} ∖ 𝐶))
5543, 54sylib 221 . . . . . . . . . . 11 (¬ 𝐽 ∈ 𝐶 → {𝐽} = ({𝐽} ∖ 𝐶))
5655eqcomd 2767 . . . . . . . . . 10 (¬ 𝐽 ∈ 𝐶 → ({𝐽} ∖ 𝐶) = {𝐽})
5756uneq2d 4115 . . . . . . . . 9 (¬ 𝐽 ∈ 𝐶 → (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽}))
5853, 57sylan9eq 2816 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽}))
5958fveq2d 6887 . . . . . . 7 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽})))
608adantr 486 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → 𝐽 ∈ ℤ)
61 uzid 12973 . . . . . . . . . . . 12 (𝐽 ∈ ℤ → 𝐽 ∈ (ℤ≥‘𝐽))
62 uznfz 13737 . . . . . . . . . . . 12 (𝐽 ∈ (ℤ≥‘𝐽) → ¬ 𝐽 ∈ (1...(𝐽 − 1)))
638, 61, 623syl 19 . . . . . . . . . . 11 (𝜑 → ¬ 𝐽 ∈ (1...(𝐽 − 1)))
6463adantr 486 . . . . . . . . . 10 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ¬ 𝐽 ∈ (1...(𝐽 − 1)))
65 difss 4083 . . . . . . . . . . 11 ((1...(𝐽 − 1)) ∖ 𝐶) ⊆ (1...(𝐽 − 1))
6665sseli 3927 . . . . . . . . . 10 (𝐽 ∈ ((1...(𝐽 − 1)) ∖ 𝐶) → 𝐽 ∈ (1...(𝐽 − 1)))
6764, 66nsyl 141 . . . . . . . . 9 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∖ 𝐶))
68 ssfi 9181 . . . . . . . . . 10 (((1...(𝐽 − 1)) ∈ Fin ∧ ((1...(𝐽 − 1)) ∖ 𝐶) ⊆ (1...(𝐽 − 1))) → ((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin)
6911, 65, 68mp2an 705 . . . . . . . . 9 ((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin
7067, 69jctil 529 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin ∧ ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∖ 𝐶)))
71 hashunsng 14529 . . . . . . . 8 (𝐽 ∈ ℤ → ((((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin ∧ ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∖ 𝐶)) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1)))
7260, 70, 71sylc 66 . . . . . . 7 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1))
7359, 72eqtrd 2796 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1))
7449, 73oveq12d 7436 . . . . 5 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1)))
7526, 31, 743eqtr4rd 2807 . . . 4 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1))
7610, 75eqtrd 2796 . . 3 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1))
7776ex 418 . 2 (𝜑 → (¬ 𝐽 ∈ 𝐶 → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1)))
789adantr 486 . . . 4 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘𝐽) = ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))))
7917a1i 11 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℂ)
80 1cnd 11295 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → 1 ∈ ℂ)
8123a1i 11 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℂ)
8279, 80, 81addsubd 11683 . . . . 5 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) + 1))
8338fveq2d 6887 . . . . . . . 8 (𝜑 → (♯‘((1...𝐽) ∩ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))))
8483adantr 486 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∩ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))))
85 snssi 4746 . . . . . . . . . . 11 (𝐽 ∈ 𝐶 → {𝐽} ⊆ 𝐶)
86 dfss2 3917 . . . . . . . . . . 11 ({𝐽} ⊆ 𝐶 ↔ ({𝐽} ∩ 𝐶) = {𝐽})
8785, 86sylib 221 . . . . . . . . . 10 (𝐽 ∈ 𝐶 → ({𝐽} ∩ 𝐶) = {𝐽})
8887uneq2d 4115 . . . . . . . . 9 (𝐽 ∈ 𝐶 → (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽}))
8988fveq2d 6887 . . . . . . . 8 (𝐽 ∈ 𝐶 → (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))) = (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽})))
9089adantl 487 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))) = (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽})))
91 simpr 490 . . . . . . . 8 ((𝜑 ∧ 𝐽 ∈ 𝐶) → 𝐽 ∈ 𝐶)
928adantr 486 . . . . . . . . . . 11 ((𝜑 ∧ 𝐽 ∈ 𝐶) → 𝐽 ∈ ℤ)
9392, 61, 623syl 19 . . . . . . . . . 10 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ¬ 𝐽 ∈ (1...(𝐽 − 1)))
9412sseli 3927 . . . . . . . . . 10 (𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶) → 𝐽 ∈ (1...(𝐽 − 1)))
9593, 94nsyl 141 . . . . . . . . 9 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶))
9695, 14jctil 529 . . . . . . . 8 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin ∧ ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶)))
97 hashunsng 14529 . . . . . . . 8 (𝐽 ∈ 𝐶 → ((((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin ∧ ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶)) → (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1)))
9891, 96, 97sylc 66 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1))
9984, 90, 983eqtrd 2800 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∩ 𝐶)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1))
10053fveq2d 6887 . . . . . . . 8 (𝜑 → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))))
101100adantr 486 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))))
102 difin2 4247 . . . . . . . . . . . 12 ({𝐽} ⊆ 𝐶 → ({𝐽} ∖ 𝐶) = ((𝐶 ∖ 𝐶) ∩ {𝐽}))
103 difid 4325 . . . . . . . . . . . . . 14 (𝐶 ∖ 𝐶) = ∅
104103ineq1i 4162 . . . . . . . . . . . . 13 ((𝐶 ∖ 𝐶) ∩ {𝐽}) = (∅ ∩ {𝐽})
105 0in 4347 . . . . . . . . . . . . 13 (∅ ∩ {𝐽}) = ∅
106104, 105eqtri 2784 . . . . . . . . . . . 12 ((𝐶 ∖ 𝐶) ∩ {𝐽}) = ∅
107102, 106eqtrdi 2812 . . . . . . . . . . 11 ({𝐽} ⊆ 𝐶 → ({𝐽} ∖ 𝐶) = ∅)
10885, 107syl 18 . . . . . . . . . 10 (𝐽 ∈ 𝐶 → ({𝐽} ∖ 𝐶) = ∅)
109108uneq2d 4115 . . . . . . . . 9 (𝐽 ∈ 𝐶 → (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅))
110109fveq2d 6887 . . . . . . . 8 (𝐽 ∈ 𝐶 → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅)))
111110adantl 487 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅)))
112 un0 4344 . . . . . . . . 9 (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅) = ((1...(𝐽 − 1)) ∖ 𝐶)
113112a1i 11 . . . . . . . 8 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅) = ((1...(𝐽 − 1)) ∖ 𝐶))
114113fveq2d 6887 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅)) = (♯‘((1...(𝐽 − 1)) ∖ 𝐶)))
115101, 111, 1143eqtrd 2800 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘((1...(𝐽 − 1)) ∖ 𝐶)))
11699, 115oveq12d 7436 . . . . 5 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
11729adantr 486 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘(𝐽 − 1)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
118117oveq1d 7433 . . . . 5 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((𝐹‘𝐶)‘(𝐽 − 1)) + 1) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) + 1))
11982, 116, 1183eqtr4d 2806 . . . 4 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = (((𝐹‘𝐶)‘(𝐽 − 1)) + 1))
12078, 119eqtrd 2796 . . 3 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) + 1))
121120ex 418 . 2 (𝜑 → (𝐽 ∈ 𝐶 → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) + 1)))
12277, 121jca 521 1 (𝜑 → ((¬ 𝐽 ∈ 𝐶 → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1)) ∧ (𝐽 ∈ 𝐶 → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) + 1))))
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  ¬ wn 3   → wi 4   ∧ wa 401   = wceq 1570   ∈ wcel 2145  {crab 3413   ∖ cdif 3896   ∪ cun 3897   ∩ cin 3898   ⊆ wss 3899  ∅c0 4279  𝒫 cpw 4557  {csn 4584   ↦ cmpt 5186  ‘cfv 6537  (class class class)co 7418  Fincfn 8966  ℂcc 11191  1c1 11194   + caddc 11196   − cmin 11534   / cdiv 11966  ℕcn 12328  ℕ0cn0 12599  ℤcz 12686  ℤ≥cuz 12958  ...cfz 13632  ♯chash 14467
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1943  ax-6 2000  ax-7 2041  ax-8 2147  ax-9 2155  ax-10 2178  ax-11 2194  ax-12 2213  ax-ext 2733  ax-rep 5232  ax-sep 5249  ax-nul 5260  ax-pow 5327  ax-pr 5391  ax-un 7749  ax-cnex 11249  ax-resscn 11250  ax-1cn 11251  ax-icn 11252  ax-addcl 11253  ax-addrcl 11254  ax-mulcl 11255  ax-mulrcl 11256  ax-mulcom 11257  ax-addass 11258  ax-mulass 11259  ax-distr 11260  ax-i2m1 11261  ax-1ne0 11262  ax-1rid 11263  ax-rnegex 11264  ax-rrecex 11265  ax-cnre 11266  ax-pre-lttri 11267  ax-pre-lttrn 11268  ax-pre-ltadd 11269  ax-pre-mulgt0 11270
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2100  df-mo 2565  df-eu 2595  df-clab 2740  df-cleq 2753  df-clel 2836  df-nfc 2910  df-ne 2957  df-nel 3063  df-ral 3078  df-rex 3088  df-reu 3367  df-rab 3414  df-v 3453  df-sbc 3740  df-csb 3848  df-dif 3902  df-un 3904  df-in 3906  df-ss 3916  df-pss 3919  df-nul 4280  df-if 4483  df-pw 4559  df-sn 4585  df-pr 4587  df-op 4591  df-uni 4868  df-int 4908  df-iun 4953  df-br 5104  df-opab 5168  df-mpt 5187  df-tr 5213  df-id 5546  df-eprel 5551  df-po 5559  df-so 5560  df-fr 5604  df-we 5606  df-xp 5657  df-rel 5658  df-cnv 5659  df-co 5660  df-dm 5661  df-rn 5662  df-res 5663  df-ima 5664  df-pred 6303  df-ord 6364  df-on 6365  df-lim 6366  df-suc 6367  df-iota 6493  df-fun 6539  df-fn 6540  df-f 6541  df-f1 6542  df-fo 6543  df-f1o 6544  df-fv 6545  df-riota 7375  df-ov 7421  df-oprab 7422  df-mpo 7423  df-om 7876  df-1st 7999  df-2nd 8000  df-frecs 8292  df-wrecs 8323  df-recs 8372  df-rdg 8411  df-1o 8469  df-oadd 8473  df-er 8710  df-en 8967  df-dom 8968  df-sdom 8969  df-fin 8970  df-dju 9975  df-card 10013  df-pnf 11338  df-mnf 11339  df-xr 11340  df-ltxr 11341  df-le 11342  df-sub 11536  df-neg 11537  df-nn 12329  df-n0 12600  df-z 12687  df-uz 12959  df-fz 13633  df-hash 14468
This theorem is used by:  ballotlemfc0  35118  ballotlemfcc  35119  ballotlem4  35124  ballotlemi1  35128  ballotlemii  35129  ballotlemic  35132  ballotlem1c  35133
  Copyright terms: Public domain W3C validator