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 A V F : A 1-1 B F = ran F

Proof

Step Hyp Ref Expression
1 f1f F : A 1-1 B F : A B
2 1 anim2i A V F : A 1-1 B A V F : A B
3 2 ancomd A V F : A 1-1 B F : A B A V
4 fex F : A B A V F V
5 3 4 syl A V F : A 1-1 B F V
6 f1o2ndf1 F : A 1-1 B 2 nd F : F 1-1 onto ran F
7 df-2nd 2 nd = x V ran x
8 7 funmpt2 Fun 2 nd
9 resfunexg Fun 2 nd F V 2 nd F V
10 8 5 9 sylancr A V F : A 1-1 B 2 nd F V
11 f1oeq1 2 nd F = f 2 nd F : F 1-1 onto ran F f : F 1-1 onto ran F
12 11 biimpd 2 nd F = f 2 nd F : F 1-1 onto ran F f : F 1-1 onto ran F
13 12 eqcoms f = 2 nd F 2 nd F : F 1-1 onto ran F f : F 1-1 onto ran F
14 13 adantl A V F : A 1-1 B f = 2 nd F 2 nd F : F 1-1 onto ran F f : F 1-1 onto ran F
15 10 14 spcimedv A V F : A 1-1 B 2 nd F : F 1-1 onto ran F f f : F 1-1 onto ran F
16 15 ex A V F : A 1-1 B 2 nd F : F 1-1 onto ran F f f : F 1-1 onto ran F
17 16 com13 2 nd F : F 1-1 onto ran F F : A 1-1 B A V f f : F 1-1 onto ran F
18 6 17 mpcom F : A 1-1 B A V f f : F 1-1 onto ran F
19 18 impcom A V F : A 1-1 B f f : F 1-1 onto ran F
20 hasheqf1oi F V f f : F 1-1 onto ran F F = ran F
21 5 19 20 sylc A V F : A 1-1 B F = ran F