Metamath Proof Explorer


Theorem derangval

Description: Define the derangement function, which counts the number of bijections from a set to itself such that no element is mapped to itself. (Contributed by Mario Carneiro, 19-Jan-2015)

Ref Expression
Hypothesis derang.d D=xFinf|f:x1-1 ontoxyxfyy
Assertion derangval AFinDA=f|f:A1-1 ontoAyAfyy

Proof

Step Hyp Ref Expression
1 derang.d D=xFinf|f:x1-1 ontoxyxfyy
2 f1oeq2 x=Af:x1-1 ontoxf:A1-1 ontox
3 f1oeq3 x=Af:A1-1 ontoxf:A1-1 ontoA
4 2 3 bitrd x=Af:x1-1 ontoxf:A1-1 ontoA
5 raleq x=AyxfyyyAfyy
6 4 5 anbi12d x=Af:x1-1 ontoxyxfyyf:A1-1 ontoAyAfyy
7 6 abbidv x=Af|f:x1-1 ontoxyxfyy=f|f:A1-1 ontoAyAfyy
8 7 fveq2d x=Af|f:x1-1 ontoxyxfyy=f|f:A1-1 ontoAyAfyy
9 fvex f|f:A1-1 ontoAyAfyyV
10 8 1 9 fvmpt AFinDA=f|f:A1-1 ontoAyAfyy