MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  pcfac Structured version   Visualization version   GIF version

Theorem pcfac 16600
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 6774 . . . . . . . 8 (𝑥 = 0 → (ℤ𝑥) = (ℤ‘0))
2 fveq2 6774 . . . . . . . . . 10 (𝑥 = 0 → (!‘𝑥) = (!‘0))
32oveq2d 7291 . . . . . . . . 9 (𝑥 = 0 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘0)))
4 fvoveq1 7298 . . . . . . . . . 10 (𝑥 = 0 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(0 / (𝑃𝑘))))
54sumeq2sdv 15416 . . . . . . . . 9 (𝑥 = 0 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
63, 5eqeq12d 2754 . . . . . . . 8 (𝑥 = 0 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘)))))
71, 6raleqbidv 3336 . . . . . . 7 (𝑥 = 0 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘)))))
87imbi2d 341 . . . . . 6 (𝑥 = 0 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))))
9 fveq2 6774 . . . . . . . 8 (𝑥 = 𝑛 → (ℤ𝑥) = (ℤ𝑛))
10 fveq2 6774 . . . . . . . . . 10 (𝑥 = 𝑛 → (!‘𝑥) = (!‘𝑛))
1110oveq2d 7291 . . . . . . . . 9 (𝑥 = 𝑛 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘𝑛)))
12 fvoveq1 7298 . . . . . . . . . 10 (𝑥 = 𝑛 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(𝑛 / (𝑃𝑘))))
1312sumeq2sdv 15416 . . . . . . . . 9 (𝑥 = 𝑛 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))))
1411, 13eqeq12d 2754 . . . . . . . 8 (𝑥 = 𝑛 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
159, 14raleqbidv 3336 . . . . . . 7 (𝑥 = 𝑛 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
1615imbi2d 341 . . . . . 6 (𝑥 = 𝑛 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))))))
17 fveq2 6774 . . . . . . . 8 (𝑥 = (𝑛 + 1) → (ℤ𝑥) = (ℤ‘(𝑛 + 1)))
18 fveq2 6774 . . . . . . . . . 10 (𝑥 = (𝑛 + 1) → (!‘𝑥) = (!‘(𝑛 + 1)))
1918oveq2d 7291 . . . . . . . . 9 (𝑥 = (𝑛 + 1) → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘(𝑛 + 1))))
20 fvoveq1 7298 . . . . . . . . . 10 (𝑥 = (𝑛 + 1) → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘((𝑛 + 1) / (𝑃𝑘))))
2120sumeq2sdv 15416 . . . . . . . . 9 (𝑥 = (𝑛 + 1) → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))
2219, 21eqeq12d 2754 . . . . . . . 8 (𝑥 = (𝑛 + 1) → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
2317, 22raleqbidv 3336 . . . . . . 7 (𝑥 = (𝑛 + 1) → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
2423imbi2d 341 . . . . . 6 (𝑥 = (𝑛 + 1) → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))))
25 fveq2 6774 . . . . . . . 8 (𝑥 = 𝑁 → (ℤ𝑥) = (ℤ𝑁))
26 fveq2 6774 . . . . . . . . . 10 (𝑥 = 𝑁 → (!‘𝑥) = (!‘𝑁))
2726oveq2d 7291 . . . . . . . . 9 (𝑥 = 𝑁 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘𝑁)))
28 fvoveq1 7298 . . . . . . . . . 10 (𝑥 = 𝑁 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(𝑁 / (𝑃𝑘))))
2928sumeq2sdv 15416 . . . . . . . . 9 (𝑥 = 𝑁 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))
3027, 29eqeq12d 2754 . . . . . . . 8 (𝑥 = 𝑁 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
3125, 30raleqbidv 3336 . . . . . . 7 (𝑥 = 𝑁 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
3231imbi2d 341 . . . . . 6 (𝑥 = 𝑁 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))))
33 fzfid 13693 . . . . . . . . 9 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (1...𝑚) ∈ Fin)
34 sumz 15434 . . . . . . . . . 10 (((1...𝑚) ⊆ (ℤ‘1) ∨ (1...𝑚) ∈ Fin) → Σ𝑘 ∈ (1...𝑚)0 = 0)
3534olcs 873 . . . . . . . . 9 ((1...𝑚) ∈ Fin → Σ𝑘 ∈ (1...𝑚)0 = 0)
3633, 35syl 17 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → Σ𝑘 ∈ (1...𝑚)0 = 0)
37 0nn0 12248 . . . . . . . . . 10 0 ∈ ℕ0
38 elfznn 13285 . . . . . . . . . . . . 13 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ ℕ)
3938nnnn0d 12293 . . . . . . . . . . . 12 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ ℕ0)
40 nn0uz 12620 . . . . . . . . . . . 12 0 = (ℤ‘0)
4139, 40eleqtrdi 2849 . . . . . . . . . . 11 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ (ℤ‘0))
4241adantl 482 . . . . . . . . . 10 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → 𝑘 ∈ (ℤ‘0))
43 simpll 764 . . . . . . . . . 10 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → 𝑃 ∈ ℙ)
44 pcfaclem 16599 . . . . . . . . . 10 ((0 ∈ ℕ0𝑘 ∈ (ℤ‘0) ∧ 𝑃 ∈ ℙ) → (⌊‘(0 / (𝑃𝑘))) = 0)
4537, 42, 43, 44mp3an2i 1465 . . . . . . . . 9 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(0 / (𝑃𝑘))) = 0)
4645sumeq2dv 15415 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)0)
47 fac0 13990 . . . . . . . . . . 11 (!‘0) = 1
4847oveq2i 7286 . . . . . . . . . 10 (𝑃 pCnt (!‘0)) = (𝑃 pCnt 1)
49 pc1 16556 . . . . . . . . . 10 (𝑃 ∈ ℙ → (𝑃 pCnt 1) = 0)
5048, 49eqtrid 2790 . . . . . . . . 9 (𝑃 ∈ ℙ → (𝑃 pCnt (!‘0)) = 0)
5150adantr 481 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (𝑃 pCnt (!‘0)) = 0)
5236, 46, 513eqtr4rd 2789 . . . . . . 7 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
5352ralrimiva 3103 . . . . . 6 (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
54 nn0z 12343 . . . . . . . . . . . 12 (𝑛 ∈ ℕ0𝑛 ∈ ℤ)
5554adantr 481 . . . . . . . . . . 11 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → 𝑛 ∈ ℤ)
56 uzid 12597 . . . . . . . . . . 11 (𝑛 ∈ ℤ → 𝑛 ∈ (ℤ𝑛))
57 peano2uz 12641 . . . . . . . . . . 11 (𝑛 ∈ (ℤ𝑛) → (𝑛 + 1) ∈ (ℤ𝑛))
5855, 56, 573syl 18 . . . . . . . . . 10 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (𝑛 + 1) ∈ (ℤ𝑛))
59 uzss 12605 . . . . . . . . . 10 ((𝑛 + 1) ∈ (ℤ𝑛) → (ℤ‘(𝑛 + 1)) ⊆ (ℤ𝑛))
60 ssralv 3987 . . . . . . . . . 10 ((ℤ‘(𝑛 + 1)) ⊆ (ℤ𝑛) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
6158, 59, 603syl 18 . . . . . . . . 9 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
62 oveq1 7282 . . . . . . . . . . 11 ((𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))))
63 simpll 764 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑛 ∈ ℕ0)
64 facp1 13992 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (!‘(𝑛 + 1)) = ((!‘𝑛) · (𝑛 + 1)))
6563, 64syl 17 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (!‘(𝑛 + 1)) = ((!‘𝑛) · (𝑛 + 1)))
6665oveq2d 7291 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (!‘(𝑛 + 1))) = (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))))
67 simplr 766 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ ℙ)
68 faccl 13997 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (!‘𝑛) ∈ ℕ)
69 nnz 12342 . . . . . . . . . . . . . . . 16 ((!‘𝑛) ∈ ℕ → (!‘𝑛) ∈ ℤ)
70 nnne0 12007 . . . . . . . . . . . . . . . 16 ((!‘𝑛) ∈ ℕ → (!‘𝑛) ≠ 0)
7169, 70jca 512 . . . . . . . . . . . . . . 15 ((!‘𝑛) ∈ ℕ → ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0))
7263, 68, 713syl 18 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0))
73 nn0p1nn 12272 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (𝑛 + 1) ∈ ℕ)
74 nnz 12342 . . . . . . . . . . . . . . . 16 ((𝑛 + 1) ∈ ℕ → (𝑛 + 1) ∈ ℤ)
75 nnne0 12007 . . . . . . . . . . . . . . . 16 ((𝑛 + 1) ∈ ℕ → (𝑛 + 1) ≠ 0)
7674, 75jca 512 . . . . . . . . . . . . . . 15 ((𝑛 + 1) ∈ ℕ → ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0))
7763, 73, 763syl 18 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0))
78 pcmul 16552 . . . . . . . . . . . . . 14 ((𝑃 ∈ ℙ ∧ ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0) ∧ ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0)) → (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))) = ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))))
7967, 72, 77, 78syl3anc 1370 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))) = ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))))
8066, 79eqtr2d 2779 . . . . . . . . . . . 12 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (𝑃 pCnt (!‘(𝑛 + 1))))
8163adantr 481 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℕ0)
8281nn0zd 12424 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℤ)
83 prmnn 16379 . . . . . . . . . . . . . . . . . . 19 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
8483ad2antlr 724 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ ℕ)
85 nnexpcl 13795 . . . . . . . . . . . . . . . . . 18 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → (𝑃𝑘) ∈ ℕ)
8684, 39, 85syl2an 596 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑃𝑘) ∈ ℕ)
87 fldivp1 16598 . . . . . . . . . . . . . . . . 17 ((𝑛 ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0))
8882, 86, 87syl2anc 584 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0))
89 elfzuz 13252 . . . . . . . . . . . . . . . . . . 19 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ (ℤ‘1))
9063, 73syl 17 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℕ)
9167, 90pccld 16551 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℕ0)
9291nn0zd 12424 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℤ)
93 elfz5 13248 . . . . . . . . . . . . . . . . . . 19 ((𝑘 ∈ (ℤ‘1) ∧ (𝑃 pCnt (𝑛 + 1)) ∈ ℤ) → (𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))) ↔ 𝑘 ≤ (𝑃 pCnt (𝑛 + 1))))
9489, 92, 93syl2anr 597 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))) ↔ 𝑘 ≤ (𝑃 pCnt (𝑛 + 1))))
95 simpllr 773 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑃 ∈ ℙ)
9681, 73syl 17 . . . . . . . . . . . . . . . . . . . 20 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℕ)
9796nnzd 12425 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℤ)
9839adantl 482 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑘 ∈ ℕ0)
99 pcdvdsb 16570 . . . . . . . . . . . . . . . . . . 19 ((𝑃 ∈ ℙ ∧ (𝑛 + 1) ∈ ℤ ∧ 𝑘 ∈ ℕ0) → (𝑘 ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃𝑘) ∥ (𝑛 + 1)))
10095, 97, 98, 99syl3anc 1370 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑘 ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃𝑘) ∥ (𝑛 + 1)))
10194, 100bitr2d 279 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((𝑃𝑘) ∥ (𝑛 + 1) ↔ 𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1)))))
102101ifbid 4482 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0) = if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
10388, 102eqtrd 2778 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
104103sumeq2dv 15415 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
105 fzfid 13693 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (1...𝑚) ∈ Fin)
10663nn0red 12294 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑛 ∈ ℝ)
107 peano2re 11148 . . . . . . . . . . . . . . . . . . . 20 (𝑛 ∈ ℝ → (𝑛 + 1) ∈ ℝ)
108106, 107syl 17 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℝ)
109108adantr 481 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℝ)
110109, 86nndivred 12027 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((𝑛 + 1) / (𝑃𝑘)) ∈ ℝ)
111110flcld 13518 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℤ)
112111zcnd 12427 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℂ)
113106adantr 481 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℝ)
114113, 86nndivred 12027 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 / (𝑃𝑘)) ∈ ℝ)
115114flcld 13518 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(𝑛 / (𝑃𝑘))) ∈ ℤ)
116115zcnd 12427 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(𝑛 / (𝑃𝑘))) ∈ ℂ)
117105, 112, 116fsumsub 15500 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) − Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
118 fzfi 13692 . . . . . . . . . . . . . . . 16 (1...𝑚) ∈ Fin
11991nn0red 12294 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℝ)
120 eluzelz 12592 . . . . . . . . . . . . . . . . . . . . 21 (𝑚 ∈ (ℤ‘(𝑛 + 1)) → 𝑚 ∈ ℤ)
121120adantl 482 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ ℤ)
122121zred 12426 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ ℝ)
123 prmuz2 16401 . . . . . . . . . . . . . . . . . . . . . 22 (𝑃 ∈ ℙ → 𝑃 ∈ (ℤ‘2))
124123ad2antlr 724 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ (ℤ‘2))
12590nnnn0d 12293 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℕ0)
126 bernneq3 13946 . . . . . . . . . . . . . . . . . . . . 21 ((𝑃 ∈ (ℤ‘2) ∧ (𝑛 + 1) ∈ ℕ0) → (𝑛 + 1) < (𝑃↑(𝑛 + 1)))
127124, 125, 126syl2anc 584 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) < (𝑃↑(𝑛 + 1)))
128119, 108letrid 11127 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) ∨ (𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1))))
129128ord 861 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (¬ (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) → (𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1))))
13090nnzd 12425 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℤ)
131 pcdvdsb 16570 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑃 ∈ ℙ ∧ (𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ∈ ℕ0) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1)))
13267, 130, 125, 131syl3anc 1370 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1)))
13384, 125nnexpcld 13960 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℕ)
134133nnzd 12425 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℤ)
135 dvdsle 16019 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑃↑(𝑛 + 1)) ∈ ℤ ∧ (𝑛 + 1) ∈ ℕ) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → (𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1)))
136134, 90, 135syl2anc 584 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → (𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1)))
137133nnred 11988 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℝ)
138137, 108lenltd 11121 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1) ↔ ¬ (𝑛 + 1) < (𝑃↑(𝑛 + 1))))
139136, 138sylibd 238 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → ¬ (𝑛 + 1) < (𝑃↑(𝑛 + 1))))
140132, 139sylbid 239 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) → ¬ (𝑛 + 1) < (𝑃↑(𝑛 + 1))))
141129, 140syld 47 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (¬ (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) → ¬ (𝑛 + 1) < (𝑃↑(𝑛 + 1))))
142127, 141mt4d 117 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1))
143 eluzle 12595 . . . . . . . . . . . . . . . . . . . 20 (𝑚 ∈ (ℤ‘(𝑛 + 1)) → (𝑛 + 1) ≤ 𝑚)
144143adantl 482 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ≤ 𝑚)
145119, 108, 122, 142, 144letrd 11132 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚)
146 eluz 12596 . . . . . . . . . . . . . . . . . . 19 (((𝑃 pCnt (𝑛 + 1)) ∈ ℤ ∧ 𝑚 ∈ ℤ) → (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) ↔ (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚))
14792, 121, 146syl2anc 584 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) ↔ (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚))
148145, 147mpbird 256 . . . . . . . . . . . . . . . . 17 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))))
149 fzss2 13296 . . . . . . . . . . . . . . . . 17 (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) → (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚))
150148, 149syl 17 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚))
151 sumhash 16597 . . . . . . . . . . . . . . . 16 (((1...𝑚) ∈ Fin ∧ (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚)) → Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0) = (♯‘(1...(𝑃 pCnt (𝑛 + 1)))))
152118, 150, 151sylancr 587 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0) = (♯‘(1...(𝑃 pCnt (𝑛 + 1)))))
153 hashfz1 14060 . . . . . . . . . . . . . . . 16 ((𝑃 pCnt (𝑛 + 1)) ∈ ℕ0 → (♯‘(1...(𝑃 pCnt (𝑛 + 1)))) = (𝑃 pCnt (𝑛 + 1)))
15491, 153syl 17 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (♯‘(1...(𝑃 pCnt (𝑛 + 1)))) = (𝑃 pCnt (𝑛 + 1)))
155152, 154eqtrd 2778 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0) = (𝑃 pCnt (𝑛 + 1)))
156104, 117, 1553eqtr3d 2786 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) − Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))) = (𝑃 pCnt (𝑛 + 1)))
157105, 112fsumcl 15445 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℂ)
158105, 116fsumcl 15445 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) ∈ ℂ)
159119recnd 11003 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℂ)
160157, 158, 159subaddd 11350 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) − Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))) = (𝑃 pCnt (𝑛 + 1)) ↔ (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
161156, 160mpbid 231 . . . . . . . . . . . 12 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))
16280, 161eqeq12d 2754 . . . . . . . . . . 11 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))) ↔ (𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
16362, 162syl5ib 243 . . . . . . . . . 10 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → (𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
164163ralimdva 3108 . . . . . . . . 9 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
16561, 164syld 47 . . . . . . . 8 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
166165ex 413 . . . . . . 7 (𝑛 ∈ ℕ0 → (𝑃 ∈ ℙ → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))))
167166a2d 29 . . . . . 6 (𝑛 ∈ ℕ0 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))) → (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))))
1688, 16, 24, 32, 53, 167nn0ind 12415 . . . . 5 (𝑁 ∈ ℕ0 → (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
169168imp 407 . . . 4 ((𝑁 ∈ ℕ0𝑃 ∈ ℙ) → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))
170 oveq2 7283 . . . . . . 7 (𝑚 = 𝑀 → (1...𝑚) = (1...𝑀))
171170sumeq1d 15413 . . . . . 6 (𝑚 = 𝑀 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
172171eqeq2d 2749 . . . . 5 (𝑚 = 𝑀 → ((𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
173172rspcv 3557 . . . 4 (𝑀 ∈ (ℤ𝑁) → (∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
174169, 173syl5 34 . . 3 (𝑀 ∈ (ℤ𝑁) → ((𝑁 ∈ ℕ0𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
1751743impib 1115 . 2 ((𝑀 ∈ (ℤ𝑁) ∧ 𝑁 ∈ ℕ0𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
1761753com12 1122 1 ((𝑁 ∈ ℕ0𝑀 ∈ (ℤ𝑁) ∧ 𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 396  w3a 1086   = wceq 1539  wcel 2106  wne 2943  wral 3064  wss 3887  ifcif 4459   class class class wbr 5074  cfv 6433  (class class class)co 7275  Fincfn 8733  cr 10870  0cc0 10871  1c1 10872   + caddc 10874   · cmul 10876   < clt 11009  cle 11010  cmin 11205   / cdiv 11632  cn 11973  2c2 12028  0cn0 12233  cz 12319  cuz 12582  ...cfz 13239  cfl 13510  cexp 13782  !cfa 13987  chash 14044  Σcsu 15397  cdvds 15963  cprime 16376   pCnt cpc 16537
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709  ax-rep 5209  ax-sep 5223  ax-nul 5230  ax-pow 5288  ax-pr 5352  ax-un 7588  ax-inf2 9399  ax-cnex 10927  ax-resscn 10928  ax-1cn 10929  ax-icn 10930  ax-addcl 10931  ax-addrcl 10932  ax-mulcl 10933  ax-mulrcl 10934  ax-mulcom 10935  ax-addass 10936  ax-mulass 10937  ax-distr 10938  ax-i2m1 10939  ax-1ne0 10940  ax-1rid 10941  ax-rnegex 10942  ax-rrecex 10943  ax-cnre 10944  ax-pre-lttri 10945  ax-pre-lttrn 10946  ax-pre-ltadd 10947  ax-pre-mulgt0 10948  ax-pre-sup 10949
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3or 1087  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-ne 2944  df-nel 3050  df-ral 3069  df-rex 3070  df-rmo 3071  df-reu 3072  df-rab 3073  df-v 3434  df-sbc 3717  df-csb 3833  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-pss 3906  df-nul 4257  df-if 4460  df-pw 4535  df-sn 4562  df-pr 4564  df-op 4568  df-uni 4840  df-int 4880  df-iun 4926  df-br 5075  df-opab 5137  df-mpt 5158  df-tr 5192  df-id 5489  df-eprel 5495  df-po 5503  df-so 5504  df-fr 5544  df-se 5545  df-we 5546  df-xp 5595  df-rel 5596  df-cnv 5597  df-co 5598  df-dm 5599  df-rn 5600  df-res 5601  df-ima 5602  df-pred 6202  df-ord 6269  df-on 6270  df-lim 6271  df-suc 6272  df-iota 6391  df-fun 6435  df-fn 6436  df-f 6437  df-f1 6438  df-fo 6439  df-f1o 6440  df-fv 6441  df-isom 6442  df-riota 7232  df-ov 7278  df-oprab 7279  df-mpo 7280  df-om 7713  df-1st 7831  df-2nd 7832  df-frecs 8097  df-wrecs 8128  df-recs 8202  df-rdg 8241  df-1o 8297  df-2o 8298  df-er 8498  df-en 8734  df-dom 8735  df-sdom 8736  df-fin 8737  df-sup 9201  df-inf 9202  df-oi 9269  df-card 9697  df-pnf 11011  df-mnf 11012  df-xr 11013  df-ltxr 11014  df-le 11015  df-sub 11207  df-neg 11208  df-div 11633  df-nn 11974  df-2 12036  df-3 12037  df-n0 12234  df-z 12320  df-uz 12583  df-q 12689  df-rp 12731  df-fz 13240  df-fzo 13383  df-fl 13512  df-mod 13590  df-seq 13722  df-exp 13783  df-fac 13988  df-hash 14045  df-cj 14810  df-re 14811  df-im 14812  df-sqrt 14946  df-abs 14947  df-clim 15197  df-sum 15398  df-dvds 15964  df-gcd 16202  df-prm 16377  df-pc 16538
This theorem is referenced by:  pcbc  16601
  Copyright terms: Public domain W3C validator