Metamath Proof Explorer


Theorem hashun

Description: The size of the union of disjoint finite sets is the sum of their sizes. (Contributed by Paul Chapman, 30-Nov-2012) (Revised by Mario Carneiro, 15-Sep-2013)

Ref Expression
Assertion hashun AFinBFinAB=AB=A+B

Proof

Step Hyp Ref Expression
1 ficardun AFinBFinAB=cardAB=cardA+𝑜cardB
2 1 fveq2d AFinBFinAB=recxVx+10ωcardAB=recxVx+10ωcardA+𝑜cardB
3 unfi AFinBFinABFin
4 eqid recxVx+10ω=recxVx+10ω
5 4 hashgval ABFinrecxVx+10ωcardAB=AB
6 3 5 syl AFinBFinrecxVx+10ωcardAB=AB
7 6 3adant3 AFinBFinAB=recxVx+10ωcardAB=AB
8 ficardom AFincardAω
9 ficardom BFincardBω
10 4 hashgadd cardAωcardBωrecxVx+10ωcardA+𝑜cardB=recxVx+10ωcardA+recxVx+10ωcardB
11 8 9 10 syl2an AFinBFinrecxVx+10ωcardA+𝑜cardB=recxVx+10ωcardA+recxVx+10ωcardB
12 4 hashgval AFinrecxVx+10ωcardA=A
13 4 hashgval BFinrecxVx+10ωcardB=B
14 12 13 oveqan12d AFinBFinrecxVx+10ωcardA+recxVx+10ωcardB=A+B
15 11 14 eqtrd AFinBFinrecxVx+10ωcardA+𝑜cardB=A+B
16 15 3adant3 AFinBFinAB=recxVx+10ωcardA+𝑜cardB=A+B
17 2 7 16 3eqtr3d AFinBFinAB=AB=A+B