Metamath Proof Explorer


Theorem facp2

Description: The factorial of a successor's successor. (Contributed by metakunt, 19-Apr-2024)

Ref Expression
Assertion facp2 N 0 N + 2 ! = N ! N + 1 N + 2

Proof

Step Hyp Ref Expression
1 nn0cn N 0 N
2 ax-1cn 1
3 addass N 1 1 N + 1 + 1 = N + 1 + 1
4 2 2 3 mp3an23 N N + 1 + 1 = N + 1 + 1
5 1 4 syl N 0 N + 1 + 1 = N + 1 + 1
6 df-2 2 = 1 + 1
7 6 oveq2i N + 2 = N + 1 + 1
8 7 eqcomi N + 1 + 1 = N + 2
9 8 a1i N 0 N + 1 + 1 = N + 2
10 5 9 eqtrd N 0 N + 1 + 1 = N + 2
11 10 fveq2d N 0 N + 1 + 1 ! = N + 2 !
12 peano2nn0 N 0 N + 1 0
13 facp1 N + 1 0 N + 1 + 1 ! = N + 1 ! N + 1 + 1
14 12 13 syl N 0 N + 1 + 1 ! = N + 1 ! N + 1 + 1
15 11 14 eqtr3d N 0 N + 2 ! = N + 1 ! N + 1 + 1
16 10 oveq2d N 0 N + 1 ! N + 1 + 1 = N + 1 ! N + 2
17 15 16 eqtrd N 0 N + 2 ! = N + 1 ! N + 2
18 facp1 N 0 N + 1 ! = N ! N + 1
19 18 oveq1d N 0 N + 1 ! N + 2 = N ! N + 1 N + 2
20 17 19 eqtrd N 0 N + 2 ! = N ! N + 1 N + 2
21 faccl N 0 N !
22 nncn N ! N !
23 21 22 syl N 0 N !
24 nn0cn N + 1 0 N + 1
25 12 24 syl N 0 N + 1
26 2cn 2
27 addcl N 2 N + 2
28 26 27 mpan2 N N + 2
29 1 28 syl N 0 N + 2
30 mulass N ! N + 1 N + 2 N ! N + 1 N + 2 = N ! N + 1 N + 2
31 23 25 29 30 syl3anc N 0 N ! N + 1 N + 2 = N ! N + 1 N + 2
32 20 31 eqtrd N 0 N + 2 ! = N ! N + 1 N + 2