ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  pcfac GIF version

Theorem pcfac 12302
Description: Calculate the prime count of a factorial. (Contributed by Mario Carneiro, 11-Mar-2014.) (Revised by Mario Carneiro, 21-May-2014.)
Assertion
Ref Expression
pcfac ((𝑁 ∈ ℕ0𝑀 ∈ (ℤ𝑁) ∧ 𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
Distinct variable groups:   𝑃,𝑘   𝑘,𝑁   𝑘,𝑀

Proof of Theorem pcfac
Dummy variables 𝑚 𝑛 𝑥 𝑗 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 fveq2 5496 . . . . . . . 8 (𝑥 = 0 → (ℤ𝑥) = (ℤ‘0))
2 fveq2 5496 . . . . . . . . . 10 (𝑥 = 0 → (!‘𝑥) = (!‘0))
32oveq2d 5869 . . . . . . . . 9 (𝑥 = 0 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘0)))
4 fvoveq1 5876 . . . . . . . . . 10 (𝑥 = 0 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(0 / (𝑃𝑘))))
54sumeq2sdv 11333 . . . . . . . . 9 (𝑥 = 0 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
63, 5eqeq12d 2185 . . . . . . . 8 (𝑥 = 0 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘)))))
71, 6raleqbidv 2677 . . . . . . 7 (𝑥 = 0 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘)))))
87imbi2d 229 . . . . . 6 (𝑥 = 0 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))))
9 fveq2 5496 . . . . . . . 8 (𝑥 = 𝑛 → (ℤ𝑥) = (ℤ𝑛))
10 fveq2 5496 . . . . . . . . . 10 (𝑥 = 𝑛 → (!‘𝑥) = (!‘𝑛))
1110oveq2d 5869 . . . . . . . . 9 (𝑥 = 𝑛 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘𝑛)))
12 fvoveq1 5876 . . . . . . . . . 10 (𝑥 = 𝑛 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(𝑛 / (𝑃𝑘))))
1312sumeq2sdv 11333 . . . . . . . . 9 (𝑥 = 𝑛 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))))
1411, 13eqeq12d 2185 . . . . . . . 8 (𝑥 = 𝑛 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
159, 14raleqbidv 2677 . . . . . . 7 (𝑥 = 𝑛 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
1615imbi2d 229 . . . . . 6 (𝑥 = 𝑛 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))))))
17 fveq2 5496 . . . . . . . 8 (𝑥 = (𝑛 + 1) → (ℤ𝑥) = (ℤ‘(𝑛 + 1)))
18 fveq2 5496 . . . . . . . . . 10 (𝑥 = (𝑛 + 1) → (!‘𝑥) = (!‘(𝑛 + 1)))
1918oveq2d 5869 . . . . . . . . 9 (𝑥 = (𝑛 + 1) → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘(𝑛 + 1))))
20 fvoveq1 5876 . . . . . . . . . 10 (𝑥 = (𝑛 + 1) → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘((𝑛 + 1) / (𝑃𝑘))))
2120sumeq2sdv 11333 . . . . . . . . 9 (𝑥 = (𝑛 + 1) → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))
2219, 21eqeq12d 2185 . . . . . . . 8 (𝑥 = (𝑛 + 1) → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
2317, 22raleqbidv 2677 . . . . . . 7 (𝑥 = (𝑛 + 1) → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
2423imbi2d 229 . . . . . 6 (𝑥 = (𝑛 + 1) → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))))
25 fveq2 5496 . . . . . . . 8 (𝑥 = 𝑁 → (ℤ𝑥) = (ℤ𝑁))
26 fveq2 5496 . . . . . . . . . 10 (𝑥 = 𝑁 → (!‘𝑥) = (!‘𝑁))
2726oveq2d 5869 . . . . . . . . 9 (𝑥 = 𝑁 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘𝑁)))
28 fvoveq1 5876 . . . . . . . . . 10 (𝑥 = 𝑁 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(𝑁 / (𝑃𝑘))))
2928sumeq2sdv 11333 . . . . . . . . 9 (𝑥 = 𝑁 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))
3027, 29eqeq12d 2185 . . . . . . . 8 (𝑥 = 𝑁 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
3125, 30raleqbidv 2677 . . . . . . 7 (𝑥 = 𝑁 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
3231imbi2d 229 . . . . . 6 (𝑥 = 𝑁 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))))
33 1zzd 9239 . . . . . . . . . 10 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → 1 ∈ ℤ)
34 eluzelz 9496 . . . . . . . . . . 11 (𝑚 ∈ (ℤ‘0) → 𝑚 ∈ ℤ)
3534adantl 275 . . . . . . . . . 10 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → 𝑚 ∈ ℤ)
3633, 35fzfigd 10387 . . . . . . . . 9 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (1...𝑚) ∈ Fin)
37 isumz 11352 . . . . . . . . . 10 (((1 ∈ ℤ ∧ (1...𝑚) ⊆ (ℤ‘1) ∧ ∀𝑗 ∈ (ℤ‘1)DECID 𝑗 ∈ (1...𝑚)) ∨ (1...𝑚) ∈ Fin) → Σ𝑘 ∈ (1...𝑚)0 = 0)
3837olcs 731 . . . . . . . . 9 ((1...𝑚) ∈ Fin → Σ𝑘 ∈ (1...𝑚)0 = 0)
3936, 38syl 14 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → Σ𝑘 ∈ (1...𝑚)0 = 0)
40 0nn0 9150 . . . . . . . . . 10 0 ∈ ℕ0
41 elfznn 10010 . . . . . . . . . . . . 13 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ ℕ)
4241nnnn0d 9188 . . . . . . . . . . . 12 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ ℕ0)
43 nn0uz 9521 . . . . . . . . . . . 12 0 = (ℤ‘0)
4442, 43eleqtrdi 2263 . . . . . . . . . . 11 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ (ℤ‘0))
4544adantl 275 . . . . . . . . . 10 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → 𝑘 ∈ (ℤ‘0))
46 simpll 524 . . . . . . . . . 10 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → 𝑃 ∈ ℙ)
47 pcfaclem 12301 . . . . . . . . . 10 ((0 ∈ ℕ0𝑘 ∈ (ℤ‘0) ∧ 𝑃 ∈ ℙ) → (⌊‘(0 / (𝑃𝑘))) = 0)
4840, 45, 46, 47mp3an2i 1337 . . . . . . . . 9 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(0 / (𝑃𝑘))) = 0)
4948sumeq2dv 11331 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)0)
50 fac0 10662 . . . . . . . . . . 11 (!‘0) = 1
5150oveq2i 5864 . . . . . . . . . 10 (𝑃 pCnt (!‘0)) = (𝑃 pCnt 1)
52 pc1 12259 . . . . . . . . . 10 (𝑃 ∈ ℙ → (𝑃 pCnt 1) = 0)
5351, 52eqtrid 2215 . . . . . . . . 9 (𝑃 ∈ ℙ → (𝑃 pCnt (!‘0)) = 0)
5453adantr 274 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (𝑃 pCnt (!‘0)) = 0)
5539, 49, 543eqtr4rd 2214 . . . . . . 7 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
5655ralrimiva 2543 . . . . . 6 (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
57 nn0z 9232 . . . . . . . . . . . 12 (𝑛 ∈ ℕ0𝑛 ∈ ℤ)
5857adantr 274 . . . . . . . . . . 11 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → 𝑛 ∈ ℤ)
59 uzid 9501 . . . . . . . . . . 11 (𝑛 ∈ ℤ → 𝑛 ∈ (ℤ𝑛))
60 peano2uz 9542 . . . . . . . . . . 11 (𝑛 ∈ (ℤ𝑛) → (𝑛 + 1) ∈ (ℤ𝑛))
6158, 59, 603syl 17 . . . . . . . . . 10 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (𝑛 + 1) ∈ (ℤ𝑛))
62 uzss 9507 . . . . . . . . . 10 ((𝑛 + 1) ∈ (ℤ𝑛) → (ℤ‘(𝑛 + 1)) ⊆ (ℤ𝑛))
63 ssralv 3211 . . . . . . . . . 10 ((ℤ‘(𝑛 + 1)) ⊆ (ℤ𝑛) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
6461, 62, 633syl 17 . . . . . . . . 9 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
65 oveq1 5860 . . . . . . . . . . 11 ((𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))))
66 simpll 524 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑛 ∈ ℕ0)
67 facp1 10664 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (!‘(𝑛 + 1)) = ((!‘𝑛) · (𝑛 + 1)))
6866, 67syl 14 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (!‘(𝑛 + 1)) = ((!‘𝑛) · (𝑛 + 1)))
6968oveq2d 5869 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (!‘(𝑛 + 1))) = (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))))
70 simplr 525 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ ℙ)
71 faccl 10669 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (!‘𝑛) ∈ ℕ)
72 nnz 9231 . . . . . . . . . . . . . . . 16 ((!‘𝑛) ∈ ℕ → (!‘𝑛) ∈ ℤ)
73 nnne0 8906 . . . . . . . . . . . . . . . 16 ((!‘𝑛) ∈ ℕ → (!‘𝑛) ≠ 0)
7472, 73jca 304 . . . . . . . . . . . . . . 15 ((!‘𝑛) ∈ ℕ → ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0))
7566, 71, 743syl 17 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0))
76 nn0p1nn 9174 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (𝑛 + 1) ∈ ℕ)
77 nnz 9231 . . . . . . . . . . . . . . . 16 ((𝑛 + 1) ∈ ℕ → (𝑛 + 1) ∈ ℤ)
78 nnne0 8906 . . . . . . . . . . . . . . . 16 ((𝑛 + 1) ∈ ℕ → (𝑛 + 1) ≠ 0)
7977, 78jca 304 . . . . . . . . . . . . . . 15 ((𝑛 + 1) ∈ ℕ → ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0))
8066, 76, 793syl 17 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0))
81 pcmul 12255 . . . . . . . . . . . . . 14 ((𝑃 ∈ ℙ ∧ ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0) ∧ ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0)) → (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))) = ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))))
8270, 75, 80, 81syl3anc 1233 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))) = ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))))
8369, 82eqtr2d 2204 . . . . . . . . . . . 12 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (𝑃 pCnt (!‘(𝑛 + 1))))
8466adantr 274 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℕ0)
8584nn0zd 9332 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℤ)
86 prmnn 12064 . . . . . . . . . . . . . . . . . . 19 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
8786ad2antlr 486 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ ℕ)
88 nnexpcl 10489 . . . . . . . . . . . . . . . . . 18 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → (𝑃𝑘) ∈ ℕ)
8987, 42, 88syl2an 287 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑃𝑘) ∈ ℕ)
90 fldivp1 12300 . . . . . . . . . . . . . . . . 17 ((𝑛 ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0))
9185, 89, 90syl2anc 409 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0))
92 elfzuz 9977 . . . . . . . . . . . . . . . . . . 19 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ (ℤ‘1))
9366, 76syl 14 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℕ)
9470, 93pccld 12254 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℕ0)
9594nn0zd 9332 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℤ)
96 elfz5 9973 . . . . . . . . . . . . . . . . . . 19 ((𝑘 ∈ (ℤ‘1) ∧ (𝑃 pCnt (𝑛 + 1)) ∈ ℤ) → (𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))) ↔ 𝑘 ≤ (𝑃 pCnt (𝑛 + 1))))
9792, 95, 96syl2anr 288 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))) ↔ 𝑘 ≤ (𝑃 pCnt (𝑛 + 1))))
98 simpllr 529 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑃 ∈ ℙ)
9984, 76syl 14 . . . . . . . . . . . . . . . . . . . 20 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℕ)
10099nnzd 9333 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℤ)
10142adantl 275 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑘 ∈ ℕ0)
102 pcdvdsb 12273 . . . . . . . . . . . . . . . . . . 19 ((𝑃 ∈ ℙ ∧ (𝑛 + 1) ∈ ℤ ∧ 𝑘 ∈ ℕ0) → (𝑘 ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃𝑘) ∥ (𝑛 + 1)))
10398, 100, 101, 102syl3anc 1233 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑘 ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃𝑘) ∥ (𝑛 + 1)))
10497, 103bitr2d 188 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((𝑃𝑘) ∥ (𝑛 + 1) ↔ 𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1)))))
105104ifbid 3547 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0) = if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
10691, 105eqtrd 2203 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
107106sumeq2dv 11331 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
108 1zzd 9239 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 1 ∈ ℤ)
109 eluzelz 9496 . . . . . . . . . . . . . . . . 17 (𝑚 ∈ (ℤ‘(𝑛 + 1)) → 𝑚 ∈ ℤ)
110109adantl 275 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ ℤ)
111108, 110fzfigd 10387 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (1...𝑚) ∈ Fin)
112 znq 9583 . . . . . . . . . . . . . . . . . 18 (((𝑛 + 1) ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → ((𝑛 + 1) / (𝑃𝑘)) ∈ ℚ)
113100, 89, 112syl2anc 409 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((𝑛 + 1) / (𝑃𝑘)) ∈ ℚ)
114113flqcld 10233 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℤ)
115114zcnd 9335 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℂ)
116 znq 9583 . . . . . . . . . . . . . . . . . 18 ((𝑛 ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → (𝑛 / (𝑃𝑘)) ∈ ℚ)
11785, 89, 116syl2anc 409 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 / (𝑃𝑘)) ∈ ℚ)
118117flqcld 10233 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(𝑛 / (𝑃𝑘))) ∈ ℤ)
119118zcnd 9335 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(𝑛 / (𝑃𝑘))) ∈ ℂ)
120111, 115, 119fsumsub 11415 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) − Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
12194nn0red 9189 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℝ)
12266nn0red 9189 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑛 ∈ ℝ)
123 peano2re 8055 . . . . . . . . . . . . . . . . . . . 20 (𝑛 ∈ ℝ → (𝑛 + 1) ∈ ℝ)
124122, 123syl 14 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℝ)
125110zred 9334 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ ℝ)
12693nnzd 9333 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℤ)
127 zdcle 9288 . . . . . . . . . . . . . . . . . . . . 21 (((𝑃 pCnt (𝑛 + 1)) ∈ ℤ ∧ (𝑛 + 1) ∈ ℤ) → DECID (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1))
12895, 126, 127syl2anc 409 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → DECID (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1))
129 zletric 9256 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑃 pCnt (𝑛 + 1)) ∈ ℤ ∧ (𝑛 + 1) ∈ ℤ) → ((𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) ∨ (𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1))))
13095, 126, 129syl2anc 409 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) ∨ (𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1))))
131130ord 719 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (¬ (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) → (𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1))))
13293nnnn0d 9188 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℕ0)
133 pcdvdsb 12273 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑃 ∈ ℙ ∧ (𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ∈ ℕ0) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1)))
13470, 126, 132, 133syl3anc 1233 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1)))
13587, 132nnexpcld 10631 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℕ)
136135nnzd 9333 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℤ)
137 dvdsle 11804 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑃↑(𝑛 + 1)) ∈ ℤ ∧ (𝑛 + 1) ∈ ℕ) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → (𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1)))
138136, 93, 137syl2anc 409 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → (𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1)))
139135nnred 8891 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℝ)
140139, 124lenltd 8037 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1) ↔ ¬ (𝑛 + 1) < (𝑃↑(𝑛 + 1))))
141138, 140sylibd 148 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → ¬ (𝑛 + 1) < (𝑃↑(𝑛 + 1))))
142134, 141sylbid 149 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) → ¬ (𝑛 + 1) < (𝑃↑(𝑛 + 1))))
143131, 142syld 45 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (¬ (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) → ¬ (𝑛 + 1) < (𝑃↑(𝑛 + 1))))
144 prmuz2 12085 . . . . . . . . . . . . . . . . . . . . . 22 (𝑃 ∈ ℙ → 𝑃 ∈ (ℤ‘2))
145144ad2antlr 486 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ (ℤ‘2))
146 bernneq3 10598 . . . . . . . . . . . . . . . . . . . . 21 ((𝑃 ∈ (ℤ‘2) ∧ (𝑛 + 1) ∈ ℕ0) → (𝑛 + 1) < (𝑃↑(𝑛 + 1)))
147145, 132, 146syl2anc 409 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) < (𝑃↑(𝑛 + 1)))
148 condc 848 . . . . . . . . . . . . . . . . . . . 20 (DECID (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) → ((¬ (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) → ¬ (𝑛 + 1) < (𝑃↑(𝑛 + 1))) → ((𝑛 + 1) < (𝑃↑(𝑛 + 1)) → (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1))))
149128, 143, 147, 148syl3c 63 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1))
150 eluzle 9499 . . . . . . . . . . . . . . . . . . . 20 (𝑚 ∈ (ℤ‘(𝑛 + 1)) → (𝑛 + 1) ≤ 𝑚)
151150adantl 275 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ≤ 𝑚)
152121, 124, 125, 149, 151letrd 8043 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚)
153 eluz 9500 . . . . . . . . . . . . . . . . . . 19 (((𝑃 pCnt (𝑛 + 1)) ∈ ℤ ∧ 𝑚 ∈ ℤ) → (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) ↔ (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚))
15495, 110, 153syl2anc 409 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) ↔ (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚))
155152, 154mpbird 166 . . . . . . . . . . . . . . . . 17 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))))
156 fzss2 10020 . . . . . . . . . . . . . . . . 17 (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) → (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚))
157155, 156syl 14 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚))
158 elfzelz 9981 . . . . . . . . . . . . . . . . . . 19 (𝑗 ∈ (1...𝑚) → 𝑗 ∈ ℤ)
159158adantl 275 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → 𝑗 ∈ ℤ)
160 1zzd 9239 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → 1 ∈ ℤ)
16195adantr 274 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → (𝑃 pCnt (𝑛 + 1)) ∈ ℤ)
162 fzdcel 9996 . . . . . . . . . . . . . . . . . 18 ((𝑗 ∈ ℤ ∧ 1 ∈ ℤ ∧ (𝑃 pCnt (𝑛 + 1)) ∈ ℤ) → DECID 𝑗 ∈ (1...(𝑃 pCnt (𝑛 + 1))))
163159, 160, 161, 162syl3anc 1233 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → DECID 𝑗 ∈ (1...(𝑃 pCnt (𝑛 + 1))))
164163ralrimiva 2543 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ∀𝑗 ∈ (1...𝑚)DECID 𝑗 ∈ (1...(𝑃 pCnt (𝑛 + 1))))
165 sumhashdc 12299 . . . . . . . . . . . . . . . 16 (((1...𝑚) ∈ Fin ∧ (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚) ∧ ∀𝑗 ∈ (1...𝑚)DECID 𝑗 ∈ (1...(𝑃 pCnt (𝑛 + 1)))) → Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0) = (♯‘(1...(𝑃 pCnt (𝑛 + 1)))))
166111, 157, 164, 165syl3anc 1233 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0) = (♯‘(1...(𝑃 pCnt (𝑛 + 1)))))
167 hashfz1 10717 . . . . . . . . . . . . . . . 16 ((𝑃 pCnt (𝑛 + 1)) ∈ ℕ0 → (♯‘(1...(𝑃 pCnt (𝑛 + 1)))) = (𝑃 pCnt (𝑛 + 1)))
16894, 167syl 14 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (♯‘(1...(𝑃 pCnt (𝑛 + 1)))) = (𝑃 pCnt (𝑛 + 1)))
169166, 168eqtrd 2203 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0) = (𝑃 pCnt (𝑛 + 1)))
170107, 120, 1693eqtr3d 2211 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) − Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))) = (𝑃 pCnt (𝑛 + 1)))
171111, 115fsumcl 11363 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℂ)
172111, 119fsumcl 11363 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) ∈ ℂ)
17394nn0cnd 9190 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℂ)
174171, 172, 173subaddd 8248 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) − Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))) = (𝑃 pCnt (𝑛 + 1)) ↔ (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
175170, 174mpbid 146 . . . . . . . . . . . 12 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))
17683, 175eqeq12d 2185 . . . . . . . . . . 11 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))) ↔ (𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
17765, 176syl5ib 153 . . . . . . . . . 10 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → (𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
178177ralimdva 2537 . . . . . . . . 9 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
17964, 178syld 45 . . . . . . . 8 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
180179ex 114 . . . . . . 7 (𝑛 ∈ ℕ0 → (𝑃 ∈ ℙ → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))))
181180a2d 26 . . . . . 6 (𝑛 ∈ ℕ0 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))) → (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))))
1828, 16, 24, 32, 56, 181nn0ind 9326 . . . . 5 (𝑁 ∈ ℕ0 → (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
183182imp 123 . . . 4 ((𝑁 ∈ ℕ0𝑃 ∈ ℙ) → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))
184 oveq2 5861 . . . . . . 7 (𝑚 = 𝑀 → (1...𝑚) = (1...𝑀))
185184sumeq1d 11329 . . . . . 6 (𝑚 = 𝑀 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
186185eqeq2d 2182 . . . . 5 (𝑚 = 𝑀 → ((𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
187186rspcv 2830 . . . 4 (𝑀 ∈ (ℤ𝑁) → (∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
188183, 187syl5 32 . . 3 (𝑀 ∈ (ℤ𝑁) → ((𝑁 ∈ ℕ0𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
1891883impib 1196 . 2 ((𝑀 ∈ (ℤ𝑁) ∧ 𝑁 ∈ ℕ0𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
1901893com12 1202 1 ((𝑁 ∈ ℕ0𝑀 ∈ (ℤ𝑁) ∧ 𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wb 104  wo 703  DECID wdc 829  w3a 973   = wceq 1348  wcel 2141  wne 2340  wral 2448  wss 3121  ifcif 3526   class class class wbr 3989  cfv 5198  (class class class)co 5853  Fincfn 6718  cr 7773  0cc0 7774  1c1 7775   + caddc 7777   · cmul 7779   < clt 7954  cle 7955  cmin 8090   / cdiv 8589  cn 8878  2c2 8929  0cn0 9135  cz 9212  cuz 9487  cq 9578  ...cfz 9965  cfl 10224  cexp 10475  !cfa 10659  chash 10709  Σcsu 11316  cdvds 11749  cprime 12061   pCnt cpc 12238
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 609  ax-in2 610  ax-io 704  ax-5 1440  ax-7 1441  ax-gen 1442  ax-ie1 1486  ax-ie2 1487  ax-8 1497  ax-10 1498  ax-11 1499  ax-i12 1500  ax-bndl 1502  ax-4 1503  ax-17 1519  ax-i9 1523  ax-ial 1527  ax-i5r 1528  ax-13 2143  ax-14 2144  ax-ext 2152  ax-coll 4104  ax-sep 4107  ax-nul 4115  ax-pow 4160  ax-pr 4194  ax-un 4418  ax-setind 4521  ax-iinf 4572  ax-cnex 7865  ax-resscn 7866  ax-1cn 7867  ax-1re 7868  ax-icn 7869  ax-addcl 7870  ax-addrcl 7871  ax-mulcl 7872  ax-mulrcl 7873  ax-addcom 7874  ax-mulcom 7875  ax-addass 7876  ax-mulass 7877  ax-distr 7878  ax-i2m1 7879  ax-0lt1 7880  ax-1rid 7881  ax-0id 7882  ax-rnegex 7883  ax-precex 7884  ax-cnre 7885  ax-pre-ltirr 7886  ax-pre-ltwlin 7887  ax-pre-lttrn 7888  ax-pre-apti 7889  ax-pre-ltadd 7890  ax-pre-mulgt0 7891  ax-pre-mulext 7892  ax-arch 7893  ax-caucvg 7894
This theorem depends on definitions:  df-bi 116  df-stab 826  df-dc 830  df-3or 974  df-3an 975  df-tru 1351  df-fal 1354  df-nf 1454  df-sb 1756  df-eu 2022  df-mo 2023  df-clab 2157  df-cleq 2163  df-clel 2166  df-nfc 2301  df-ne 2341  df-nel 2436  df-ral 2453  df-rex 2454  df-reu 2455  df-rmo 2456  df-rab 2457  df-v 2732  df-sbc 2956  df-csb 3050  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-nul 3415  df-if 3527  df-pw 3568  df-sn 3589  df-pr 3590  df-op 3592  df-uni 3797  df-int 3832  df-iun 3875  df-br 3990  df-opab 4051  df-mpt 4052  df-tr 4088  df-id 4278  df-po 4281  df-iso 4282  df-iord 4351  df-on 4353  df-ilim 4354  df-suc 4356  df-iom 4575  df-xp 4617  df-rel 4618  df-cnv 4619  df-co 4620  df-dm 4621  df-rn 4622  df-res 4623  df-ima 4624  df-iota 5160  df-fun 5200  df-fn 5201  df-f 5202  df-f1 5203  df-fo 5204  df-f1o 5205  df-fv 5206  df-isom 5207  df-riota 5809  df-ov 5856  df-oprab 5857  df-mpo 5858  df-1st 6119  df-2nd 6120  df-recs 6284  df-irdg 6349  df-frec 6370  df-1o 6395  df-2o 6396  df-oadd 6399  df-er 6513  df-en 6719  df-dom 6720  df-fin 6721  df-sup 6961  df-inf 6962  df-pnf 7956  df-mnf 7957  df-xr 7958  df-ltxr 7959  df-le 7960  df-sub 8092  df-neg 8093  df-reap 8494  df-ap 8501  df-div 8590  df-inn 8879  df-2 8937  df-3 8938  df-4 8939  df-n0 9136  df-z 9213  df-uz 9488  df-q 9579  df-rp 9611  df-fz 9966  df-fzo 10099  df-fl 10226  df-mod 10279  df-seqfrec 10402  df-exp 10476  df-fac 10660  df-ihash 10710  df-cj 10806  df-re 10807  df-im 10808  df-rsqrt 10962  df-abs 10963  df-clim 11242  df-sumdc 11317  df-dvds 11750  df-gcd 11898  df-prm 12062  df-pc 12239
This theorem is referenced by:  pcbc  12303
  Copyright terms: Public domain W3C validator