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

Theorem pcfac 12280
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 5486 . . . . . . . 8 (𝑥 = 0 → (ℤ𝑥) = (ℤ‘0))
2 fveq2 5486 . . . . . . . . . 10 (𝑥 = 0 → (!‘𝑥) = (!‘0))
32oveq2d 5858 . . . . . . . . 9 (𝑥 = 0 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘0)))
4 fvoveq1 5865 . . . . . . . . . 10 (𝑥 = 0 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(0 / (𝑃𝑘))))
54sumeq2sdv 11311 . . . . . . . . 9 (𝑥 = 0 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
63, 5eqeq12d 2180 . . . . . . . 8 (𝑥 = 0 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘)))))
71, 6raleqbidv 2673 . . . . . . 7 (𝑥 = 0 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘)))))
87imbi2d 229 . . . . . 6 (𝑥 = 0 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))))
9 fveq2 5486 . . . . . . . 8 (𝑥 = 𝑛 → (ℤ𝑥) = (ℤ𝑛))
10 fveq2 5486 . . . . . . . . . 10 (𝑥 = 𝑛 → (!‘𝑥) = (!‘𝑛))
1110oveq2d 5858 . . . . . . . . 9 (𝑥 = 𝑛 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘𝑛)))
12 fvoveq1 5865 . . . . . . . . . 10 (𝑥 = 𝑛 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(𝑛 / (𝑃𝑘))))
1312sumeq2sdv 11311 . . . . . . . . 9 (𝑥 = 𝑛 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))))
1411, 13eqeq12d 2180 . . . . . . . 8 (𝑥 = 𝑛 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
159, 14raleqbidv 2673 . . . . . . 7 (𝑥 = 𝑛 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
1615imbi2d 229 . . . . . 6 (𝑥 = 𝑛 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))))))
17 fveq2 5486 . . . . . . . 8 (𝑥 = (𝑛 + 1) → (ℤ𝑥) = (ℤ‘(𝑛 + 1)))
18 fveq2 5486 . . . . . . . . . 10 (𝑥 = (𝑛 + 1) → (!‘𝑥) = (!‘(𝑛 + 1)))
1918oveq2d 5858 . . . . . . . . 9 (𝑥 = (𝑛 + 1) → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘(𝑛 + 1))))
20 fvoveq1 5865 . . . . . . . . . 10 (𝑥 = (𝑛 + 1) → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘((𝑛 + 1) / (𝑃𝑘))))
2120sumeq2sdv 11311 . . . . . . . . 9 (𝑥 = (𝑛 + 1) → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))
2219, 21eqeq12d 2180 . . . . . . . 8 (𝑥 = (𝑛 + 1) → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
2317, 22raleqbidv 2673 . . . . . . 7 (𝑥 = (𝑛 + 1) → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘)))))
2423imbi2d 229 . . . . . 6 (𝑥 = (𝑛 + 1) → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘(𝑛 + 1))) = Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))))))
25 fveq2 5486 . . . . . . . 8 (𝑥 = 𝑁 → (ℤ𝑥) = (ℤ𝑁))
26 fveq2 5486 . . . . . . . . . 10 (𝑥 = 𝑁 → (!‘𝑥) = (!‘𝑁))
2726oveq2d 5858 . . . . . . . . 9 (𝑥 = 𝑁 → (𝑃 pCnt (!‘𝑥)) = (𝑃 pCnt (!‘𝑁)))
28 fvoveq1 5865 . . . . . . . . . 10 (𝑥 = 𝑁 → (⌊‘(𝑥 / (𝑃𝑘))) = (⌊‘(𝑁 / (𝑃𝑘))))
2928sumeq2sdv 11311 . . . . . . . . 9 (𝑥 = 𝑁 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))
3027, 29eqeq12d 2180 . . . . . . . 8 (𝑥 = 𝑁 → ((𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
3125, 30raleqbidv 2673 . . . . . . 7 (𝑥 = 𝑁 → (∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘))) ↔ ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
3231imbi2d 229 . . . . . 6 (𝑥 = 𝑁 → ((𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑥)(𝑃 pCnt (!‘𝑥)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑥 / (𝑃𝑘)))) ↔ (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))))
33 1zzd 9218 . . . . . . . . . 10 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → 1 ∈ ℤ)
34 eluzelz 9475 . . . . . . . . . . 11 (𝑚 ∈ (ℤ‘0) → 𝑚 ∈ ℤ)
3534adantl 275 . . . . . . . . . 10 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → 𝑚 ∈ ℤ)
3633, 35fzfigd 10366 . . . . . . . . 9 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (1...𝑚) ∈ Fin)
37 isumz 11330 . . . . . . . . . 10 (((1 ∈ ℤ ∧ (1...𝑚) ⊆ (ℤ‘1) ∧ ∀𝑗 ∈ (ℤ‘1)DECID 𝑗 ∈ (1...𝑚)) ∨ (1...𝑚) ∈ Fin) → Σ𝑘 ∈ (1...𝑚)0 = 0)
3837olcs 726 . . . . . . . . 9 ((1...𝑚) ∈ Fin → Σ𝑘 ∈ (1...𝑚)0 = 0)
3936, 38syl 14 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → Σ𝑘 ∈ (1...𝑚)0 = 0)
40 0nn0 9129 . . . . . . . . . 10 0 ∈ ℕ0
41 elfznn 9989 . . . . . . . . . . . . 13 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ ℕ)
4241nnnn0d 9167 . . . . . . . . . . . 12 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ ℕ0)
43 nn0uz 9500 . . . . . . . . . . . 12 0 = (ℤ‘0)
4442, 43eleqtrdi 2259 . . . . . . . . . . 11 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ (ℤ‘0))
4544adantl 275 . . . . . . . . . 10 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → 𝑘 ∈ (ℤ‘0))
46 simpll 519 . . . . . . . . . 10 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → 𝑃 ∈ ℙ)
47 pcfaclem 12279 . . . . . . . . . 10 ((0 ∈ ℕ0𝑘 ∈ (ℤ‘0) ∧ 𝑃 ∈ ℙ) → (⌊‘(0 / (𝑃𝑘))) = 0)
4840, 45, 46, 47mp3an2i 1332 . . . . . . . . 9 (((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(0 / (𝑃𝑘))) = 0)
4948sumeq2dv 11309 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑚)0)
50 fac0 10641 . . . . . . . . . . 11 (!‘0) = 1
5150oveq2i 5853 . . . . . . . . . 10 (𝑃 pCnt (!‘0)) = (𝑃 pCnt 1)
52 pc1 12237 . . . . . . . . . 10 (𝑃 ∈ ℙ → (𝑃 pCnt 1) = 0)
5351, 52syl5eq 2211 . . . . . . . . 9 (𝑃 ∈ ℙ → (𝑃 pCnt (!‘0)) = 0)
5453adantr 274 . . . . . . . 8 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (𝑃 pCnt (!‘0)) = 0)
5539, 49, 543eqtr4rd 2209 . . . . . . 7 ((𝑃 ∈ ℙ ∧ 𝑚 ∈ (ℤ‘0)) → (𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
5655ralrimiva 2539 . . . . . 6 (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ‘0)(𝑃 pCnt (!‘0)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(0 / (𝑃𝑘))))
57 nn0z 9211 . . . . . . . . . . . 12 (𝑛 ∈ ℕ0𝑛 ∈ ℤ)
5857adantr 274 . . . . . . . . . . 11 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → 𝑛 ∈ ℤ)
59 uzid 9480 . . . . . . . . . . 11 (𝑛 ∈ ℤ → 𝑛 ∈ (ℤ𝑛))
60 peano2uz 9521 . . . . . . . . . . 11 (𝑛 ∈ (ℤ𝑛) → (𝑛 + 1) ∈ (ℤ𝑛))
6158, 59, 603syl 17 . . . . . . . . . 10 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (𝑛 + 1) ∈ (ℤ𝑛))
62 uzss 9486 . . . . . . . . . 10 ((𝑛 + 1) ∈ (ℤ𝑛) → (ℤ‘(𝑛 + 1)) ⊆ (ℤ𝑛))
63 ssralv 3206 . . . . . . . . . 10 ((ℤ‘(𝑛 + 1)) ⊆ (ℤ𝑛) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
6461, 62, 633syl 17 . . . . . . . . 9 ((𝑛 ∈ ℕ0𝑃 ∈ ℙ) → (∀𝑚 ∈ (ℤ𝑛)(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ∀𝑚 ∈ (ℤ‘(𝑛 + 1))(𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
65 oveq1 5849 . . . . . . . . . . 11 ((𝑃 pCnt (!‘𝑛)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) → ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) + (𝑃 pCnt (𝑛 + 1))))
66 simpll 519 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑛 ∈ ℕ0)
67 facp1 10643 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (!‘(𝑛 + 1)) = ((!‘𝑛) · (𝑛 + 1)))
6866, 67syl 14 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (!‘(𝑛 + 1)) = ((!‘𝑛) · (𝑛 + 1)))
6968oveq2d 5858 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (!‘(𝑛 + 1))) = (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))))
70 simplr 520 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ ℙ)
71 faccl 10648 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (!‘𝑛) ∈ ℕ)
72 nnz 9210 . . . . . . . . . . . . . . . 16 ((!‘𝑛) ∈ ℕ → (!‘𝑛) ∈ ℤ)
73 nnne0 8885 . . . . . . . . . . . . . . . 16 ((!‘𝑛) ∈ ℕ → (!‘𝑛) ≠ 0)
7472, 73jca 304 . . . . . . . . . . . . . . 15 ((!‘𝑛) ∈ ℕ → ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0))
7566, 71, 743syl 17 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0))
76 nn0p1nn 9153 . . . . . . . . . . . . . . 15 (𝑛 ∈ ℕ0 → (𝑛 + 1) ∈ ℕ)
77 nnz 9210 . . . . . . . . . . . . . . . 16 ((𝑛 + 1) ∈ ℕ → (𝑛 + 1) ∈ ℤ)
78 nnne0 8885 . . . . . . . . . . . . . . . 16 ((𝑛 + 1) ∈ ℕ → (𝑛 + 1) ≠ 0)
7977, 78jca 304 . . . . . . . . . . . . . . 15 ((𝑛 + 1) ∈ ℕ → ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0))
8066, 76, 793syl 17 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0))
81 pcmul 12233 . . . . . . . . . . . . . 14 ((𝑃 ∈ ℙ ∧ ((!‘𝑛) ∈ ℤ ∧ (!‘𝑛) ≠ 0) ∧ ((𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ≠ 0)) → (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))) = ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))))
8270, 75, 80, 81syl3anc 1228 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt ((!‘𝑛) · (𝑛 + 1))) = ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))))
8369, 82eqtr2d 2199 . . . . . . . . . . . 12 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃 pCnt (!‘𝑛)) + (𝑃 pCnt (𝑛 + 1))) = (𝑃 pCnt (!‘(𝑛 + 1))))
8466adantr 274 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℕ0)
8584nn0zd 9311 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑛 ∈ ℤ)
86 prmnn 12042 . . . . . . . . . . . . . . . . . . 19 (𝑃 ∈ ℙ → 𝑃 ∈ ℕ)
8786ad2antlr 481 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ ℕ)
88 nnexpcl 10468 . . . . . . . . . . . . . . . . . 18 ((𝑃 ∈ ℕ ∧ 𝑘 ∈ ℕ0) → (𝑃𝑘) ∈ ℕ)
8987, 42, 88syl2an 287 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑃𝑘) ∈ ℕ)
90 fldivp1 12278 . . . . . . . . . . . . . . . . 17 ((𝑛 ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0))
9185, 89, 90syl2anc 409 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0))
92 elfzuz 9956 . . . . . . . . . . . . . . . . . . 19 (𝑘 ∈ (1...𝑚) → 𝑘 ∈ (ℤ‘1))
9366, 76syl 14 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℕ)
9470, 93pccld 12232 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℕ0)
9594nn0zd 9311 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℤ)
96 elfz5 9952 . . . . . . . . . . . . . . . . . . 19 ((𝑘 ∈ (ℤ‘1) ∧ (𝑃 pCnt (𝑛 + 1)) ∈ ℤ) → (𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))) ↔ 𝑘 ≤ (𝑃 pCnt (𝑛 + 1))))
9792, 95, 96syl2anr 288 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))) ↔ 𝑘 ≤ (𝑃 pCnt (𝑛 + 1))))
98 simpllr 524 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑃 ∈ ℙ)
9984, 76syl 14 . . . . . . . . . . . . . . . . . . . 20 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℕ)
10099nnzd 9312 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 + 1) ∈ ℤ)
10142adantl 275 . . . . . . . . . . . . . . . . . . 19 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → 𝑘 ∈ ℕ0)
102 pcdvdsb 12251 . . . . . . . . . . . . . . . . . . 19 ((𝑃 ∈ ℙ ∧ (𝑛 + 1) ∈ ℤ ∧ 𝑘 ∈ ℕ0) → (𝑘 ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃𝑘) ∥ (𝑛 + 1)))
10398, 100, 101, 102syl3anc 1228 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑘 ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃𝑘) ∥ (𝑛 + 1)))
10497, 103bitr2d 188 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((𝑃𝑘) ∥ (𝑛 + 1) ↔ 𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1)))))
105104ifbid 3541 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → if((𝑃𝑘) ∥ (𝑛 + 1), 1, 0) = if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
10691, 105eqtrd 2198 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
107106sumeq2dv 11309 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0))
108 1zzd 9218 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 1 ∈ ℤ)
109 eluzelz 9475 . . . . . . . . . . . . . . . . 17 (𝑚 ∈ (ℤ‘(𝑛 + 1)) → 𝑚 ∈ ℤ)
110109adantl 275 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ ℤ)
111108, 110fzfigd 10366 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (1...𝑚) ∈ Fin)
112 znq 9562 . . . . . . . . . . . . . . . . . 18 (((𝑛 + 1) ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → ((𝑛 + 1) / (𝑃𝑘)) ∈ ℚ)
113100, 89, 112syl2anc 409 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → ((𝑛 + 1) / (𝑃𝑘)) ∈ ℚ)
114113flqcld 10212 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℤ)
115114zcnd 9314 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℂ)
116 znq 9562 . . . . . . . . . . . . . . . . . 18 ((𝑛 ∈ ℤ ∧ (𝑃𝑘) ∈ ℕ) → (𝑛 / (𝑃𝑘)) ∈ ℚ)
11785, 89, 116syl2anc 409 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (𝑛 / (𝑃𝑘)) ∈ ℚ)
118117flqcld 10212 . . . . . . . . . . . . . . . 16 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(𝑛 / (𝑃𝑘))) ∈ ℤ)
119118zcnd 9314 . . . . . . . . . . . . . . 15 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑘 ∈ (1...𝑚)) → (⌊‘(𝑛 / (𝑃𝑘))) ∈ ℂ)
120111, 115, 119fsumsub 11393 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)((⌊‘((𝑛 + 1) / (𝑃𝑘))) − (⌊‘(𝑛 / (𝑃𝑘)))) = (Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) − Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))))
12194nn0red 9168 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℝ)
12266nn0red 9168 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑛 ∈ ℝ)
123 peano2re 8034 . . . . . . . . . . . . . . . . . . . 20 (𝑛 ∈ ℝ → (𝑛 + 1) ∈ ℝ)
124122, 123syl 14 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℝ)
125110zred 9313 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑚 ∈ ℝ)
12693nnzd 9312 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℤ)
127 zdcle 9267 . . . . . . . . . . . . . . . . . . . . 21 (((𝑃 pCnt (𝑛 + 1)) ∈ ℤ ∧ (𝑛 + 1) ∈ ℤ) → DECID (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1))
12895, 126, 127syl2anc 409 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → DECID (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1))
129 zletric 9235 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑃 pCnt (𝑛 + 1)) ∈ ℤ ∧ (𝑛 + 1) ∈ ℤ) → ((𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) ∨ (𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1))))
13095, 126, 129syl2anc 409 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) ∨ (𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1))))
131130ord 714 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (¬ (𝑃 pCnt (𝑛 + 1)) ≤ (𝑛 + 1) → (𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1))))
13293nnnn0d 9167 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ∈ ℕ0)
133 pcdvdsb 12251 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑃 ∈ ℙ ∧ (𝑛 + 1) ∈ ℤ ∧ (𝑛 + 1) ∈ ℕ0) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1)))
13470, 126, 132, 133syl3anc 1228 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑛 + 1) ≤ (𝑃 pCnt (𝑛 + 1)) ↔ (𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1)))
13587, 132nnexpcld 10610 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℕ)
136135nnzd 9312 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℤ)
137 dvdsle 11782 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑃↑(𝑛 + 1)) ∈ ℤ ∧ (𝑛 + 1) ∈ ℕ) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → (𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1)))
138136, 93, 137syl2anc 409 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ((𝑃↑(𝑛 + 1)) ∥ (𝑛 + 1) → (𝑃↑(𝑛 + 1)) ≤ (𝑛 + 1)))
139135nnred 8870 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃↑(𝑛 + 1)) ∈ ℝ)
140139, 124lenltd 8016 . . . . . . . . . . . . . . . . . . . . . . 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 12063 . . . . . . . . . . . . . . . . . . . . . 22 (𝑃 ∈ ℙ → 𝑃 ∈ (ℤ‘2))
145144ad2antlr 481 . . . . . . . . . . . . . . . . . . . . 21 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → 𝑃 ∈ (ℤ‘2))
146 bernneq3 10577 . . . . . . . . . . . . . . . . . . . . 21 ((𝑃 ∈ (ℤ‘2) ∧ (𝑛 + 1) ∈ ℕ0) → (𝑛 + 1) < (𝑃↑(𝑛 + 1)))
147145, 132, 146syl2anc 409 . . . . . . . . . . . . . . . . . . . 20 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) < (𝑃↑(𝑛 + 1)))
148 condc 843 . . . . . . . . . . . . . . . . . . . 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 9478 . . . . . . . . . . . . . . . . . . . 20 (𝑚 ∈ (ℤ‘(𝑛 + 1)) → (𝑛 + 1) ≤ 𝑚)
151150adantl 275 . . . . . . . . . . . . . . . . . . 19 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑛 + 1) ≤ 𝑚)
152121, 124, 125, 149, 151letrd 8022 . . . . . . . . . . . . . . . . . 18 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ≤ 𝑚)
153 eluz 9479 . . . . . . . . . . . . . . . . . . 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 9999 . . . . . . . . . . . . . . . . 17 (𝑚 ∈ (ℤ‘(𝑃 pCnt (𝑛 + 1))) → (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚))
157155, 156syl 14 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (1...(𝑃 pCnt (𝑛 + 1))) ⊆ (1...𝑚))
158 elfzelz 9960 . . . . . . . . . . . . . . . . . . 19 (𝑗 ∈ (1...𝑚) → 𝑗 ∈ ℤ)
159158adantl 275 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → 𝑗 ∈ ℤ)
160 1zzd 9218 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → 1 ∈ ℤ)
16195adantr 274 . . . . . . . . . . . . . . . . . 18 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → (𝑃 pCnt (𝑛 + 1)) ∈ ℤ)
162 fzdcel 9975 . . . . . . . . . . . . . . . . . 18 ((𝑗 ∈ ℤ ∧ 1 ∈ ℤ ∧ (𝑃 pCnt (𝑛 + 1)) ∈ ℤ) → DECID 𝑗 ∈ (1...(𝑃 pCnt (𝑛 + 1))))
163159, 160, 161, 162syl3anc 1228 . . . . . . . . . . . . . . . . 17 ((((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) ∧ 𝑗 ∈ (1...𝑚)) → DECID 𝑗 ∈ (1...(𝑃 pCnt (𝑛 + 1))))
164163ralrimiva 2539 . . . . . . . . . . . . . . . 16 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → ∀𝑗 ∈ (1...𝑚)DECID 𝑗 ∈ (1...(𝑃 pCnt (𝑛 + 1))))
165 sumhashdc 12277 . . . . . . . . . . . . . . . 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 1228 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0) = (♯‘(1...(𝑃 pCnt (𝑛 + 1)))))
167 hashfz1 10696 . . . . . . . . . . . . . . . 16 ((𝑃 pCnt (𝑛 + 1)) ∈ ℕ0 → (♯‘(1...(𝑃 pCnt (𝑛 + 1)))) = (𝑃 pCnt (𝑛 + 1)))
16894, 167syl 14 . . . . . . . . . . . . . . 15 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (♯‘(1...(𝑃 pCnt (𝑛 + 1)))) = (𝑃 pCnt (𝑛 + 1)))
169166, 168eqtrd 2198 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)if(𝑘 ∈ (1...(𝑃 pCnt (𝑛 + 1))), 1, 0) = (𝑃 pCnt (𝑛 + 1)))
170107, 120, 1693eqtr3d 2206 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) − Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘)))) = (𝑃 pCnt (𝑛 + 1)))
171111, 115fsumcl 11341 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)(⌊‘((𝑛 + 1) / (𝑃𝑘))) ∈ ℂ)
172111, 119fsumcl 11341 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑛 / (𝑃𝑘))) ∈ ℂ)
17394nn0cnd 9169 . . . . . . . . . . . . . 14 (((𝑛 ∈ ℕ0𝑃 ∈ ℙ) ∧ 𝑚 ∈ (ℤ‘(𝑛 + 1))) → (𝑃 pCnt (𝑛 + 1)) ∈ ℂ)
174171, 172, 173subaddd 8227 . . . . . . . . . . . . 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 2180 . . . . . . . . . . 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 2533 . . . . . . . . 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 9305 . . . . 5 (𝑁 ∈ ℕ0 → (𝑃 ∈ ℙ → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘)))))
183182imp 123 . . . 4 ((𝑁 ∈ ℕ0𝑃 ∈ ℙ) → ∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))))
184 oveq2 5850 . . . . . . 7 (𝑚 = 𝑀 → (1...𝑚) = (1...𝑀))
185184sumeq1d 11307 . . . . . 6 (𝑚 = 𝑀 → Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
186185eqeq2d 2177 . . . . 5 (𝑚 = 𝑀 → ((𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) ↔ (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
187186rspcv 2826 . . . 4 (𝑀 ∈ (ℤ𝑁) → (∀𝑚 ∈ (ℤ𝑁)(𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑚)(⌊‘(𝑁 / (𝑃𝑘))) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
188183, 187syl5 32 . . 3 (𝑀 ∈ (ℤ𝑁) → ((𝑁 ∈ ℕ0𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘)))))
1891883impib 1191 . 2 ((𝑀 ∈ (ℤ𝑁) ∧ 𝑁 ∈ ℕ0𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
1901893com12 1197 1 ((𝑁 ∈ ℕ0𝑀 ∈ (ℤ𝑁) ∧ 𝑃 ∈ ℙ) → (𝑃 pCnt (!‘𝑁)) = Σ𝑘 ∈ (1...𝑀)(⌊‘(𝑁 / (𝑃𝑘))))
Colors of variables: wff set class
Syntax hints:  ¬ wn 3  wi 4  wa 103  wb 104  wo 698  DECID wdc 824  w3a 968   = wceq 1343  wcel 2136  wne 2336  wral 2444  wss 3116  ifcif 3520   class class class wbr 3982  cfv 5188  (class class class)co 5842  Fincfn 6706  cr 7752  0cc0 7753  1c1 7754   + caddc 7756   · cmul 7758   < clt 7933  cle 7934  cmin 8069   / cdiv 8568  cn 8857  2c2 8908  0cn0 9114  cz 9191  cuz 9466  cq 9557  ...cfz 9944  cfl 10203  cexp 10454  !cfa 10638  chash 10688  Σcsu 11294  cdvds 11727  cprime 12039   pCnt cpc 12216
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 604  ax-in2 605  ax-io 699  ax-5 1435  ax-7 1436  ax-gen 1437  ax-ie1 1481  ax-ie2 1482  ax-8 1492  ax-10 1493  ax-11 1494  ax-i12 1495  ax-bndl 1497  ax-4 1498  ax-17 1514  ax-i9 1518  ax-ial 1522  ax-i5r 1523  ax-13 2138  ax-14 2139  ax-ext 2147  ax-coll 4097  ax-sep 4100  ax-nul 4108  ax-pow 4153  ax-pr 4187  ax-un 4411  ax-setind 4514  ax-iinf 4565  ax-cnex 7844  ax-resscn 7845  ax-1cn 7846  ax-1re 7847  ax-icn 7848  ax-addcl 7849  ax-addrcl 7850  ax-mulcl 7851  ax-mulrcl 7852  ax-addcom 7853  ax-mulcom 7854  ax-addass 7855  ax-mulass 7856  ax-distr 7857  ax-i2m1 7858  ax-0lt1 7859  ax-1rid 7860  ax-0id 7861  ax-rnegex 7862  ax-precex 7863  ax-cnre 7864  ax-pre-ltirr 7865  ax-pre-ltwlin 7866  ax-pre-lttrn 7867  ax-pre-apti 7868  ax-pre-ltadd 7869  ax-pre-mulgt0 7870  ax-pre-mulext 7871  ax-arch 7872  ax-caucvg 7873
This theorem depends on definitions:  df-bi 116  df-stab 821  df-dc 825  df-3or 969  df-3an 970  df-tru 1346  df-fal 1349  df-nf 1449  df-sb 1751  df-eu 2017  df-mo 2018  df-clab 2152  df-cleq 2158  df-clel 2161  df-nfc 2297  df-ne 2337  df-nel 2432  df-ral 2449  df-rex 2450  df-reu 2451  df-rmo 2452  df-rab 2453  df-v 2728  df-sbc 2952  df-csb 3046  df-dif 3118  df-un 3120  df-in 3122  df-ss 3129  df-nul 3410  df-if 3521  df-pw 3561  df-sn 3582  df-pr 3583  df-op 3585  df-uni 3790  df-int 3825  df-iun 3868  df-br 3983  df-opab 4044  df-mpt 4045  df-tr 4081  df-id 4271  df-po 4274  df-iso 4275  df-iord 4344  df-on 4346  df-ilim 4347  df-suc 4349  df-iom 4568  df-xp 4610  df-rel 4611  df-cnv 4612  df-co 4613  df-dm 4614  df-rn 4615  df-res 4616  df-ima 4617  df-iota 5153  df-fun 5190  df-fn 5191  df-f 5192  df-f1 5193  df-fo 5194  df-f1o 5195  df-fv 5196  df-isom 5197  df-riota 5798  df-ov 5845  df-oprab 5846  df-mpo 5847  df-1st 6108  df-2nd 6109  df-recs 6273  df-irdg 6338  df-frec 6359  df-1o 6384  df-2o 6385  df-oadd 6388  df-er 6501  df-en 6707  df-dom 6708  df-fin 6709  df-sup 6949  df-inf 6950  df-pnf 7935  df-mnf 7936  df-xr 7937  df-ltxr 7938  df-le 7939  df-sub 8071  df-neg 8072  df-reap 8473  df-ap 8480  df-div 8569  df-inn 8858  df-2 8916  df-3 8917  df-4 8918  df-n0 9115  df-z 9192  df-uz 9467  df-q 9558  df-rp 9590  df-fz 9945  df-fzo 10078  df-fl 10205  df-mod 10258  df-seqfrec 10381  df-exp 10455  df-fac 10639  df-ihash 10689  df-cj 10784  df-re 10785  df-im 10786  df-rsqrt 10940  df-abs 10941  df-clim 11220  df-sumdc 11295  df-dvds 11728  df-gcd 11876  df-prm 12040  df-pc 12217
This theorem is referenced by:  pcbc  12281
  Copyright terms: Public domain W3C validator