Metamath Proof Explorer


Theorem hashf1rn

Description: The size of a finite set which is a one-to-one function is equal to the size of the function's range. (Contributed by Alexander van der Vekens, 12-Jan-2018) (Revised by AV, 4-May-2021)

Ref Expression
Assertion hashf1rn AVF:A1-1BF=ranF

Proof

Step Hyp Ref Expression
1 f1f F:A1-1BF:AB
2 1 anim2i AVF:A1-1BAVF:AB
3 2 ancomd AVF:A1-1BF:ABAV
4 fex F:ABAVFV
5 3 4 syl AVF:A1-1BFV
6 f1o2ndf1 F:A1-1B2ndF:F1-1 ontoranF
7 df-2nd 2nd=xVranx
8 7 funmpt2 Fun2nd
9 resfunexg Fun2ndFV2ndFV
10 8 5 9 sylancr AVF:A1-1B2ndFV
11 f1oeq1 2ndF=f2ndF:F1-1 ontoranFf:F1-1 ontoranF
12 11 biimpd 2ndF=f2ndF:F1-1 ontoranFf:F1-1 ontoranF
13 12 eqcoms f=2ndF2ndF:F1-1 ontoranFf:F1-1 ontoranF
14 13 adantl AVF:A1-1Bf=2ndF2ndF:F1-1 ontoranFf:F1-1 ontoranF
15 10 14 spcimedv AVF:A1-1B2ndF:F1-1 ontoranFff:F1-1 ontoranF
16 15 ex AVF:A1-1B2ndF:F1-1 ontoranFff:F1-1 ontoranF
17 16 com13 2ndF:F1-1 ontoranFF:A1-1BAVff:F1-1 ontoranF
18 6 17 mpcom F:A1-1BAVff:F1-1 ontoranF
19 18 impcom AVF:A1-1Bff:F1-1 ontoranF
20 hasheqf1oi FVff:F1-1 ontoranFF=ranF
21 5 19 20 sylc AVF:A1-1BF=ranF