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

Theorem pcfac 12295
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 5494 . . . . . . . 8 (𝑥 = 0 → (ℤ𝑥) = (ℤ‘0))
2 fveq2 5494 . . . . . . . . . 10 (𝑥 = 0 → (!‘𝑥) = (!‘0))
32oveq2d 5867 . . . . . . . . 9 (𝑥 = 0 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘0)))
4 fvoveq1 5874 . . . . . . . . . 10 (𝑥 = 0 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(0 / (𝑃𝑘))))
54sumeq2sdv 11326 . . . . . . . . 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 5494 . . . . . . . 8 (𝑥 = 𝑛 → (ℤ𝑥) = (ℤ𝑛))
10 fveq2 5494 . . . . . . . . . 10 (𝑥 = 𝑛 → (!‘𝑥) = (!‘𝑛))
1110oveq2d 5867 . . . . . . . . 9 (𝑥 = 𝑛 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘𝑛)))
12 fvoveq1 5874 . . . . . . . . . 10 (𝑥 = 𝑛 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(𝑛 / (𝑃𝑘))))
1312sumeq2sdv 11326 . . . . . . . . 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 5494 . . . . . . . 8 (𝑥 = (𝑛 + 1) → (ℤ𝑥) = (ℤ‘(𝑛 + 1)))
18 fveq2 5494 . . . . . . . . . 10 (𝑥 = (𝑛 + 1) → (!‘𝑥) = (!‘(𝑛 + 1)))
1918oveq2d 5867 . . . . . . . . 9 (𝑥 = (𝑛 + 1) → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘(𝑛 + 1))))
20 fvoveq1 5874 . . . . . . . . . 10 (𝑥 = (𝑛 + 1) → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘((𝑛 + 1) / (𝑃𝑘))))
2120sumeq2sdv 11326 . . . . . . . . 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 5494 . . . . . . . 8 (𝑥 = 𝑁 → (ℤ𝑥) = (ℤ𝑁))
26 fveq2 5494 . . . . . . . . . 10 (𝑥 = 𝑁 → (!‘𝑥) = (!‘𝑁))
2726oveq2d 5867 . . . . . . . . 9 (𝑥 = 𝑁 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘𝑁)))
28 fvoveq1 5874 . . . . . . . . . 10 (𝑥 = 𝑁 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(𝑁 / (𝑃𝑘))))
2928sumeq2sdv 11326 . . . . . . . . 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 9232 . . . . . . . . . 10 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → 1 ∈ ℤ)
34 eluzelz 9489 . . . . . . . . . . 11 (𝑚 ∈ (ℤ‘0) → 𝑚 ∈ ℤ)
3534adantl 275 . . . . . . . . . 10 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → 𝑚 ∈ ℤ)
3633, 35fzfigd 10380 . . . . . . . . 9 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (1...𝑚) ∈ Fin)
37 isumz 11345 . . . . . . . . . 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 9143 . . . . . . . . . 10 0 ∈ ℕ0
41 elfznn 10003 . . . . . . . . . . . . 13 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ ℕ)
4241nnnn0d 9181 . . . . . . . . . . . 12 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ ℕ0)
43 nn0uz 9514 . . . . . . . . . . . 12 0 = (ℤ‘0)
4442, 43eleqtrdi 2263 . . . . . . . . . . 11 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ (ℤ‘0))
4544adantl 275 . . . . . . . . . 10 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → 𝑘 ∈ (ℤ‘0))
46 simpll 524 . . . . . . . . . 10 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → 𝑃 ∈ ℙ)
47 pcfaclem 12294 . . . . . . . . . 10 ((0 ∈ ℕ0𝑘 ∈ (ℤ‘0) ∧ 𝑃 ∈ ℙ) → (⌊‘(0 / (𝑃𝑘))) = 0)
4840, 45, 46, 47mp3an2i 1337 . . . . . . . . 9 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(0 / (𝑃𝑘))) = 0)
4948sumeq2dv 11324 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)0)
50 fac0 10655 . . . . . . . . . . 11 (!‘0) = 1
5150oveq2i 5862 . . . . . . . . . 10 (𝑃 pCnt (!‘0)) = (𝑃 pCnt 1)
52 pc1 12252 . . . . . . . . . 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 9225 . . . . . . . . . . . 12 (𝑛 ∈ ℕ0𝑛 ∈ ℤ)
5857adantr 274 . . . . . . . . . . 11 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → 𝑛 ∈ ℤ)
59 uzid 9494 . . . . . . . . . . 11 (𝑛 ∈ ℤ → 𝑛 ∈ (ℤ𝑛))
60 peano2uz 9535 . . . . . . . . . . 11 (𝑛 ∈ (ℤ𝑛) → (𝑛 + 1) ∈ (ℤ𝑛))
6158, 59, 603syl 17 . . . . . . . . . 10 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (𝑛 + 1) ∈ (ℤ𝑛))
62 uzss 9500 . . . . . . . . . 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 5858 . . . . . . . . . . 11 ((𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))))
66 simpll 524 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑛 ∈ ℕ0)
67 facp1 10657 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (!‘(𝑛 + 1)) = ((!‘𝑛) · (𝑛 + 1)))
6866, 67syl 14 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (!‘(𝑛 + 1)) = ((!‘𝑛) · (𝑛 + 1)))
6968oveq2d 5867 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (!‘(𝑛 + 1))) = (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))))
70 simplr 525 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ ℙ)
71 faccl 10662 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (!‘𝑛) ∈ ℕ)
72 nnz 9224 . . . . . . . . . . . . . . . 16 ((!‘𝑛) ∈ ℕ → (!‘𝑛) ∈ ℤ)
73 nnne0 8899 . . . . . . . . . . . . . . . 16 ((!‘𝑛) ∈ ℕ → (!‘𝑛) ≠ 0)
7472, 73jca 304 . . . . . . . . . . . . . . 15 ((!‘𝑛) ∈ ℕ → ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0))
7566, 71, 743syl 17 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0))
76 nn0p1nn 9167 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (𝑛 + 1) ∈ ℕ)
77 nnz 9224 . . . . . . . . . . . . . . . 16 ((𝑛 + 1) ∈ ℕ → (𝑛 + 1) ∈ ℤ)
78 nnne0 8899 . . . . . . . . . . . . . . . 16 ((𝑛 + 1) ∈ ℕ → (𝑛 + 1) ≠ 0)
7977, 78jca 304 . . . . . . . . . . . . . . 15 ((𝑛 + 1) ∈ ℕ → ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0))
8066, 76, 793syl 17 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0))
81 pcmul 12248 . . . . . . . . . . . . . 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 9325 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℤ)
86 prmnn 12057 . . . . . . . . . . . . . . . . . . 19 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
8786ad2antlr 486 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ ℕ)
88 nnexpcl 10482 . . . . . . . . . . . . . . . . . 18 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → (𝑃𝑘) ∈ ℕ)
8987, 42, 88syl2an 287 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑃𝑘) ∈ ℕ)
90 fldivp1 12293 . . . . . . . . . . . . . . . . 17 ((𝑛 ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0))
9185, 89, 90syl2anc 409 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0))
92 elfzuz 9970 . . . . . . . . . . . . . . . . . . 19 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ (ℤ‘1))
9366, 76syl 14 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℕ)
9470, 93pccld 12247 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℕ0)
9594nn0zd 9325 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℤ)
96 elfz5 9966 . . . . . . . . . . . . . . . . . . 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 9326 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℤ)
10142adantl 275 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑘 ∈ ℕ0)
102 pcdvdsb 12266 . . . . . . . . . . . . . . . . . . 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 3546 . . . . . . . . . . . . . . . 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 11324 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
108 1zzd 9232 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 1 ∈ ℤ)
109 eluzelz 9489 . . . . . . . . . . . . . . . . 17 (𝑚 ∈ (ℤ‘(𝑛 + 1)) → 𝑚 ∈ ℤ)
110109adantl 275 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ ℤ)
111108, 110fzfigd 10380 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (1...𝑚) ∈ Fin)
112 znq 9576 . . . . . . . . . . . . . . . . . 18 (((𝑛 + 1) ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → ((𝑛 + 1) / (𝑃𝑘)) ∈ ℚ)
113100, 89, 112syl2anc 409 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((𝑛 + 1) / (𝑃𝑘)) ∈ ℚ)
114113flqcld 10226 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℤ)
115114zcnd 9328 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℂ)
116 znq 9576 . . . . . . . . . . . . . . . . . 18 ((𝑛 ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → (𝑛 / (𝑃𝑘)) ∈ ℚ)
11785, 89, 116syl2anc 409 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 / (𝑃𝑘)) ∈ ℚ)
118117flqcld 10226 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(𝑛 / (𝑃𝑘))) ∈ ℤ)
119118zcnd 9328 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(𝑛 / (𝑃𝑘))) ∈ ℂ)
120111, 115, 119fsumsub 11408 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) − Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
12194nn0red 9182 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℝ)
12266nn0red 9182 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑛 ∈ ℝ)
123 peano2re 8048 . . . . . . . . . . . . . . . . . . . 20 (𝑛 ∈ ℝ → (𝑛 + 1) ∈ ℝ)
124122, 123syl 14 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℝ)
125110zred 9327 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ ℝ)
12693nnzd 9326 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℤ)
127 zdcle 9281 . . . . . . . . . . . . . . . . . . . . 21 (((𝑃 pCnt (𝑛 + 1)) ∈ ℤ ∧ (𝑛 + 1) ∈ ℤ) → DECID (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1))
12895, 126, 127syl2anc 409 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → DECID (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1))
129 zletric 9249 . . . . . . . . . . . . . . . . . . . . . . 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 9181 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℕ0)
133 pcdvdsb 12266 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑃 ∈ ℙ ∧ (𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ∈ ℕ0) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1)))
13470, 126, 132, 133syl3anc 1233 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1)))
13587, 132nnexpcld 10624 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℕ)
136135nnzd 9326 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℤ)
137 dvdsle 11797 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑃↑(𝑛 + 1)) ∈ ℤ ∧ (𝑛 + 1) ∈ ℕ) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → (𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1)))
138136, 93, 137syl2anc 409 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → (𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1)))
139135nnred 8884 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℝ)
140139, 124lenltd 8030 . . . . . . . . . . . . . . . . . . . . . . 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 12078 . . . . . . . . . . . . . . . . . . . . . 22 (𝑃 ∈ ℙ → 𝑃 ∈ (ℤ‘2))
145144ad2antlr 486 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ (ℤ‘2))
146 bernneq3 10591 . . . . . . . . . . . . . . . . . . . . 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 9492 . . . . . . . . . . . . . . . . . . . 20 (𝑚 ∈ (ℤ‘(𝑛 + 1)) → (𝑛 + 1) ≤ 𝑚)
151150adantl 275 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ≤ 𝑚)
152121, 124, 125, 149, 151letrd 8036 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚)
153 eluz 9493 . . . . . . . . . . . . . . . . . . 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 10013 . . . . . . . . . . . . . . . . 17 (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) → (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚))
157155, 156syl 14 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚))
158 elfzelz 9974 . . . . . . . . . . . . . . . . . . 19 (𝑗 ∈ (1...𝑚) → 𝑗 ∈ ℤ)
159158adantl 275 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → 𝑗 ∈ ℤ)
160 1zzd 9232 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → 1 ∈ ℤ)
16195adantr 274 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → (𝑃 pCnt (𝑛 + 1)) ∈ ℤ)
162 fzdcel 9989 . . . . . . . . . . . . . . . . . 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 12292 . . . . . . . . . . . . . . . 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 10710 . . . . . . . . . . . . . . . 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 11356 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℂ)
172111, 119fsumcl 11356 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) ∈ ℂ)
17394nn0cnd 9183 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℂ)
174171, 172, 173subaddd 8241 . . . . . . . . . . . . 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 9319 . . . . 5 (𝑁 ∈ ℕ0 → (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
183182imp 123 . . . 4 ((𝑁 ∈ ℕ0𝑃 ∈ ℙ) → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))
184 oveq2 5859 . . . . . . 7 (𝑚 = 𝑀 → (1...𝑚) = (1...𝑀))
185184sumeq1d 11322 . . . . . 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 3525   class class class wbr 3987  cfv 5196  (class class class)co 5851  Fincfn 6716  cr 7766  0cc0 7767  1c1 7768   + caddc 7770   · cmul 7772   < clt 7947  cle 7948  cmin 8083   / cdiv 8582  cn 8871  2c2 8922  0cn0 9128  cz 9205  cuz 9480  cq 9571  ...cfz 9958  cfl 10217  cexp 10468  !cfa 10652  chash 10702  Σcsu 11309  cdvds 11742  cprime 12054   pCnt cpc 12231
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 4102  ax-sep 4105  ax-nul 4113  ax-pow 4158  ax-pr 4192  ax-un 4416  ax-setind 4519  ax-iinf 4570  ax-cnex 7858  ax-resscn 7859  ax-1cn 7860  ax-1re 7861  ax-icn 7862  ax-addcl 7863  ax-addrcl 7864  ax-mulcl 7865  ax-mulrcl 7866  ax-addcom 7867  ax-mulcom 7868  ax-addass 7869  ax-mulass 7870  ax-distr 7871  ax-i2m1 7872  ax-0lt1 7873  ax-1rid 7874  ax-0id 7875  ax-rnegex 7876  ax-precex 7877  ax-cnre 7878  ax-pre-ltirr 7879  ax-pre-ltwlin 7880  ax-pre-lttrn 7881  ax-pre-apti 7882  ax-pre-ltadd 7883  ax-pre-mulgt0 7884  ax-pre-mulext 7885  ax-arch 7886  ax-caucvg 7887
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 3526  df-pw 3566  df-sn 3587  df-pr 3588  df-op 3590  df-uni 3795  df-int 3830  df-iun 3873  df-br 3988  df-opab 4049  df-mpt 4050  df-tr 4086  df-id 4276  df-po 4279  df-iso 4280  df-iord 4349  df-on 4351  df-ilim 4352  df-suc 4354  df-iom 4573  df-xp 4615  df-rel 4616  df-cnv 4617  df-co 4618  df-dm 4619  df-rn 4620  df-res 4621  df-ima 4622  df-iota 5158  df-fun 5198  df-fn 5199  df-f 5200  df-f1 5201  df-fo 5202  df-f1o 5203  df-fv 5204  df-isom 5205  df-riota 5807  df-ov 5854  df-oprab 5855  df-mpo 5856  df-1st 6117  df-2nd 6118  df-recs 6282  df-irdg 6347  df-frec 6368  df-1o 6393  df-2o 6394  df-oadd 6397  df-er 6511  df-en 6717  df-dom 6718  df-fin 6719  df-sup 6959  df-inf 6960  df-pnf 7949  df-mnf 7950  df-xr 7951  df-ltxr 7952  df-le 7953  df-sub 8085  df-neg 8086  df-reap 8487  df-ap 8494  df-div 8583  df-inn 8872  df-2 8930  df-3 8931  df-4 8932  df-n0 9129  df-z 9206  df-uz 9481  df-q 9572  df-rp 9604  df-fz 9959  df-fzo 10092  df-fl 10219  df-mod 10272  df-seqfrec 10395  df-exp 10469  df-fac 10653  df-ihash 10703  df-cj 10799  df-re 10800  df-im 10801  df-rsqrt 10955  df-abs 10956  df-clim 11235  df-sumdc 11310  df-dvds 11743  df-gcd 11891  df-prm 12055  df-pc 12232
This theorem is referenced by:  pcbc  12296
  Copyright terms: Public domain W3C validator