Metamath Proof Explorer


Theorem prmolefac

Description: The primorial of a positive integer is less than or equal to the factorial of the integer. (Contributed by AV, 15-Aug-2020) (Revised by AV, 29-Aug-2020)

Ref Expression
Assertion prmolefac N 0 # p N N !

Proof

Step Hyp Ref Expression
1 nfv k N 0
2 fzfid N 0 1 N Fin
3 elfznn k 1 N k
4 3 adantl N 0 k 1 N k
5 1nn 1
6 5 a1i N 0 k 1 N 1
7 4 6 ifcld N 0 k 1 N if k k 1
8 7 nnred N 0 k 1 N if k k 1
9 ifeqor if k k 1 = k if k k 1 = 1
10 nnnn0 k k 0
11 10 nn0ge0d k 0 k
12 3 11 syl k 1 N 0 k
13 12 adantl N 0 k 1 N 0 k
14 breq2 if k k 1 = k 0 if k k 1 0 k
15 13 14 syl5ibr if k k 1 = k N 0 k 1 N 0 if k k 1
16 0le1 0 1
17 breq2 if k k 1 = 1 0 if k k 1 0 1
18 17 adantr if k k 1 = 1 N 0 k 1 N 0 if k k 1 0 1
19 16 18 mpbiri if k k 1 = 1 N 0 k 1 N 0 if k k 1
20 19 ex if k k 1 = 1 N 0 k 1 N 0 if k k 1
21 15 20 jaoi if k k 1 = k if k k 1 = 1 N 0 k 1 N 0 if k k 1
22 9 21 ax-mp N 0 k 1 N 0 if k k 1
23 4 nnred N 0 k 1 N k
24 23 leidd N 0 k 1 N k k
25 breq1 if k k 1 = k if k k 1 k k k
26 24 25 syl5ibr if k k 1 = k N 0 k 1 N if k k 1 k
27 4 nnge1d N 0 k 1 N 1 k
28 breq1 if k k 1 = 1 if k k 1 k 1 k
29 27 28 syl5ibr if k k 1 = 1 N 0 k 1 N if k k 1 k
30 26 29 jaoi if k k 1 = k if k k 1 = 1 N 0 k 1 N if k k 1 k
31 9 30 ax-mp N 0 k 1 N if k k 1 k
32 1 2 8 22 23 31 fprodle N 0 k = 1 N if k k 1 k = 1 N k
33 prmoval N 0 # p N = k = 1 N if k k 1
34 fprodfac N 0 N ! = k = 1 N k
35 32 33 34 3brtr4d N 0 # p N N !