Metamath Proof Explorer


Theorem prmonn2

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

Ref Expression
Assertion prmonn2 N#pN=ifN#pN1 N#pN1

Proof

Step Hyp Ref Expression
1 nncn NN
2 npcan1 NN-1+1=N
3 1 2 syl NN-1+1=N
4 3 eqcomd NN=N-1+1
5 4 fveq2d N#pN=#pN-1+1
6 nnm1nn0 NN10
7 prmop1 N10#pN-1+1=ifN-1+1#pN1N-1+1#pN1
8 6 7 syl N#pN-1+1=ifN-1+1#pN1N-1+1#pN1
9 3 eleq1d NN-1+1N
10 3 oveq2d N#pN1N-1+1=#pN1 N
11 9 10 ifbieq1d NifN-1+1#pN1N-1+1#pN1=ifN#pN1 N#pN1
12 5 8 11 3eqtrd N#pN=ifN#pN1 N#pN1