Metamath Proof Explorer


Theorem hashkf

Description: The finite part of the size function maps all finite sets to their cardinality, as members of NN0 . (Contributed by Mario Carneiro, 13-Sep-2013) (Revised by Mario Carneiro, 26-Dec-2014)

Ref Expression
Hypotheses hashgval.1 G = rec x V x + 1 0 ω
hashkf.2 K = G card
Assertion hashkf K : Fin 0

Proof

Step Hyp Ref Expression
1 hashgval.1 G = rec x V x + 1 0 ω
2 hashkf.2 K = G card
3 frfnom rec x V x + 1 0 ω Fn ω
4 1 fneq1i G Fn ω rec x V x + 1 0 ω Fn ω
5 3 4 mpbir G Fn ω
6 fnfun G Fn ω Fun G
7 5 6 ax-mp Fun G
8 cardf2 card : y | x On x y On
9 ffun card : y | x On x y On Fun card
10 8 9 ax-mp Fun card
11 funco Fun G Fun card Fun G card
12 7 10 11 mp2an Fun G card
13 dmco dom G card = card -1 dom G
14 5 fndmi dom G = ω
15 14 imaeq2i card -1 dom G = card -1 ω
16 funfn Fun card card Fn dom card
17 10 16 mpbi card Fn dom card
18 elpreima card Fn dom card y card -1 ω y dom card card y ω
19 17 18 ax-mp y card -1 ω y dom card card y ω
20 id card y ω card y ω
21 cardid2 y dom card card y y
22 21 ensymd y dom card y card y
23 breq2 x = card y y x y card y
24 23 rspcev card y ω y card y x ω y x
25 20 22 24 syl2anr y dom card card y ω x ω y x
26 isfi y Fin x ω y x
27 25 26 sylibr y dom card card y ω y Fin
28 finnum y Fin y dom card
29 ficardom y Fin card y ω
30 28 29 jca y Fin y dom card card y ω
31 27 30 impbii y dom card card y ω y Fin
32 19 31 bitri y card -1 ω y Fin
33 32 eqriv card -1 ω = Fin
34 13 15 33 3eqtri dom G card = Fin
35 df-fn G card Fn Fin Fun G card dom G card = Fin
36 12 34 35 mpbir2an G card Fn Fin
37 2 fneq1i K Fn Fin G card Fn Fin
38 36 37 mpbir K Fn Fin
39 2 fveq1i K y = G card y
40 fvco Fun card y dom card G card y = G card y
41 10 28 40 sylancr y Fin G card y = G card y
42 39 41 eqtrid y Fin K y = G card y
43 1 hashgf1o G : ω 1-1 onto 0
44 f1of G : ω 1-1 onto 0 G : ω 0
45 43 44 ax-mp G : ω 0
46 45 ffvelrni card y ω G card y 0
47 29 46 syl y Fin G card y 0
48 42 47 eqeltrd y Fin K y 0
49 48 rgen y Fin K y 0
50 ffnfv K : Fin 0 K Fn Fin y Fin K y 0
51 38 49 50 mpbir2an K : Fin 0