Metamath Proof Explorer


Theorem hashfac

Description: A factorial counts the number of bijections on a finite set. (Contributed by Mario Carneiro, 21-Jan-2015) (Proof shortened by Mario Carneiro, 17-Apr-2015)

Ref Expression
Assertion hashfac AFinf|f:A1-1 ontoA=A!

Proof

Step Hyp Ref Expression
1 hashf1 AFinAFinf|f:A1-1A=A!(AA)
2 1 anidms AFinf|f:A1-1A=A!(AA)
3 enrefg AFinAA
4 f1finf1o AAAFinf:A1-1Af:A1-1 ontoA
5 3 4 mpancom AFinf:A1-1Af:A1-1 ontoA
6 5 abbidv AFinf|f:A1-1A=f|f:A1-1 ontoA
7 6 fveq2d AFinf|f:A1-1A=f|f:A1-1 ontoA
8 hashcl AFinA0
9 bcnn A0(AA)=1
10 8 9 syl AFin(AA)=1
11 10 oveq2d AFinA!(AA)=A!1
12 8 faccld AFinA!
13 12 nncnd AFinA!
14 13 mulridd AFinA!1=A!
15 11 14 eqtrd AFinA!(AA)=A!
16 2 7 15 3eqtr3d AFinf|f:A1-1 ontoA=A!