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 35235
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 12759 . . . . . 6 (𝜑 → 𝐽 ∈ ℤ)
91, 2, 3, 4, 5, 6, 8ballotlemfval 35233 . . . . 5 (𝜑 → ((𝐹‘𝐶)‘𝐽) = ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))))
109adantr 486 . . . 4 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘𝐽) = ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))))
11 fzfi 14155 . . . . . . . . . 10 (1...(𝐽 − 1)) ∈ Fin
12 inss1 4136 . . . . . . . . . 10 ((1...(𝐽 − 1)) ∩ 𝐶) ⊆ (1...(𝐽 − 1))
13 ssfi 9226 . . . . . . . . . 10 (((1...(𝐽 − 1)) ∈ Fin ∧ ((1...(𝐽 − 1)) ∩ 𝐶) ⊆ (1...(𝐽 − 1))) → ((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin)
1411, 12, 13mp2an 705 . . . . . . . . 9 ((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin
15 hashcl 14541 . . . . . . . . 9 (((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin → (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℕ0)
1614, 15ax-mp 5 . . . . . . . 8 (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℕ0
1716nn0cni 12658 . . . . . . 7 (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℂ
1817a1i 11 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℂ)
19 diffi 9228 . . . . . . . . . 10 ((1...(𝐽 − 1)) ∈ Fin → ((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin)
2011, 19ax-mp 5 . . . . . . . . 9 ((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin
21 hashcl 14541 . . . . . . . . 9 (((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin → (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℕ0)
2220, 21ax-mp 5 . . . . . . . 8 (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℕ0
2322nn0cni 12658 . . . . . . 7 (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℂ
2423a1i 11 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℂ)
25 1cnd 11341 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → 1 ∈ ℂ)
2618, 24, 25subsub4d 11739 . . . . 5 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) − 1) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1)))
27 1zzd 12767 . . . . . . . . 9 (𝜑 → 1 ∈ ℤ)
288, 27zsubcld 12848 . . . . . . . 8 (𝜑 → (𝐽 − 1) ∈ ℤ)
291, 2, 3, 4, 5, 6, 28ballotlemfval 35233 . . . . . . 7 (𝜑 → ((𝐹‘𝐶)‘(𝐽 − 1)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
3029adantr 486 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘(𝐽 − 1)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
3130oveq1d 7466 . . . . 5 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((𝐹‘𝐶)‘(𝐽 − 1)) − 1) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) − 1))
32 elnnuz 13045 . . . . . . . . . . 11 (𝐽 ∈ ℕ ↔ 𝐽 ∈ (ℤ≥‘1))
337, 32sylib 221 . . . . . . . . . 10 (𝜑 → 𝐽 ∈ (ℤ≥‘1))
34 fzspl 33477 . . . . . . . . . . . 12 (𝐽 ∈ (ℤ≥‘1) → (1...𝐽) = ((1...(𝐽 − 1)) ∪ {𝐽}))
3534ineq1d 4119 . . . . . . . . . . 11 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∪ {𝐽}) ∩ 𝐶))
36 indir 4234 . . . . . . . . . . 11 (((1...(𝐽 − 1)) ∪ {𝐽}) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))
3735, 36eqtrdi 2814 . . . . . . . . . 10 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)))
3833, 37syl 18 . . . . . . . . 9 (𝜑 → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)))
3938adantr 486 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((1...𝐽) ∩ 𝐶) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)))
40 disjsn 4673 . . . . . . . . . . . 12 ((𝐶 ∩ {𝐽}) = ∅ ↔ ¬ 𝐽 ∈ 𝐶)
41 incom 4109 . . . . . . . . . . . . 13 (𝐶 ∩ {𝐽}) = ({𝐽} ∩ 𝐶)
4241eqeq1i 2768 . . . . . . . . . . . 12 ((𝐶 ∩ {𝐽}) = ∅ ↔ ({𝐽} ∩ 𝐶) = ∅)
4340, 42sylbb1 240 . . . . . . . . . . 11 (¬ 𝐽 ∈ 𝐶 → ({𝐽} ∩ 𝐶) = ∅)
4443adantl 487 . . . . . . . . . 10 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ({𝐽} ∩ 𝐶) = ∅)
4544uneq2d 4170 . . . . . . . . 9 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ∅))
46 un0 4347 . . . . . . . . 9 (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ∅) = ((1...(𝐽 − 1)) ∩ 𝐶)
4745, 46eqtrdi 2814 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)) = ((1...(𝐽 − 1)) ∩ 𝐶))
4839, 47eqtrd 2798 . . . . . . 7 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((1...𝐽) ∩ 𝐶) = ((1...(𝐽 − 1)) ∩ 𝐶))
4948fveq2d 6920 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∩ 𝐶)) = (♯‘((1...(𝐽 − 1)) ∩ 𝐶)))
5034difeq1d 4065 . . . . . . . . . . 11 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∪ {𝐽}) ∖ 𝐶))
51 difundir 4239 . . . . . . . . . . 11 (((1...(𝐽 − 1)) ∪ {𝐽}) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))
5250, 51eqtrdi 2814 . . . . . . . . . 10 (𝐽 ∈ (ℤ≥‘1) → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)))
5333, 52syl 18 . . . . . . . . 9 (𝜑 → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)))
54 disj3 4410 . . . . . . . . . . . 12 (({𝐽} ∩ 𝐶) = ∅ ↔ {𝐽} = ({𝐽} ∖ 𝐶))
5543, 54sylib 221 . . . . . . . . . . 11 (¬ 𝐽 ∈ 𝐶 → {𝐽} = ({𝐽} ∖ 𝐶))
5655eqcomd 2769 . . . . . . . . . 10 (¬ 𝐽 ∈ 𝐶 → ({𝐽} ∖ 𝐶) = {𝐽})
5756uneq2d 4170 . . . . . . . . 9 (¬ 𝐽 ∈ 𝐶 → (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽}))
5853, 57sylan9eq 2818 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((1...𝐽) ∖ 𝐶) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽}))
5958fveq2d 6920 . . . . . . 7 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽})))
608adantr 486 . . . . . . . 8 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → 𝐽 ∈ ℤ)
61 uzid 13020 . . . . . . . . . . . 12 (𝐽 ∈ ℤ → 𝐽 ∈ (ℤ≥‘𝐽))
62 uznfz 13784 . . . . . . . . . . . 12 (𝐽 ∈ (ℤ≥‘𝐽) → ¬ 𝐽 ∈ (1...(𝐽 − 1)))
638, 61, 623syl 19 . . . . . . . . . . 11 (𝜑 → ¬ 𝐽 ∈ (1...(𝐽 − 1)))
6463adantr 486 . . . . . . . . . 10 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ¬ 𝐽 ∈ (1...(𝐽 − 1)))
65 difss 4075 . . . . . . . . . . 11 ((1...(𝐽 − 1)) ∖ 𝐶) ⊆ (1...(𝐽 − 1))
6665sseli 3909 . . . . . . . . . 10 (𝐽 ∈ ((1...(𝐽 − 1)) ∖ 𝐶) → 𝐽 ∈ (1...(𝐽 − 1)))
6764, 66nsyl 141 . . . . . . . . 9 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∖ 𝐶))
68 ssfi 9226 . . . . . . . . . 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 14577 . . . . . . . 8 (𝐽 ∈ ℤ → ((((1...(𝐽 − 1)) ∖ 𝐶) ∈ Fin ∧ ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∖ 𝐶)) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1)))
7260, 70, 71sylc 66 . . . . . . 7 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1))
7359, 72eqtrd 2798 . . . . . 6 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1))
7449, 73oveq12d 7469 . . . . 5 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − ((♯‘((1...(𝐽 − 1)) ∖ 𝐶)) + 1)))
7526, 31, 743eqtr4rd 2809 . . . 4 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1))
7610, 75eqtrd 2798 . . 3 ((𝜑 ∧ ¬ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1))
7776ex 418 . 2 (𝜑 → (¬ 𝐽 ∈ 𝐶 → ((𝐹‘𝐶)‘𝐽) = (((𝐹‘𝐶)‘(𝐽 − 1)) − 1)))
789adantr 486 . . . 4 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘𝐽) = ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))))
7917a1i 11 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∩ 𝐶)) ∈ ℂ)
80 1cnd 11341 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → 1 ∈ ℂ)
8123a1i 11 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...(𝐽 − 1)) ∖ 𝐶)) ∈ ℂ)
8279, 80, 81addsubd 11729 . . . . 5 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) + 1))
8338fveq2d 6920 . . . . . . . 8 (𝜑 → (♯‘((1...𝐽) ∩ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))))
8483adantr 486 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∩ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶))))
85 snssi 4748 . . . . . . . . . . 11 (𝐽 ∈ 𝐶 → {𝐽} ⊆ 𝐶)
86 dfss2 4097 . . . . . . . . . . 11 ({𝐽} ⊆ 𝐶 ↔ ({𝐽} ∩ 𝐶) = {𝐽})
8785, 86sylib 221 . . . . . . . . . 10 (𝐽 ∈ 𝐶 → ({𝐽} ∩ 𝐶) = {𝐽})
8887uneq2d 4170 . . . . . . . . 9 (𝐽 ∈ 𝐶 → (((1...(𝐽 − 1)) ∩ 𝐶) ∪ ({𝐽} ∩ 𝐶)) = (((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽}))
8988fveq2d 6920 . . . . . . . 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 3909 . . . . . . . . . 10 (𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶) → 𝐽 ∈ (1...(𝐽 − 1)))
9593, 94nsyl 141 . . . . . . . . 9 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶))
9695, 14jctil 529 . . . . . . . 8 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin ∧ ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶)))
97 hashunsng 14577 . . . . . . . 8 (𝐽 ∈ 𝐶 → ((((1...(𝐽 − 1)) ∩ 𝐶) ∈ Fin ∧ ¬ 𝐽 ∈ ((1...(𝐽 − 1)) ∩ 𝐶)) → (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1)))
9891, 96, 97sylc 66 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∩ 𝐶) ∪ {𝐽})) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1))
9984, 90, 983eqtrd 2802 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∩ 𝐶)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1))
10053fveq2d 6920 . . . . . . . 8 (𝜑 → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))))
101100adantr 486 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))))
102 difin2 4249 . . . . . . . . . . . 12 ({𝐽} ⊆ 𝐶 → ({𝐽} ∖ 𝐶) = ((𝐶 ∖ 𝐶) ∩ {𝐽}))
103 difid 4328 . . . . . . . . . . . . . 14 (𝐶 ∖ 𝐶) = ∅
104103ineq1i 4116 . . . . . . . . . . . . 13 ((𝐶 ∖ 𝐶) ∩ {𝐽}) = (∅ ∩ {𝐽})
105 0in 4350 . . . . . . . . . . . . 13 (∅ ∩ {𝐽}) = ∅
106104, 105eqtri 2786 . . . . . . . . . . . 12 ((𝐶 ∖ 𝐶) ∩ {𝐽}) = ∅
107102, 106eqtrdi 2814 . . . . . . . . . . 11 ({𝐽} ⊆ 𝐶 → ({𝐽} ∖ 𝐶) = ∅)
10885, 107syl 18 . . . . . . . . . 10 (𝐽 ∈ 𝐶 → ({𝐽} ∖ 𝐶) = ∅)
109108uneq2d 4170 . . . . . . . . 9 (𝐽 ∈ 𝐶 → (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶)) = (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅))
110109fveq2d 6920 . . . . . . . 8 (𝐽 ∈ 𝐶 → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅)))
111110adantl 487 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ({𝐽} ∖ 𝐶))) = (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅)))
112 un0 4347 . . . . . . . . 9 (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅) = ((1...(𝐽 − 1)) ∖ 𝐶)
113112a1i 11 . . . . . . . 8 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅) = ((1...(𝐽 − 1)) ∖ 𝐶))
114113fveq2d 6920 . . . . . . 7 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘(((1...(𝐽 − 1)) ∖ 𝐶) ∪ ∅)) = (♯‘((1...(𝐽 − 1)) ∖ 𝐶)))
115101, 111, 1143eqtrd 2802 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (♯‘((1...𝐽) ∖ 𝐶)) = (♯‘((1...(𝐽 − 1)) ∖ 𝐶)))
11699, 115oveq12d 7469 . . . . 5 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) + 1) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
11729adantr 486 . . . . . 6 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((𝐹‘𝐶)‘(𝐽 − 1)) = ((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))))
118117oveq1d 7466 . . . . 5 ((𝜑 ∧ 𝐽 ∈ 𝐶) → (((𝐹‘𝐶)‘(𝐽 − 1)) + 1) = (((♯‘((1...(𝐽 − 1)) ∩ 𝐶)) − (♯‘((1...(𝐽 − 1)) ∖ 𝐶))) + 1))
11982, 116, 1183eqtr4d 2808 . . . 4 ((𝜑 ∧ 𝐽 ∈ 𝐶) → ((♯‘((1...𝐽) ∩ 𝐶)) − (♯‘((1...𝐽) ∖ 𝐶))) = (((𝐹‘𝐶)‘(𝐽 − 1)) + 1))
12078, 119eqtrd 2798 . . 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 2147  {crab 3416   ⊆ wss 3900   ∖ cdif 4048   ∩ cin 4092   ∪ cun 4152  ∅c0 4281  𝒫 cpw 4560  {csn 4588   ↦ cmpt 5192  ‘cfv 6566  (class class class)co 7451  Fincfn 9011  ℂcc 11237  1c1 11240   + caddc 11242   − cmin 11580   / cdiv 12013  ℕcn 12375  ℕ0cn0 12646  ℤcz 12733  ℤ≥cuz 13005  ...cfz 13679  ♯chash 14515
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 1945  ax-6 2002  ax-7 2043  ax-8 2149  ax-9 2157  ax-10 2180  ax-11 2197  ax-12 2216  ax-ext 2735  ax-rep 5238  ax-sep 5255  ax-nul 5266  ax-pow 5334  ax-pr 5398  ax-un 7783  ax-cnex 11295  ax-resscn 11296  ax-1cn 11297  ax-icn 11298  ax-addcl 11299  ax-addrcl 11300  ax-mulcl 11301  ax-mulrcl 11302  ax-mulcom 11303  ax-addass 11304  ax-mulass 11305  ax-distr 11306  ax-i2m1 11307  ax-1ne0 11308  ax-1rid 11309  ax-rnegex 11310  ax-rrecex 11311  ax-cnre 11312  ax-pre-lttri 11313  ax-pre-lttrn 11314  ax-pre-ltadd 11315  ax-pre-mulgt0 11316
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 2102  df-mo 2567  df-eu 2597  df-clab 2742  df-cleq 2755  df-clel 2839  df-nfc 2913  df-ne 2960  df-nel 3066  df-ral 3081  df-rex 3091  df-reu 3370  df-rab 3417  df-v 3456  df-sbc 3743  df-csb 3852  df-ss 3901  df-pss 4017  df-dif 4050  df-in 4094  df-un 4154  df-nul 4282  df-if 4486  df-pw 4562  df-sn 4589  df-pr 4591  df-op 4841  df-uni 4873  df-int 4913  df-iun 4958  df-br 5109  df-opab 5174  df-mpt 5193  df-tr 5219  df-id 5553  df-eprel 5558  df-po 5566  df-so 5567  df-fr 5611  df-we 5613  df-xp 5664  df-rel 5665  df-cnv 5666  df-co 5667  df-dm 5668  df-rn 5669  df-res 5670  df-ima 5671  df-pred 6330  df-ord 6391  df-on 6392  df-lim 6393  df-suc 6394  df-iota 6520  df-fun 6568  df-fn 6569  df-f 6570  df-f1 6571  df-fo 6572  df-f1o 6573  df-fv 6574  df-riota 7408  df-ov 7454  df-oprab 7455  df-mpo 7456  df-om 7912  df-1st 8035  df-2nd 8036  df-frecs 8337  df-wrecs 8368  df-recs 8417  df-rdg 8456  df-1o 8514  df-oadd 8518  df-er 8755  df-en 9012  df-dom 9013  df-sdom 9014  df-fin 9015  df-dju 10019  df-card 10057  df-pnf 11384  df-mnf 11385  df-xr 11386  df-ltxr 11387  df-le 11388  df-sub 11582  df-neg 11583  df-nn 12376  df-n0 12647  df-z 12734  df-uz 13006  df-fz 13680  df-hash 14516
This theorem is used by:  ballotlemfc0  35236  ballotlemfcc  35237  ballotlem4  35242  ballotlemi1  35246  ballotlemii  35247  ballotlemic  35250  ballotlem1c  35251
  Copyright terms: Public domain W3C validator