ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  hashun Unicode version

Theorem hashun 10046
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 variables  m  n  x are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 isfi 6406 . . . 4  |-  ( A  e.  Fin  <->  E. n  e.  om  A  ~~  n
)
21biimpi 118 . . 3  |-  ( A  e.  Fin  ->  E. n  e.  om  A  ~~  n
)
323ad2ant1 960 . 2  |-  ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  ->  E. n  e.  om  A  ~~  n
)
4 isfi 6406 . . . . . 6  |-  ( B  e.  Fin  <->  E. m  e.  om  B  ~~  m
)
54biimpi 118 . . . . 5  |-  ( B  e.  Fin  ->  E. m  e.  om  B  ~~  m
)
653ad2ant2 961 . . . 4  |-  ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  ->  E. m  e.  om  B  ~~  m
)
76adantr 270 . . 3  |-  ( ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  (
n  e.  om  /\  A  ~~  n ) )  ->  E. m  e.  om  B  ~~  m )
8 simplrl 502 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  ->  n  e.  om )
9 simprl 498 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  ->  m  e.  om )
10 eqid 2083 . . . . . . 7  |- frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 )  = frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 )
1110omgadd 10043 . . . . . 6  |-  ( ( n  e.  om  /\  m  e.  om )  ->  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  ( n  +o  m
) )  =  ( (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  n )  +  (frec ( ( x  e.  ZZ  |->  ( x  + 
1 ) ) ,  0 ) `  m
) ) )
128, 9, 11syl2anc 403 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
(frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  ( n  +o  m
) )  =  ( (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  n )  +  (frec ( ( x  e.  ZZ  |->  ( x  + 
1 ) ) ,  0 ) `  m
) ) )
13 nnacl 6171 . . . . . . 7  |-  ( ( n  e.  om  /\  m  e.  om )  ->  ( n  +o  m
)  e.  om )
148, 9, 13syl2anc 403 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( n  +o  m
)  e.  om )
15 enrefg 6409 . . . . . . 7  |-  ( ( n  +o  m )  e.  om  ->  (
n  +o  m ) 
~~  ( n  +o  m ) )
1614, 15syl 14 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( n  +o  m
)  ~~  ( n  +o  m ) )
17 hashennn 10021 . . . . . 6  |-  ( ( ( n  +o  m
)  e.  om  /\  ( n  +o  m
)  ~~  ( n  +o  m ) )  -> 
( `  ( n  +o  m ) )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  ( n  +o  m
) ) )
1814, 16, 17syl2anc 403 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( `  ( n  +o  m ) )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  ( n  +o  m
) ) )
19 vex 2615 . . . . . . . 8  |-  n  e. 
_V
2019enref 6410 . . . . . . 7  |-  n  ~~  n
21 hashennn 10021 . . . . . . 7  |-  ( ( n  e.  om  /\  n  ~~  n )  -> 
( `  n )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  n ) )
228, 20, 21sylancl 404 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( `  n )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  n ) )
23 vex 2615 . . . . . . . 8  |-  m  e. 
_V
2423enref 6410 . . . . . . 7  |-  m  ~~  m
25 hashennn 10021 . . . . . . 7  |-  ( ( m  e.  om  /\  m  ~~  m )  -> 
( `  m )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  m ) )
269, 24, 25sylancl 404 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( `  m )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  m ) )
2722, 26oveq12d 5607 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( ( `  n
)  +  ( `  m
) )  =  ( (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  n )  +  (frec ( ( x  e.  ZZ  |->  ( x  + 
1 ) ) ,  0 ) `  m
) ) )
2812, 18, 273eqtr4d 2125 . . . 4  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( `  ( n  +o  m ) )  =  ( ( `  n
)  +  ( `  m
) ) )
29 simpll1 978 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  ->  A  e.  Fin )
30 simpll2 979 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  ->  B  e.  Fin )
31 simpll3 980 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( A  i^i  B
)  =  (/) )
32 simplrr 503 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  ->  A  ~~  n )
33 simprr 499 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  ->  B  ~~  m )
3429, 30, 31, 8, 9, 32, 33hashunlem 10045 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( A  u.  B
)  ~~  ( n  +o  m ) )
35 unfidisj 6557 . . . . . . 7  |-  ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  ->  ( A  u.  B )  e. 
Fin )
3635ad2antrr 472 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( A  u.  B
)  e.  Fin )
37 nnfi 6516 . . . . . . . 8  |-  ( ( n  +o  m )  e.  om  ->  (
n  +o  m )  e.  Fin )
3813, 37syl 14 . . . . . . 7  |-  ( ( n  e.  om  /\  m  e.  om )  ->  ( n  +o  m
)  e.  Fin )
398, 9, 38syl2anc 403 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( n  +o  m
)  e.  Fin )
40 hashen 10025 . . . . . 6  |-  ( ( ( A  u.  B
)  e.  Fin  /\  ( n  +o  m
)  e.  Fin )  ->  ( ( `  ( A  u.  B )
)  =  ( `  (
n  +o  m ) )  <->  ( A  u.  B )  ~~  (
n  +o  m ) ) )
4136, 39, 40syl2anc 403 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( ( `  ( A  u.  B )
)  =  ( `  (
n  +o  m ) )  <->  ( A  u.  B )  ~~  (
n  +o  m ) ) )
4234, 41mpbird 165 . . . 4  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( `  ( A  u.  B ) )  =  ( `  ( n  +o  m ) ) )
43 nnfi 6516 . . . . . . . 8  |-  ( n  e.  om  ->  n  e.  Fin )
448, 43syl 14 . . . . . . 7  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  ->  n  e.  Fin )
45 hashen 10025 . . . . . . 7  |-  ( ( A  e.  Fin  /\  n  e.  Fin )  ->  ( ( `  A
)  =  ( `  n
)  <->  A  ~~  n ) )
4629, 44, 45syl2anc 403 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( ( `  A
)  =  ( `  n
)  <->  A  ~~  n ) )
4732, 46mpbird 165 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( `  A )  =  ( `  n )
)
48 nnfi 6516 . . . . . . . 8  |-  ( m  e.  om  ->  m  e.  Fin )
499, 48syl 14 . . . . . . 7  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  ->  m  e.  Fin )
50 hashen 10025 . . . . . . 7  |-  ( ( B  e.  Fin  /\  m  e.  Fin )  ->  ( ( `  B
)  =  ( `  m
)  <->  B  ~~  m ) )
5130, 49, 50syl2anc 403 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( ( `  B
)  =  ( `  m
)  <->  B  ~~  m ) )
5233, 51mpbird 165 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( `  B )  =  ( `  m )
)
5347, 52oveq12d 5607 . . . 4  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( ( `  A
)  +  ( `  B
) )  =  ( ( `  n )  +  ( `  m )
) )
5428, 42, 533eqtr4d 2125 . . 3  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  ( n  e.  om  /\  A  ~~  n ) )  /\  ( m  e.  om  /\  B  ~~  m ) )  -> 
( `  ( A  u.  B ) )  =  ( ( `  A
)  +  ( `  B
) ) )
557, 54rexlimddv 2487 . 2  |-  ( ( ( A  e.  Fin  /\  B  e.  Fin  /\  ( A  i^i  B )  =  (/) )  /\  (
n  e.  om  /\  A  ~~  n ) )  ->  ( `  ( A  u.  B ) )  =  ( ( `  A
)  +  ( `  B
) ) )
563, 55rexlimddv 2487 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 102    <-> wb 103    /\ w3a 920    = wceq 1285    e. wcel 1434   E.wrex 2354    u. cun 2982    i^i cin 2983   (/)c0 3269   class class class wbr 3811    |-> cmpt 3865   omcom 4367   ` cfv 4967  (class class class)co 5589  freccfrec 6085    +o coa 6108    ~~ cen 6383   Fincfn 6385   0cc0 7251   1c1 7252    + caddc 7254   ZZcz 8644  ♯chash 10016
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1377  ax-7 1378  ax-gen 1379  ax-ie1 1423  ax-ie2 1424  ax-8 1436  ax-10 1437  ax-11 1438  ax-i12 1439  ax-bndl 1440  ax-4 1441  ax-13 1445  ax-14 1446  ax-17 1460  ax-i9 1464  ax-ial 1468  ax-i5r 1469  ax-ext 2065  ax-coll 3919  ax-sep 3922  ax-nul 3930  ax-pow 3974  ax-pr 3999  ax-un 4223  ax-setind 4315  ax-iinf 4365  ax-cnex 7337  ax-resscn 7338  ax-1cn 7339  ax-1re 7340  ax-icn 7341  ax-addcl 7342  ax-addrcl 7343  ax-mulcl 7344  ax-addcom 7346  ax-addass 7348  ax-distr 7350  ax-i2m1 7351  ax-0lt1 7352  ax-0id 7354  ax-rnegex 7355  ax-cnre 7357  ax-pre-ltirr 7358  ax-pre-ltwlin 7359  ax-pre-lttrn 7360  ax-pre-ltadd 7362
This theorem depends on definitions:  df-bi 115  df-dc 777  df-3or 921  df-3an 922  df-tru 1288  df-fal 1291  df-nf 1391  df-sb 1688  df-eu 1946  df-mo 1947  df-clab 2070  df-cleq 2076  df-clel 2079  df-nfc 2212  df-ne 2250  df-nel 2345  df-ral 2358  df-rex 2359  df-reu 2360  df-rab 2362  df-v 2614  df-sbc 2827  df-csb 2920  df-dif 2986  df-un 2988  df-in 2990  df-ss 2997  df-nul 3270  df-if 3374  df-pw 3408  df-sn 3428  df-pr 3429  df-op 3431  df-uni 3628  df-int 3663  df-iun 3706  df-br 3812  df-opab 3866  df-mpt 3867  df-tr 3902  df-id 4083  df-iord 4156  df-on 4158  df-ilim 4159  df-suc 4161  df-iom 4368  df-xp 4405  df-rel 4406  df-cnv 4407  df-co 4408  df-dm 4409  df-rn 4410  df-res 4411  df-ima 4412  df-iota 4932  df-fun 4969  df-fn 4970  df-f 4971  df-f1 4972  df-fo 4973  df-f1o 4974  df-fv 4975  df-riota 5545  df-ov 5592  df-oprab 5593  df-mpt2 5594  df-1st 5844  df-2nd 5845  df-recs 6000  df-irdg 6065  df-frec 6086  df-1o 6111  df-oadd 6115  df-er 6220  df-en 6386  df-dom 6387  df-fin 6388  df-pnf 7425  df-mnf 7426  df-xr 7427  df-ltxr 7428  df-le 7429  df-sub 7556  df-neg 7557  df-inn 8315  df-n0 8564  df-z 8645  df-uz 8913  df-ihash 10017
This theorem is referenced by:  hashunsng  10048  fihashssdif  10059  hashxp  10067  phiprmpw  10976
  Copyright terms: Public domain W3C validator