Metamath Proof Explorer


Theorem hashres

Description: The number of elements of a finite function restricted to a subset of its domain is equal to the number of elements of that subset. (Contributed by AV, 15-Dec-2021)

Ref Expression
Assertion hashres FunAAFinBdomAAB=B

Proof

Step Hyp Ref Expression
1 funres FunAFunAB
2 1 3ad2ant1 FunAAFinBdomAFunAB
3 finresfin AFinABFin
4 3 3ad2ant2 FunAAFinBdomAABFin
5 hashfun ABFinFunABAB=domAB
6 4 5 syl FunAAFinBdomAFunABAB=domAB
7 2 6 mpbid FunAAFinBdomAAB=domAB
8 ssdmres BdomAdomAB=B
9 8 biimpi BdomAdomAB=B
10 9 3ad2ant3 FunAAFinBdomAdomAB=B
11 10 fveq2d FunAAFinBdomAdomAB=B
12 7 11 eqtrd FunAAFinBdomAAB=B