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

Theorem pcfac 16528
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 6756 . . . . . . . 8 (𝑥 = 0 → (ℤ𝑥) = (ℤ‘0))
2 fveq2 6756 . . . . . . . . . 10 (𝑥 = 0 → (!‘𝑥) = (!‘0))
32oveq2d 7271 . . . . . . . . 9 (𝑥 = 0 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘0)))
4 fvoveq1 7278 . . . . . . . . . 10 (𝑥 = 0 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(0 / (𝑃𝑘))))
54sumeq2sdv 15344 . . . . . . . . 9 (𝑥 = 0 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
63, 5eqeq12d 2754 . . . . . . . 8 (𝑥 = 0 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘)))))
71, 6raleqbidv 3327 . . . . . . 7 (𝑥 = 0 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘)))))
87imbi2d 340 . . . . . 6 (𝑥 = 0 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))))
9 fveq2 6756 . . . . . . . 8 (𝑥 = 𝑛 → (ℤ𝑥) = (ℤ𝑛))
10 fveq2 6756 . . . . . . . . . 10 (𝑥 = 𝑛 → (!‘𝑥) = (!‘𝑛))
1110oveq2d 7271 . . . . . . . . 9 (𝑥 = 𝑛 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘𝑛)))
12 fvoveq1 7278 . . . . . . . . . 10 (𝑥 = 𝑛 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(𝑛 / (𝑃𝑘))))
1312sumeq2sdv 15344 . . . . . . . . 9 (𝑥 = 𝑛 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))))
1411, 13eqeq12d 2754 . . . . . . . 8 (𝑥 = 𝑛 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
159, 14raleqbidv 3327 . . . . . . 7 (𝑥 = 𝑛 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
1615imbi2d 340 . . . . . 6 (𝑥 = 𝑛 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))))))
17 fveq2 6756 . . . . . . . 8 (𝑥 = (𝑛 + 1) → (ℤ𝑥) = (ℤ‘(𝑛 + 1)))
18 fveq2 6756 . . . . . . . . . 10 (𝑥 = (𝑛 + 1) → (!‘𝑥) = (!‘(𝑛 + 1)))
1918oveq2d 7271 . . . . . . . . 9 (𝑥 = (𝑛 + 1) → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘(𝑛 + 1))))
20 fvoveq1 7278 . . . . . . . . . 10 (𝑥 = (𝑛 + 1) → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘((𝑛 + 1) / (𝑃𝑘))))
2120sumeq2sdv 15344 . . . . . . . . 9 (𝑥 = (𝑛 + 1) → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))
2219, 21eqeq12d 2754 . . . . . . . 8 (𝑥 = (𝑛 + 1) → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
2317, 22raleqbidv 3327 . . . . . . 7 (𝑥 = (𝑛 + 1) → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
2423imbi2d 340 . . . . . 6 (𝑥 = (𝑛 + 1) → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))))
25 fveq2 6756 . . . . . . . 8 (𝑥 = 𝑁 → (ℤ𝑥) = (ℤ𝑁))
26 fveq2 6756 . . . . . . . . . 10 (𝑥 = 𝑁 → (!‘𝑥) = (!‘𝑁))
2726oveq2d 7271 . . . . . . . . 9 (𝑥 = 𝑁 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘𝑁)))
28 fvoveq1 7278 . . . . . . . . . 10 (𝑥 = 𝑁 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(𝑁 / (𝑃𝑘))))
2928sumeq2sdv 15344 . . . . . . . . 9 (𝑥 = 𝑁 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))
3027, 29eqeq12d 2754 . . . . . . . 8 (𝑥 = 𝑁 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
3125, 30raleqbidv 3327 . . . . . . 7 (𝑥 = 𝑁 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
3231imbi2d 340 . . . . . 6 (𝑥 = 𝑁 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))))
33 fzfid 13621 . . . . . . . . 9 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (1...𝑚) ∈ Fin)
34 sumz 15362 . . . . . . . . . 10 (((1...𝑚) ⊆ (ℤ‘1) ∨ (1...𝑚) ∈ Fin) → Σ𝑘 ∈ (1...𝑚)0 = 0)
3534olcs 872 . . . . . . . . 9 ((1...𝑚) ∈ Fin → Σ𝑘 ∈ (1...𝑚)0 = 0)
3633, 35syl 17 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → Σ𝑘 ∈ (1...𝑚)0 = 0)
37 0nn0 12178 . . . . . . . . . 10 0 ∈ ℕ0
38 elfznn 13214 . . . . . . . . . . . . 13 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ ℕ)
3938nnnn0d 12223 . . . . . . . . . . . 12 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ ℕ0)
40 nn0uz 12549 . . . . . . . . . . . 12 0 = (ℤ‘0)
4139, 40eleqtrdi 2849 . . . . . . . . . . 11 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ (ℤ‘0))
4241adantl 481 . . . . . . . . . 10 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → 𝑘 ∈ (ℤ‘0))
43 simpll 763 . . . . . . . . . 10 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → 𝑃 ∈ ℙ)
44 pcfaclem 16527 . . . . . . . . . 10 ((0 ∈ ℕ0𝑘 ∈ (ℤ‘0) ∧ 𝑃 ∈ ℙ) → (⌊‘(0 / (𝑃𝑘))) = 0)
4537, 42, 43, 44mp3an2i 1464 . . . . . . . . 9 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(0 / (𝑃𝑘))) = 0)
4645sumeq2dv 15343 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)0)
47 fac0 13918 . . . . . . . . . . 11 (!‘0) = 1
4847oveq2i 7266 . . . . . . . . . 10 (𝑃 pCnt (!‘0)) = (𝑃 pCnt 1)
49 pc1 16484 . . . . . . . . . 10 (𝑃 ∈ ℙ → (𝑃 pCnt 1) = 0)
5048, 49eqtrid 2790 . . . . . . . . 9 (𝑃 ∈ ℙ → (𝑃 pCnt (!‘0)) = 0)
5150adantr 480 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (𝑃 pCnt (!‘0)) = 0)
5236, 46, 513eqtr4rd 2789 . . . . . . 7 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
5352ralrimiva 3107 . . . . . 6 (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
54 nn0z 12273 . . . . . . . . . . . 12 (𝑛 ∈ ℕ0𝑛 ∈ ℤ)
5554adantr 480 . . . . . . . . . . 11 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → 𝑛 ∈ ℤ)
56 uzid 12526 . . . . . . . . . . 11 (𝑛 ∈ ℤ → 𝑛 ∈ (ℤ𝑛))
57 peano2uz 12570 . . . . . . . . . . 11 (𝑛 ∈ (ℤ𝑛) → (𝑛 + 1) ∈ (ℤ𝑛))
5855, 56, 573syl 18 . . . . . . . . . 10 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (𝑛 + 1) ∈ (ℤ𝑛))
59 uzss 12534 . . . . . . . . . 10 ((𝑛 + 1) ∈ (ℤ𝑛) → (ℤ‘(𝑛 + 1)) ⊆ (ℤ𝑛))
60 ssralv 3983 . . . . . . . . . 10 ((ℤ‘(𝑛 + 1)) ⊆ (ℤ𝑛) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
6158, 59, 603syl 18 . . . . . . . . 9 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
62 oveq1 7262 . . . . . . . . . . 11 ((𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))))
63 simpll 763 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑛 ∈ ℕ0)
64 facp1 13920 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (!‘(𝑛 + 1)) = ((!‘𝑛) · (𝑛 + 1)))
6563, 64syl 17 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (!‘(𝑛 + 1)) = ((!‘𝑛) · (𝑛 + 1)))
6665oveq2d 7271 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (!‘(𝑛 + 1))) = (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))))
67 simplr 765 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ ℙ)
68 faccl 13925 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (!‘𝑛) ∈ ℕ)
69 nnz 12272 . . . . . . . . . . . . . . . 16 ((!‘𝑛) ∈ ℕ → (!‘𝑛) ∈ ℤ)
70 nnne0 11937 . . . . . . . . . . . . . . . 16 ((!‘𝑛) ∈ ℕ → (!‘𝑛) ≠ 0)
7169, 70jca 511 . . . . . . . . . . . . . . 15 ((!‘𝑛) ∈ ℕ → ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0))
7263, 68, 713syl 18 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0))
73 nn0p1nn 12202 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (𝑛 + 1) ∈ ℕ)
74 nnz 12272 . . . . . . . . . . . . . . . 16 ((𝑛 + 1) ∈ ℕ → (𝑛 + 1) ∈ ℤ)
75 nnne0 11937 . . . . . . . . . . . . . . . 16 ((𝑛 + 1) ∈ ℕ → (𝑛 + 1) ≠ 0)
7674, 75jca 511 . . . . . . . . . . . . . . 15 ((𝑛 + 1) ∈ ℕ → ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0))
7763, 73, 763syl 18 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0))
78 pcmul 16480 . . . . . . . . . . . . . 14 ((𝑃 ∈ ℙ ∧ ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0) ∧ ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0)) → (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))) = ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))))
7967, 72, 77, 78syl3anc 1369 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))) = ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))))
8066, 79eqtr2d 2779 . . . . . . . . . . . 12 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (𝑃 pCnt (!‘(𝑛 + 1))))
8163adantr 480 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℕ0)
8281nn0zd 12353 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℤ)
83 prmnn 16307 . . . . . . . . . . . . . . . . . . 19 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
8483ad2antlr 723 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ ℕ)
85 nnexpcl 13723 . . . . . . . . . . . . . . . . . 18 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → (𝑃𝑘) ∈ ℕ)
8684, 39, 85syl2an 595 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑃𝑘) ∈ ℕ)
87 fldivp1 16526 . . . . . . . . . . . . . . . . 17 ((𝑛 ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0))
8882, 86, 87syl2anc 583 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0))
89 elfzuz 13181 . . . . . . . . . . . . . . . . . . 19 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ (ℤ‘1))
9063, 73syl 17 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℕ)
9167, 90pccld 16479 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℕ0)
9291nn0zd 12353 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℤ)
93 elfz5 13177 . . . . . . . . . . . . . . . . . . 19 ((𝑘 ∈ (ℤ‘1) ∧ (𝑃 pCnt (𝑛 + 1)) ∈ ℤ) → (𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))) ↔ 𝑘 ≤ (𝑃 pCnt (𝑛 + 1))))
9489, 92, 93syl2anr 596 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))) ↔ 𝑘 ≤ (𝑃 pCnt (𝑛 + 1))))
95 simpllr 772 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑃 ∈ ℙ)
9681, 73syl 17 . . . . . . . . . . . . . . . . . . . 20 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℕ)
9796nnzd 12354 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℤ)
9839adantl 481 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑘 ∈ ℕ0)
99 pcdvdsb 16498 . . . . . . . . . . . . . . . . . . 19 ((𝑃 ∈ ℙ ∧ (𝑛 + 1) ∈ ℤ ∧ 𝑘 ∈ ℕ0) → (𝑘 ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃𝑘) ∥ (𝑛 + 1)))
10095, 97, 98, 99syl3anc 1369 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑘 ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃𝑘) ∥ (𝑛 + 1)))
10194, 100bitr2d 279 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((𝑃𝑘) ∥ (𝑛 + 1) ↔ 𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1)))))
102101ifbid 4479 . . . . . . . . . . . . . . . 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 15343 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
105 fzfid 13621 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (1...𝑚) ∈ Fin)
10663nn0red 12224 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑛 ∈ ℝ)
107 peano2re 11078 . . . . . . . . . . . . . . . . . . . 20 (𝑛 ∈ ℝ → (𝑛 + 1) ∈ ℝ)
108106, 107syl 17 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℝ)
109108adantr 480 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℝ)
110109, 86nndivred 11957 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((𝑛 + 1) / (𝑃𝑘)) ∈ ℝ)
111110flcld 13446 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℤ)
112111zcnd 12356 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℂ)
113106adantr 480 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℝ)
114113, 86nndivred 11957 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 / (𝑃𝑘)) ∈ ℝ)
115114flcld 13446 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(𝑛 / (𝑃𝑘))) ∈ ℤ)
116115zcnd 12356 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(𝑛 / (𝑃𝑘))) ∈ ℂ)
117105, 112, 116fsumsub 15428 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) − Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
118 fzfi 13620 . . . . . . . . . . . . . . . 16 (1...𝑚) ∈ Fin
11991nn0red 12224 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℝ)
120 eluzelz 12521 . . . . . . . . . . . . . . . . . . . . 21 (𝑚 ∈ (ℤ‘(𝑛 + 1)) → 𝑚 ∈ ℤ)
121120adantl 481 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ ℤ)
122121zred 12355 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ ℝ)
123 prmuz2 16329 . . . . . . . . . . . . . . . . . . . . . 22 (𝑃 ∈ ℙ → 𝑃 ∈ (ℤ‘2))
124123ad2antlr 723 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ (ℤ‘2))
12590nnnn0d 12223 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℕ0)
126 bernneq3 13874 . . . . . . . . . . . . . . . . . . . . 21 ((𝑃 ∈ (ℤ‘2) ∧ (𝑛 + 1) ∈ ℕ0) → (𝑛 + 1) < (𝑃↑(𝑛 + 1)))
127124, 125, 126syl2anc 583 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) < (𝑃↑(𝑛 + 1)))
128119, 108letrid 11057 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) ∨ (𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1))))
129128ord 860 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (¬ (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) → (𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1))))
13090nnzd 12354 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℤ)
131 pcdvdsb 16498 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑃 ∈ ℙ ∧ (𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ∈ ℕ0) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1)))
13267, 130, 125, 131syl3anc 1369 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1)))
13384, 125nnexpcld 13888 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℕ)
134133nnzd 12354 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℤ)
135 dvdsle 15947 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑃↑(𝑛 + 1)) ∈ ℤ ∧ (𝑛 + 1) ∈ ℕ) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → (𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1)))
136134, 90, 135syl2anc 583 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → (𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1)))
137133nnred 11918 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℝ)
138137, 108lenltd 11051 . . . . . . . . . . . . . . . . . . . . . . 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 12524 . . . . . . . . . . . . . . . . . . . 20 (𝑚 ∈ (ℤ‘(𝑛 + 1)) → (𝑛 + 1) ≤ 𝑚)
144143adantl 481 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ≤ 𝑚)
145119, 108, 122, 142, 144letrd 11062 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚)
146 eluz 12525 . . . . . . . . . . . . . . . . . . 19 (((𝑃 pCnt (𝑛 + 1)) ∈ ℤ ∧ 𝑚 ∈ ℤ) → (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) ↔ (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚))
14792, 121, 146syl2anc 583 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) ↔ (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚))
148145, 147mpbird 256 . . . . . . . . . . . . . . . . 17 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))))
149 fzss2 13225 . . . . . . . . . . . . . . . . 17 (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) → (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚))
150148, 149syl 17 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚))
151 sumhash 16525 . . . . . . . . . . . . . . . 16 (((1...𝑚) ∈ Fin ∧ (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚)) → Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0) = (♯‘(1...(𝑃 pCnt (𝑛 + 1)))))
152118, 150, 151sylancr 586 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0) = (♯‘(1...(𝑃 pCnt (𝑛 + 1)))))
153 hashfz1 13988 . . . . . . . . . . . . . . . 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 15373 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℂ)
158105, 116fsumcl 15373 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) ∈ ℂ)
159119recnd 10934 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℂ)
160157, 158, 159subaddd 11280 . . . . . . . . . . . . 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 3102 . . . . . . . . 9 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
16561, 164syld 47 . . . . . . . 8 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
166165ex 412 . . . . . . 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 12345 . . . . 5 (𝑁 ∈ ℕ0 → (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
169168imp 406 . . . 4 ((𝑁 ∈ ℕ0𝑃 ∈ ℙ) → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))
170 oveq2 7263 . . . . . . 7 (𝑚 = 𝑀 → (1...𝑚) = (1...𝑀))
171170sumeq1d 15341 . . . . . 6 (𝑚 = 𝑀 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
172171eqeq2d 2749 . . . . 5 (𝑚 = 𝑀 → ((𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
173172rspcv 3547 . . . 4 (𝑀 ∈ (ℤ𝑁) → (∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
174169, 173syl5 34 . . 3 (𝑀 ∈ (ℤ𝑁) → ((𝑁 ∈ ℕ0𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
1751743impib 1114 . 2 ((𝑀 ∈ (ℤ𝑁) ∧ 𝑁 ∈ ℕ0𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
1761753com12 1121 1 ((𝑁 ∈ ℕ0𝑀 ∈ (ℤ𝑁) ∧ 𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 395  w3a 1085   = wceq 1539  wcel 2108  wne 2942  wral 3063  wss 3883  ifcif 4456   class class class wbr 5070  cfv 6418  (class class class)co 7255  Fincfn 8691  cr 10801  0cc0 10802  1c1 10803   + caddc 10805   · cmul 10807   < clt 10940  cle 10941  cmin 11135   / cdiv 11562  cn 11903  2c2 11958  0cn0 12163  cz 12249  cuz 12511  ...cfz 13168  cfl 13438  cexp 13710  !cfa 13915  chash 13972  Σcsu 15325  cdvds 15891  cprime 16304   pCnt cpc 16465
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-rep 5205  ax-sep 5218  ax-nul 5225  ax-pow 5283  ax-pr 5347  ax-un 7566  ax-inf2 9329  ax-cnex 10858  ax-resscn 10859  ax-1cn 10860  ax-icn 10861  ax-addcl 10862  ax-addrcl 10863  ax-mulcl 10864  ax-mulrcl 10865  ax-mulcom 10866  ax-addass 10867  ax-mulass 10868  ax-distr 10869  ax-i2m1 10870  ax-1ne0 10871  ax-1rid 10872  ax-rnegex 10873  ax-rrecex 10874  ax-cnre 10875  ax-pre-lttri 10876  ax-pre-lttrn 10877  ax-pre-ltadd 10878  ax-pre-mulgt0 10879  ax-pre-sup 10880
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3or 1086  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-nel 3049  df-ral 3068  df-rex 3069  df-reu 3070  df-rmo 3071  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-pss 3902  df-nul 4254  df-if 4457  df-pw 4532  df-sn 4559  df-pr 4561  df-tp 4563  df-op 4565  df-uni 4837  df-int 4877  df-iun 4923  df-br 5071  df-opab 5133  df-mpt 5154  df-tr 5188  df-id 5480  df-eprel 5486  df-po 5494  df-so 5495  df-fr 5535  df-se 5536  df-we 5537  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-pred 6191  df-ord 6254  df-on 6255  df-lim 6256  df-suc 6257  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425  df-fv 6426  df-isom 6427  df-riota 7212  df-ov 7258  df-oprab 7259  df-mpo 7260  df-om 7688  df-1st 7804  df-2nd 7805  df-frecs 8068  df-wrecs 8099  df-recs 8173  df-rdg 8212  df-1o 8267  df-2o 8268  df-er 8456  df-en 8692  df-dom 8693  df-sdom 8694  df-fin 8695  df-sup 9131  df-inf 9132  df-oi 9199  df-card 9628  df-pnf 10942  df-mnf 10943  df-xr 10944  df-ltxr 10945  df-le 10946  df-sub 11137  df-neg 11138  df-div 11563  df-nn 11904  df-2 11966  df-3 11967  df-n0 12164  df-z 12250  df-uz 12512  df-q 12618  df-rp 12660  df-fz 13169  df-fzo 13312  df-fl 13440  df-mod 13518  df-seq 13650  df-exp 13711  df-fac 13916  df-hash 13973  df-cj 14738  df-re 14739  df-im 14740  df-sqrt 14874  df-abs 14875  df-clim 15125  df-sum 15326  df-dvds 15892  df-gcd 16130  df-prm 16305  df-pc 16466
This theorem is referenced by:  pcbc  16529
  Copyright terms: Public domain W3C validator