Metamath Proof Explorer


Theorem faccl

Description: Closure of the factorial function. (Contributed by NM, 2-Dec-2004)

Ref Expression
Assertion faccl N 0 N !

Proof

Step Hyp Ref Expression
1 fveq2 j = 0 j ! = 0 !
2 1 eleq1d j = 0 j ! 0 !
3 fveq2 j = k j ! = k !
4 3 eleq1d j = k j ! k !
5 fveq2 j = k + 1 j ! = k + 1 !
6 5 eleq1d j = k + 1 j ! k + 1 !
7 fveq2 j = N j ! = N !
8 7 eleq1d j = N j ! N !
9 fac0 0 ! = 1
10 1nn 1
11 9 10 eqeltri 0 !
12 facp1 k 0 k + 1 ! = k ! k + 1
13 12 adantl k ! k 0 k + 1 ! = k ! k + 1
14 nn0p1nn k 0 k + 1
15 nnmulcl k ! k + 1 k ! k + 1
16 14 15 sylan2 k ! k 0 k ! k + 1
17 13 16 eqeltrd k ! k 0 k + 1 !
18 17 expcom k 0 k ! k + 1 !
19 2 4 6 8 11 18 nn0ind N 0 N !