Metamath Proof Explorer


Theorem hashgval

Description: The value of the # function in terms of the mapping G from _om to NN0 . The proof avoids the use of ax-ac . (Contributed by Paul Chapman, 22-Jun-2011) (Revised by Mario Carneiro, 26-Dec-2014)

Ref Expression
Hypothesis hashgval.1 G = rec x V x + 1 0 ω
Assertion hashgval A Fin G card A = A

Proof

Step Hyp Ref Expression
1 hashgval.1 G = rec x V x + 1 0 ω
2 resundir rec x V x + 1 0 ω card V Fin × +∞ Fin = rec x V x + 1 0 ω card Fin V Fin × +∞ Fin
3 eqid rec x V x + 1 0 ω = rec x V x + 1 0 ω
4 eqid rec x V x + 1 0 ω card = rec x V x + 1 0 ω card
5 3 4 hashkf rec x V x + 1 0 ω card : Fin 0
6 ffn rec x V x + 1 0 ω card : Fin 0 rec x V x + 1 0 ω card Fn Fin
7 fnresdm rec x V x + 1 0 ω card Fn Fin rec x V x + 1 0 ω card Fin = rec x V x + 1 0 ω card
8 5 6 7 mp2b rec x V x + 1 0 ω card Fin = rec x V x + 1 0 ω card
9 disjdifr V Fin Fin =
10 pnfex +∞ V
11 10 fconst V Fin × +∞ : V Fin +∞
12 ffn V Fin × +∞ : V Fin +∞ V Fin × +∞ Fn V Fin
13 fnresdisj V Fin × +∞ Fn V Fin V Fin Fin = V Fin × +∞ Fin =
14 11 12 13 mp2b V Fin Fin = V Fin × +∞ Fin =
15 9 14 mpbi V Fin × +∞ Fin =
16 8 15 uneq12i rec x V x + 1 0 ω card Fin V Fin × +∞ Fin = rec x V x + 1 0 ω card
17 un0 rec x V x + 1 0 ω card = rec x V x + 1 0 ω card
18 16 17 eqtri rec x V x + 1 0 ω card Fin V Fin × +∞ Fin = rec x V x + 1 0 ω card
19 2 18 eqtri rec x V x + 1 0 ω card V Fin × +∞ Fin = rec x V x + 1 0 ω card
20 df-hash . = rec x V x + 1 0 ω card V Fin × +∞
21 20 reseq1i . Fin = rec x V x + 1 0 ω card V Fin × +∞ Fin
22 1 coeq1i G card = rec x V x + 1 0 ω card
23 19 21 22 3eqtr4i . Fin = G card
24 23 fveq1i . Fin A = G card A
25 cardf2 card : x | y On y x On
26 ffun card : x | y On y x On Fun card
27 25 26 ax-mp Fun card
28 finnum A Fin A dom card
29 fvco Fun card A dom card G card A = G card A
30 27 28 29 sylancr A Fin G card A = G card A
31 24 30 eqtrid A Fin . Fin A = G card A
32 fvres A Fin . Fin A = A
33 31 32 eqtr3d A Fin G card A = A