Metamath Proof Explorer


Theorem prmocl

Description: Closure of the primorial function. (Contributed by AV, 28-Aug-2020)

Ref Expression
Assertion prmocl ( 𝑁 ∈ ℕ0 → ( #p𝑁 ) ∈ ℕ )

Proof

Step Hyp Ref Expression
1 prmoval ( 𝑁 ∈ ℕ0 → ( #p𝑁 ) = ∏ 𝑘 ∈ ( 1 ... 𝑁 ) if ( 𝑘 ∈ ℙ , 𝑘 , 1 ) )
2 fzfid ( 𝑁 ∈ ℕ0 → ( 1 ... 𝑁 ) ∈ Fin )
3 elfznn ( 𝑘 ∈ ( 1 ... 𝑁 ) → 𝑘 ∈ ℕ )
4 3 adantl ( ( 𝑁 ∈ ℕ0𝑘 ∈ ( 1 ... 𝑁 ) ) → 𝑘 ∈ ℕ )
5 1nn 1 ∈ ℕ
6 5 a1i ( ( 𝑁 ∈ ℕ0𝑘 ∈ ( 1 ... 𝑁 ) ) → 1 ∈ ℕ )
7 4 6 ifcld ( ( 𝑁 ∈ ℕ0𝑘 ∈ ( 1 ... 𝑁 ) ) → if ( 𝑘 ∈ ℙ , 𝑘 , 1 ) ∈ ℕ )
8 2 7 fprodnncl ( 𝑁 ∈ ℕ0 → ∏ 𝑘 ∈ ( 1 ... 𝑁 ) if ( 𝑘 ∈ ℙ , 𝑘 , 1 ) ∈ ℕ )
9 1 8 eqeltrd ( 𝑁 ∈ ℕ0 → ( #p𝑁 ) ∈ ℕ )