Metamath Proof Explorer


Theorem subfaclefac

Description: The subfactorial is less than the factorial. (Contributed by Mario Carneiro, 19-Jan-2015)

Ref Expression
Hypotheses derang.d D=xFinf|f:x1-1 ontoxyxfyy
subfac.n S=n0D1n
Assertion subfaclefac N0SNN!

Proof

Step Hyp Ref Expression
1 derang.d D=xFinf|f:x1-1 ontoxyxfyy
2 subfac.n S=n0D1n
3 anidm f:1N1-1 onto1Nf:1N1-1 onto1Nf:1N1-1 onto1N
4 3 abbii f|f:1N1-1 onto1Nf:1N1-1 onto1N=f|f:1N1-1 onto1N
5 fzfid N01NFin
6 deranglem 1NFinf|f:1N1-1 onto1Nf:1N1-1 onto1NFin
7 5 6 syl N0f|f:1N1-1 onto1Nf:1N1-1 onto1NFin
8 4 7 eqeltrrid N0f|f:1N1-1 onto1NFin
9 simpl f:1N1-1 onto1Ny1Nfyyf:1N1-1 onto1N
10 9 ss2abi f|f:1N1-1 onto1Ny1Nfyyf|f:1N1-1 onto1N
11 ssdomg f|f:1N1-1 onto1NFinf|f:1N1-1 onto1Ny1Nfyyf|f:1N1-1 onto1Nf|f:1N1-1 onto1Ny1Nfyyf|f:1N1-1 onto1N
12 8 10 11 mpisyl N0f|f:1N1-1 onto1Ny1Nfyyf|f:1N1-1 onto1N
13 deranglem 1NFinf|f:1N1-1 onto1Ny1NfyyFin
14 5 13 syl N0f|f:1N1-1 onto1Ny1NfyyFin
15 hashdom f|f:1N1-1 onto1Ny1NfyyFinf|f:1N1-1 onto1NFinf|f:1N1-1 onto1Ny1Nfyyf|f:1N1-1 onto1Nf|f:1N1-1 onto1Ny1Nfyyf|f:1N1-1 onto1N
16 14 8 15 syl2anc N0f|f:1N1-1 onto1Ny1Nfyyf|f:1N1-1 onto1Nf|f:1N1-1 onto1Ny1Nfyyf|f:1N1-1 onto1N
17 12 16 mpbird N0f|f:1N1-1 onto1Ny1Nfyyf|f:1N1-1 onto1N
18 1 2 subfacval N0SN=D1N
19 1 derangval 1NFinD1N=f|f:1N1-1 onto1Ny1Nfyy
20 5 19 syl N0D1N=f|f:1N1-1 onto1Ny1Nfyy
21 18 20 eqtrd N0SN=f|f:1N1-1 onto1Ny1Nfyy
22 hashfac 1NFinf|f:1N1-1 onto1N=1N!
23 5 22 syl N0f|f:1N1-1 onto1N=1N!
24 hashfz1 N01N=N
25 24 fveq2d N01N!=N!
26 23 25 eqtr2d N0N!=f|f:1N1-1 onto1N
27 17 21 26 3brtr4d N0SNN!