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 35172
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 12724 . . . . . 6 (𝜑 → 𝐽 ∈ ℤ)
91, 2, 3, 4, 5, 6, 8ballotlemfval 35170 . . . . 5 (𝜑 → ((𝐹‘𝐶)‘𝐽) = ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))))
109adantr 486 . . . 4 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘𝐽) = ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))))
11 fzfi 14120 . . . . . . . . . 10 (1...(𝐽 − 1)) ∈ Fin
12 inss1 4132 . . . . . . . . . 10 ((1...(𝐽 − 1)) ∩ 𝐶) ⊆ (1...(𝐽 − 1))
13 ssfi 9193 . . . . . . . . . 10 (((1...(𝐽 − 1)) ∈ Fin ∧ ((1...(𝐽 − 1)) ∩ 𝐶) ⊆ (1...(𝐽 − 1))) → ((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin)
1411, 12, 13mp2an 705 . . . . . . . . 9 ((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin
15 hashcl 14505 . . . . . . . . 9 (((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin → (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℕ0)
1614, 15ax-mp 5 . . . . . . . 8 (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℕ0
1716nn0cni 12623 . . . . . . 7 (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℂ
1817a1i 11 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℂ)
19 diffi 9195 . . . . . . . . . 10 ((1...(𝐽 − 1)) ∈ Fin → ((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin)
2011, 19ax-mp 5 . . . . . . . . 9 ((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin
21 hashcl 14505 . . . . . . . . 9 (((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin → (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℕ0)
2220, 21ax-mp 5 . . . . . . . 8 (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℕ0
2322nn0cni 12623 . . . . . . 7 (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℂ
2423a1i 11 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℂ)
25 1cnd 11307 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → 1 ∈ ℂ)
2618, 24, 25subsub4d 11705 . . . . 5 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) − 1) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1)))
27 1zzd 12732 . . . . . . . . 9 (𝜑 → 1 ∈ ℤ)
288, 27zsubcld 12813 . . . . . . . 8 (𝜑 → (𝐽 − 1) ∈ ℤ)
291, 2, 3, 4, 5, 6, 28ballotlemfval 35170 . . . . . . 7 (𝜑 → ((𝐹‘𝐶)‘(𝐽 − 1)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
3029adantr 486 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘(𝐽 − 1)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
3130oveq1d 7437 . . . . 5 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((𝐹‘𝐶)‘(𝐽 − 1)) − 1) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) − 1))
32 elnnuz 13010 . . . . . . . . . . 11 (𝐽 ∈ ℕ ↔ 𝐽 ∈ (ℤ≥‘1))
337, 32sylib 221 . . . . . . . . . 10 (𝜑 → 𝐽 ∈ (ℤ≥‘1))
34 fzspl 33429 . . . . . . . . . . . 12 (𝐽 ∈ (ℤ≥‘1) → (1...𝐽) = ((1...(𝐽 − 1)) ∪ {𝐽}))
3534ineq1d 4115 . . . . . . . . . . 11 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∪ {𝐽}) ∩ 𝐶))
36 indir 4230 . . . . . . . . . . 11 (((1...(𝐽 − 1)) ∪ {𝐽}) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))
3735, 36eqtrdi 2811 . . . . . . . . . 10 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)))
3833, 37syl 18 . . . . . . . . 9 (𝜑 → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)))
3938adantr 486 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)))
40 disjsn 4668 . . . . . . . . . . . 12 ((𝐶 ∩ {𝐽}) = ∅ ↔ ¬ 𝐽 ∈ 𝐶)
41 incom 4105 . . . . . . . . . . . . 13 (𝐶 ∩ {𝐽}) = ({𝐽} ∩ 𝐶)
4241eqeq1i 2765 . . . . . . . . . . . 12 ((𝐶 ∩ {𝐽}) = ∅ ↔ ({𝐽} ∩ 𝐶) = ∅)
4340, 42sylbb1 240 . . . . . . . . . . 11 (¬ 𝐽 ∈ 𝐶 → ({𝐽} ∩ 𝐶) = ∅)
4443adantl 487 . . . . . . . . . 10 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ({𝐽} ∩ 𝐶) = ∅)
4544uneq2d 4166 . . . . . . . . 9 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ∅))
46 un0 4343 . . . . . . . . 9 (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ∅) = ((1...(𝐽 − 1)) ∩ 𝐶)
4745, 46eqtrdi 2811 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)) = ((1...(𝐽 − 1)) ∩ 𝐶))
4839, 47eqtrd 2795 . . . . . . 7 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((1...𝐽) ∩ 𝐶) = ((1...(𝐽 − 1)) ∩ 𝐶))
4948fveq2d 6892 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∩ 𝐶)) = (♯‘((1...(𝐽 − 1)) ∩ 𝐶)))
5034difeq1d 4061 . . . . . . . . . . 11 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∪ {𝐽}) ∖ 𝐶))
51 difundir 4235 . . . . . . . . . . 11 (((1...(𝐽 − 1)) ∪ {𝐽}) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))
5250, 51eqtrdi 2811 . . . . . . . . . 10 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)))
5333, 52syl 18 . . . . . . . . 9 (𝜑 → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)))
54 disj3 4406 . . . . . . . . . . . 12 (({𝐽} ∩ 𝐶) = ∅ ↔ {𝐽} = ({𝐽} ∖ 𝐶))
5543, 54sylib 221 . . . . . . . . . . 11 (¬ 𝐽 ∈ 𝐶 → {𝐽} = ({𝐽} ∖ 𝐶))
5655eqcomd 2766 . . . . . . . . . 10 (¬ 𝐽 ∈ 𝐶 → ({𝐽} ∖ 𝐶) = {𝐽})
5756uneq2d 4166 . . . . . . . . 9 (¬ 𝐽 ∈ 𝐶 → (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽}))
5853, 57sylan9eq 2815 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽}))
5958fveq2d 6892 . . . . . . 7 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽})))
608adantr 486 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → 𝐽 ∈ ℤ)
61 uzid 12985 . . . . . . . . . . . 12 (𝐽 ∈ ℤ → 𝐽 ∈ (ℤ≥‘𝐽))
62 uznfz 13749 . . . . . . . . . . . 12 (𝐽 ∈ (ℤ≥‘𝐽) → ¬ 𝐽 ∈ (1...(𝐽 − 1)))
638, 61, 623syl 19 . . . . . . . . . . 11 (𝜑 → ¬ 𝐽 ∈ (1...(𝐽 − 1)))
6463adantr 486 . . . . . . . . . 10 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ¬ 𝐽 ∈ (1...(𝐽 − 1)))
65 difss 4071 . . . . . . . . . . 11 ((1...(𝐽 − 1)) ∖ 𝐶) ⊆ (1...(𝐽 − 1))
6665sseli 3905 . . . . . . . . . 10 (𝐽 ∈ ((1...(𝐽 − 1)) ∖ 𝐶) → 𝐽 ∈ (1...(𝐽 − 1)))
6764, 66nsyl 141 . . . . . . . . 9 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∖ 𝐶))
68 ssfi 9193 . . . . . . . . . 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 14541 . . . . . . . 8 (𝐽 ∈ ℤ → ((((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin ∧ ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∖ 𝐶)) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1)))
7260, 70, 71sylc 66 . . . . . . 7 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1))
7359, 72eqtrd 2795 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1))
7449, 73oveq12d 7440 . . . . 5 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1)))
7526, 31, 743eqtr4rd 2806 . . . 4 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1))
7610, 75eqtrd 2795 . . 3 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1))
7776ex 418 . 2 (𝜑 → (¬ 𝐽 ∈ 𝐶 → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1)))
789adantr 486 . . . 4 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘𝐽) = ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))))
7917a1i 11 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℂ)
80 1cnd 11307 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → 1 ∈ ℂ)
8123a1i 11 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℂ)
8279, 80, 81addsubd 11695 . . . . 5 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) + 1))
8338fveq2d 6892 . . . . . . . 8 (𝜑 → (♯‘((1...𝐽) ∩ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))))
8483adantr 486 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∩ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))))
85 snssi 4742 . . . . . . . . . . 11 (𝐽 ∈ 𝐶 → {𝐽} ⊆ 𝐶)
86 dfss2 4093 . . . . . . . . . . 11 ({𝐽} ⊆ 𝐶 ↔ ({𝐽} ∩ 𝐶) = {𝐽})
8785, 86sylib 221 . . . . . . . . . 10 (𝐽 ∈ 𝐶 → ({𝐽} ∩ 𝐶) = {𝐽})
8887uneq2d 4166 . . . . . . . . 9 (𝐽 ∈ 𝐶 → (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽}))
8988fveq2d 6892 . . . . . . . 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 3905 . . . . . . . . . 10 (𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶) → 𝐽 ∈ (1...(𝐽 − 1)))
9593, 94nsyl 141 . . . . . . . . 9 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶))
9695, 14jctil 529 . . . . . . . 8 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin ∧ ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶)))
97 hashunsng 14541 . . . . . . . 8 (𝐽 ∈ 𝐶 → ((((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin ∧ ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶)) → (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1)))
9891, 96, 97sylc 66 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1))
9984, 90, 983eqtrd 2799 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∩ 𝐶)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1))
10053fveq2d 6892 . . . . . . . 8 (𝜑 → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))))
101100adantr 486 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))))
102 difin2 4245 . . . . . . . . . . . 12 ({𝐽} ⊆ 𝐶 → ({𝐽} ∖ 𝐶) = ((𝐶 ∖ 𝐶) ∩ {𝐽}))
103 difid 4324 . . . . . . . . . . . . . 14 (𝐶 ∖ 𝐶) = ∅
104103ineq1i 4112 . . . . . . . . . . . . 13 ((𝐶 ∖ 𝐶) ∩ {𝐽}) = (∅ ∩ {𝐽})
105 0in 4346 . . . . . . . . . . . . 13 (∅ ∩ {𝐽}) = ∅
106104, 105eqtri 2783 . . . . . . . . . . . 12 ((𝐶 ∖ 𝐶) ∩ {𝐽}) = ∅
107102, 106eqtrdi 2811 . . . . . . . . . . 11 ({𝐽} ⊆ 𝐶 → ({𝐽} ∖ 𝐶) = ∅)
10885, 107syl 18 . . . . . . . . . 10 (𝐽 ∈ 𝐶 → ({𝐽} ∖ 𝐶) = ∅)
109108uneq2d 4166 . . . . . . . . 9 (𝐽 ∈ 𝐶 → (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅))
110109fveq2d 6892 . . . . . . . 8 (𝐽 ∈ 𝐶 → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅)))
111110adantl 487 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅)))
112 un0 4343 . . . . . . . . 9 (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅) = ((1...(𝐽 − 1)) ∖ 𝐶)
113112a1i 11 . . . . . . . 8 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅) = ((1...(𝐽 − 1)) ∖ 𝐶))
114113fveq2d 6892 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅)) = (♯‘((1...(𝐽 − 1)) ∖ 𝐶)))
115101, 111, 1143eqtrd 2799 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘((1...(𝐽 − 1)) ∖ 𝐶)))
11699, 115oveq12d 7440 . . . . 5 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
11729adantr 486 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘(𝐽 − 1)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
118117oveq1d 7437 . . . . 5 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((𝐹‘𝐶)‘(𝐽 − 1)) + 1) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) + 1))
11982, 116, 1183eqtr4d 2805 . . . 4 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = (((𝐹‘𝐶)‘(𝐽 − 1)) + 1))
12078, 119eqtrd 2795 . . 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 1569   ∈ wcel 2144  {crab 3412   ⊆ wss 3896   ∖ cdif 4044   ∩ cin 4088   ∪ cun 4148  ∅c0 4277  𝒫 cpw 4556  {csn 4584   ↦ cmpt 5185  ‘cfv 6541  (class class class)co 7422  Fincfn 8978  ℂcc 11203  1c1 11206   + caddc 11208   − cmin 11546   / cdiv 11978  ℕcn 12340  ℕ0cn0 12611  ℤcz 12698  ℤ≥cuz 12970  ...cfz 13644  ♯chash 14479
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1827  ax-4 1841  ax-5 1942  ax-6 1999  ax-7 2040  ax-8 2146  ax-9 2154  ax-10 2177  ax-11 2193  ax-12 2212  ax-ext 2732  ax-rep 5231  ax-sep 5248  ax-nul 5259  ax-pow 5326  ax-pr 5390  ax-un 7753  ax-cnex 11261  ax-resscn 11262  ax-1cn 11263  ax-icn 11264  ax-addcl 11265  ax-addrcl 11266  ax-mulcl 11267  ax-mulrcl 11268  ax-mulcom 11269  ax-addass 11270  ax-mulass 11271  ax-distr 11272  ax-i2m1 11273  ax-1ne0 11274  ax-1rid 11275  ax-rnegex 11276  ax-rrecex 11277  ax-cnre 11278  ax-pre-lttri 11279  ax-pre-lttrn 11280  ax-pre-ltadd 11281  ax-pre-mulgt0 11282
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-3or 1104  df-3an 1105  df-tru 1572  df-fal 1582  df-ex 1812  df-nf 1816  df-sb 2099  df-mo 2564  df-eu 2594  df-clab 2739  df-cleq 2752  df-clel 2835  df-nfc 2909  df-ne 2956  df-nel 3062  df-ral 3077  df-rex 3087  df-reu 3366  df-rab 3413  df-v 3452  df-sbc 3739  df-csb 3848  df-ss 3897  df-pss 4013  df-dif 4046  df-in 4090  df-un 4150  df-nul 4278  df-if 4482  df-pw 4558  df-sn 4585  df-pr 4587  df-op 4835  df-uni 4867  df-int 4907  df-iun 4952  df-br 5103  df-opab 5167  df-mpt 5186  df-tr 5212  df-id 5545  df-eprel 5550  df-po 5558  df-so 5559  df-fr 5603  df-we 5605  df-xp 5656  df-rel 5657  df-cnv 5658  df-co 5659  df-dm 5660  df-rn 5661  df-res 5662  df-ima 5663  df-pred 6306  df-ord 6367  df-on 6368  df-lim 6369  df-suc 6370  df-iota 6496  df-fun 6543  df-fn 6544  df-f 6545  df-f1 6546  df-fo 6547  df-f1o 6548  df-fv 6549  df-riota 7379  df-ov 7425  df-oprab 7426  df-mpo 7427  df-om 7880  df-1st 8003  df-2nd 8004  df-frecs 8304  df-wrecs 8335  df-recs 8384  df-rdg 8423  df-1o 8481  df-oadd 8485  df-er 8722  df-en 8979  df-dom 8980  df-sdom 8981  df-fin 8982  df-dju 9987  df-card 10025  df-pnf 11350  df-mnf 11351  df-xr 11352  df-ltxr 11353  df-le 11354  df-sub 11548  df-neg 11549  df-nn 12341  df-n0 12612  df-z 12699  df-uz 12971  df-fz 13645  df-hash 14480
This theorem is used by:  ballotlemfc0  35173  ballotlemfcc  35174  ballotlem4  35179  ballotlemi1  35183  ballotlemii  35184  ballotlemic  35187  ballotlem1c  35188
  Copyright terms: Public domain W3C validator