MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  hashun Unicode version

Theorem hashun 11543
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.)
Assertion
Ref Expression
hashun  |-  ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  ->  ( # `  ( A  u.  B
) )  =  ( ( # `  A
)  +  ( # `  B ) ) )

Proof of Theorem hashun
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 ficardun 7975 . . 3  |-  ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  ->  ( card `  ( A  u.  B
) )  =  ( ( card `  A
)  +o  ( card `  B ) ) )
21fveq2d 5636 . 2  |-  ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  ->  ( ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om ) `  ( card `  ( A  u.  B
) ) )  =  ( ( rec (
( x  e.  _V  |->  ( x  +  1
) ) ,  0 )  |`  om ) `  ( ( card `  A
)  +o  ( card `  B ) ) ) )
3 unfi 7271 . . . 4  |-  ( ( A  e.  Fin  /\  B  e.  Fin )  ->  ( A  u.  B
)  e.  Fin )
4 eqid 2366 . . . . 5  |-  ( rec ( ( x  e. 
_V  |->  ( x  + 
1 ) ) ,  0 )  |`  om )  =  ( rec (
( x  e.  _V  |->  ( x  +  1
) ) ,  0 )  |`  om )
54hashgval 11508 . . . 4  |-  ( ( A  u.  B )  e.  Fin  ->  (
( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om ) `  ( card `  ( A  u.  B ) ) )  =  ( # `  ( A  u.  B )
) )
63, 5syl 15 . . 3  |-  ( ( A  e.  Fin  /\  B  e.  Fin )  ->  ( ( rec (
( x  e.  _V  |->  ( x  +  1
) ) ,  0 )  |`  om ) `  ( card `  ( A  u.  B )
) )  =  (
# `  ( A  u.  B ) ) )
763adant3 976 . 2  |-  ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  ->  ( ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om ) `  ( card `  ( A  u.  B
) ) )  =  ( # `  ( A  u.  B )
) )
8 ficardom 7741 . . . . 5  |-  ( A  e.  Fin  ->  ( card `  A )  e. 
om )
9 ficardom 7741 . . . . 5  |-  ( B  e.  Fin  ->  ( card `  B )  e. 
om )
104hashgadd 11538 . . . . 5  |-  ( ( ( card `  A
)  e.  om  /\  ( card `  B )  e.  om )  ->  (
( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om ) `  (
( card `  A )  +o  ( card `  B
) ) )  =  ( ( ( rec ( ( x  e. 
_V  |->  ( x  + 
1 ) ) ,  0 )  |`  om ) `  ( card `  A
) )  +  ( ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om ) `  ( card `  B ) ) ) )
118, 9, 10syl2an 463 . . . 4  |-  ( ( A  e.  Fin  /\  B  e.  Fin )  ->  ( ( rec (
( x  e.  _V  |->  ( x  +  1
) ) ,  0 )  |`  om ) `  ( ( card `  A
)  +o  ( card `  B ) ) )  =  ( ( ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om ) `  ( card `  A ) )  +  ( ( rec (
( x  e.  _V  |->  ( x  +  1
) ) ,  0 )  |`  om ) `  ( card `  B
) ) ) )
124hashgval 11508 . . . . 5  |-  ( A  e.  Fin  ->  (
( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om ) `  ( card `  A ) )  =  ( # `  A
) )
134hashgval 11508 . . . . 5  |-  ( B  e.  Fin  ->  (
( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om ) `  ( card `  B ) )  =  ( # `  B
) )
1412, 13oveqan12d 6000 . . . 4  |-  ( ( A  e.  Fin  /\  B  e.  Fin )  ->  ( ( ( rec ( ( x  e. 
_V  |->  ( x  + 
1 ) ) ,  0 )  |`  om ) `  ( card `  A
) )  +  ( ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om ) `  ( card `  B ) ) )  =  ( (
# `  A )  +  ( # `  B
) ) )
1511, 14eqtrd 2398 . . 3  |-  ( ( A  e.  Fin  /\  B  e.  Fin )  ->  ( ( rec (
( x  e.  _V  |->  ( x  +  1
) ) ,  0 )  |`  om ) `  ( ( card `  A
)  +o  ( card `  B ) ) )  =  ( ( # `  A )  +  (
# `  B )
) )
16153adant3 976 . 2  |-  ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  ->  ( ( rec ( ( x  e.  _V  |->  ( x  +  1 ) ) ,  0 )  |`  om ) `  ( (
card `  A )  +o  ( card `  B
) ) )  =  ( ( # `  A
)  +  ( # `  B ) ) )
172, 7, 163eqtr3d 2406 1  |-  ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  ->  ( # `  ( A  u.  B
) )  =  ( ( # `  A
)  +  ( # `  B ) ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 358    /\ w3a 935    = wceq 1647    e. wcel 1715   _Vcvv 2873    u. cun 3236    i^i cin 3237   (/)c0 3543    e. cmpt 4179   omcom 4759    |` cres 4794   ` cfv 5358  (class class class)co 5981   reccrdg 6564    +o coa 6618   Fincfn 7006   cardccrd 7715   0cc0 8884   1c1 8885    + caddc 8887   #chash 11505
This theorem is referenced by:  hashun2  11544  hashun3  11545  hashunx  11547  hashunsng  11552  hashssdif  11564  hashxplem  11583  hashfun  11587  hashbclem  11588  hashf1lem2  11592  climcndslem1  12516  climcndslem2  12517  phiprmpw  13052  prmreclem5  13175  4sqlem11  13210  ppidif  20624  mumul  20642  ppiub  20666  lgsquadlem2  20817  lgsquadlem3  20818  ballotlemgun  24230  ballotth  24243  subfacp1lem1  24313  subfacp1lem6  24319  vdgrun  24480  eldioph2lem1  26345  cusgrasizeinds  27641
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1551  ax-5 1562  ax-17 1621  ax-9 1659  ax-8 1680  ax-13 1717  ax-14 1719  ax-6 1734  ax-7 1739  ax-11 1751  ax-12 1937  ax-ext 2347  ax-rep 4233  ax-sep 4243  ax-nul 4251  ax-pow 4290  ax-pr 4316  ax-un 4615  ax-cnex 8940  ax-resscn 8941  ax-1cn 8942  ax-icn 8943  ax-addcl 8944  ax-addrcl 8945  ax-mulcl 8946  ax-mulrcl 8947  ax-mulcom 8948  ax-addass 8949  ax-mulass 8950  ax-distr 8951  ax-i2m1 8952  ax-1ne0 8953  ax-1rid 8954  ax-rnegex 8955  ax-rrecex 8956  ax-cnre 8957  ax-pre-lttri 8958  ax-pre-lttrn 8959  ax-pre-ltadd 8960  ax-pre-mulgt0 8961
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 936  df-3an 937  df-tru 1324  df-ex 1547  df-nf 1550  df-sb 1654  df-eu 2221  df-mo 2222  df-clab 2353  df-cleq 2359  df-clel 2362  df-nfc 2491  df-ne 2531  df-nel 2532  df-ral 2633  df-rex 2634  df-reu 2635  df-rmo 2636  df-rab 2637  df-v 2875  df-sbc 3078  df-csb 3168  df-dif 3241  df-un 3243  df-in 3245  df-ss 3252  df-pss 3254  df-nul 3544  df-if 3655  df-pw 3716  df-sn 3735  df-pr 3736  df-tp 3737  df-op 3738  df-uni 3930  df-int 3965  df-iun 4009  df-br 4126  df-opab 4180  df-mpt 4181  df-tr 4216  df-eprel 4408  df-id 4412  df-po 4417  df-so 4418  df-fr 4455  df-we 4457  df-ord 4498  df-on 4499  df-lim 4500  df-suc 4501  df-om 4760  df-xp 4798  df-rel 4799  df-cnv 4800  df-co 4801  df-dm 4802  df-rn 4803  df-res 4804  df-ima 4805  df-iota 5322  df-fun 5360  df-fn 5361  df-f 5362  df-f1 5363  df-fo 5364  df-f1o 5365  df-fv 5366  df-ov 5984  df-oprab 5985  df-mpt2 5986  df-riota 6446  df-recs 6530  df-rdg 6565  df-1o 6621  df-oadd 6625  df-er 6802  df-en 7007  df-dom 7008  df-sdom 7009  df-fin 7010  df-card 7719  df-cda 7941  df-pnf 9016  df-mnf 9017  df-xr 9018  df-ltxr 9019  df-le 9020  df-sub 9186  df-neg 9187  df-nn 9894  df-n0 10115  df-z 10176  df-uz 10382  df-hash 11506
  Copyright terms: Public domain W3C validator