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

Theorem hashun 10392
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 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) → (♯‘(𝐴𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))

Proof of Theorem hashun
Dummy variables 𝑚 𝑛 𝑥 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 isfi 6585 . . . 4 (𝐴 ∈ Fin ↔ ∃𝑛 ∈ ω 𝐴𝑛)
21biimpi 119 . . 3 (𝐴 ∈ Fin → ∃𝑛 ∈ ω 𝐴𝑛)
323ad2ant1 970 . 2 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) → ∃𝑛 ∈ ω 𝐴𝑛)
4 isfi 6585 . . . . . 6 (𝐵 ∈ Fin ↔ ∃𝑚 ∈ ω 𝐵𝑚)
54biimpi 119 . . . . 5 (𝐵 ∈ Fin → ∃𝑚 ∈ ω 𝐵𝑚)
653ad2ant2 971 . . . 4 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) → ∃𝑚 ∈ ω 𝐵𝑚)
76adantr 272 . . 3 (((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) → ∃𝑚 ∈ ω 𝐵𝑚)
8 simplrl 505 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑛 ∈ ω)
9 simprl 501 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑚 ∈ ω)
10 eqid 2100 . . . . . . 7 frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0) = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)
1110omgadd 10389 . . . . . 6 ((𝑛 ∈ ω ∧ 𝑚 ∈ ω) → (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘(𝑛 +o 𝑚)) = ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) + (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚)))
128, 9, 11syl2anc 406 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘(𝑛 +o 𝑚)) = ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) + (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚)))
13 nnacl 6306 . . . . . . 7 ((𝑛 ∈ ω ∧ 𝑚 ∈ ω) → (𝑛 +o 𝑚) ∈ ω)
148, 9, 13syl2anc 406 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛 +o 𝑚) ∈ ω)
15 enrefg 6588 . . . . . . 7 ((𝑛 +o 𝑚) ∈ ω → (𝑛 +o 𝑚) ≈ (𝑛 +o 𝑚))
1614, 15syl 14 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛 +o 𝑚) ≈ (𝑛 +o 𝑚))
17 hashennn 10367 . . . . . 6 (((𝑛 +o 𝑚) ∈ ω ∧ (𝑛 +o 𝑚) ≈ (𝑛 +o 𝑚)) → (♯‘(𝑛 +o 𝑚)) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘(𝑛 +o 𝑚)))
1814, 16, 17syl2anc 406 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘(𝑛 +o 𝑚)) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘(𝑛 +o 𝑚)))
19 vex 2644 . . . . . . . 8 𝑛 ∈ V
2019enref 6589 . . . . . . 7 𝑛𝑛
21 hashennn 10367 . . . . . . 7 ((𝑛 ∈ ω ∧ 𝑛𝑛) → (♯‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛))
228, 20, 21sylancl 407 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛))
23 vex 2644 . . . . . . . 8 𝑚 ∈ V
2423enref 6589 . . . . . . 7 𝑚𝑚
25 hashennn 10367 . . . . . . 7 ((𝑚 ∈ ω ∧ 𝑚𝑚) → (♯‘𝑚) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚))
269, 24, 25sylancl 407 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝑚) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚))
2722, 26oveq12d 5724 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝑛) + (♯‘𝑚)) = ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) + (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚)))
2812, 18, 273eqtr4d 2142 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘(𝑛 +o 𝑚)) = ((♯‘𝑛) + (♯‘𝑚)))
29 simpll1 988 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐴 ∈ Fin)
30 simpll2 989 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐵 ∈ Fin)
31 simpll3 990 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵) = ∅)
32 simplrr 506 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐴𝑛)
33 simprr 502 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐵𝑚)
3429, 30, 31, 8, 9, 32, 33hashunlem 10391 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵) ≈ (𝑛 +o 𝑚))
35 unfidisj 6739 . . . . . . 7 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) → (𝐴𝐵) ∈ Fin)
3635ad2antrr 475 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵) ∈ Fin)
37 nnfi 6695 . . . . . . . 8 ((𝑛 +o 𝑚) ∈ ω → (𝑛 +o 𝑚) ∈ Fin)
3813, 37syl 14 . . . . . . 7 ((𝑛 ∈ ω ∧ 𝑚 ∈ ω) → (𝑛 +o 𝑚) ∈ Fin)
398, 9, 38syl2anc 406 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛 +o 𝑚) ∈ Fin)
40 hashen 10371 . . . . . 6 (((𝐴𝐵) ∈ Fin ∧ (𝑛 +o 𝑚) ∈ Fin) → ((♯‘(𝐴𝐵)) = (♯‘(𝑛 +o 𝑚)) ↔ (𝐴𝐵) ≈ (𝑛 +o 𝑚)))
4136, 39, 40syl2anc 406 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘(𝐴𝐵)) = (♯‘(𝑛 +o 𝑚)) ↔ (𝐴𝐵) ≈ (𝑛 +o 𝑚)))
4234, 41mpbird 166 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘(𝐴𝐵)) = (♯‘(𝑛 +o 𝑚)))
43 nnfi 6695 . . . . . . . 8 (𝑛 ∈ ω → 𝑛 ∈ Fin)
448, 43syl 14 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑛 ∈ Fin)
45 hashen 10371 . . . . . . 7 ((𝐴 ∈ Fin ∧ 𝑛 ∈ Fin) → ((♯‘𝐴) = (♯‘𝑛) ↔ 𝐴𝑛))
4629, 44, 45syl2anc 406 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝑛) ↔ 𝐴𝑛))
4732, 46mpbird 166 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝐴) = (♯‘𝑛))
48 nnfi 6695 . . . . . . . 8 (𝑚 ∈ ω → 𝑚 ∈ Fin)
499, 48syl 14 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑚 ∈ Fin)
50 hashen 10371 . . . . . . 7 ((𝐵 ∈ Fin ∧ 𝑚 ∈ Fin) → ((♯‘𝐵) = (♯‘𝑚) ↔ 𝐵𝑚))
5130, 49, 50syl2anc 406 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐵) = (♯‘𝑚) ↔ 𝐵𝑚))
5233, 51mpbird 166 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝐵) = (♯‘𝑚))
5347, 52oveq12d 5724 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) + (♯‘𝐵)) = ((♯‘𝑛) + (♯‘𝑚)))
5428, 42, 533eqtr4d 2142 . . 3 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘(𝐴𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
557, 54rexlimddv 2513 . 2 (((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) → (♯‘(𝐴𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
563, 55rexlimddv 2513 1 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) → (♯‘(𝐴𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 103  wb 104  w3a 930   = wceq 1299  wcel 1448  wrex 2376  cun 3019  cin 3020  c0 3310   class class class wbr 3875  cmpt 3929  ωcom 4442  cfv 5059  (class class class)co 5706  freccfrec 6217   +o coa 6240  cen 6562  Fincfn 6564  0cc0 7500  1c1 7501   + caddc 7503  cz 8906  chash 10362
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 584  ax-in2 585  ax-io 671  ax-5 1391  ax-7 1392  ax-gen 1393  ax-ie1 1437  ax-ie2 1438  ax-8 1450  ax-10 1451  ax-11 1452  ax-i12 1453  ax-bndl 1454  ax-4 1455  ax-13 1459  ax-14 1460  ax-17 1474  ax-i9 1478  ax-ial 1482  ax-i5r 1483  ax-ext 2082  ax-coll 3983  ax-sep 3986  ax-nul 3994  ax-pow 4038  ax-pr 4069  ax-un 4293  ax-setind 4390  ax-iinf 4440  ax-cnex 7586  ax-resscn 7587  ax-1cn 7588  ax-1re 7589  ax-icn 7590  ax-addcl 7591  ax-addrcl 7592  ax-mulcl 7593  ax-addcom 7595  ax-addass 7597  ax-distr 7599  ax-i2m1 7600  ax-0lt1 7601  ax-0id 7603  ax-rnegex 7604  ax-cnre 7606  ax-pre-ltirr 7607  ax-pre-ltwlin 7608  ax-pre-lttrn 7609  ax-pre-ltadd 7611
This theorem depends on definitions:  df-bi 116  df-dc 787  df-3or 931  df-3an 932  df-tru 1302  df-fal 1305  df-nf 1405  df-sb 1704  df-eu 1963  df-mo 1964  df-clab 2087  df-cleq 2093  df-clel 2096  df-nfc 2229  df-ne 2268  df-nel 2363  df-ral 2380  df-rex 2381  df-reu 2382  df-rab 2384  df-v 2643  df-sbc 2863  df-csb 2956  df-dif 3023  df-un 3025  df-in 3027  df-ss 3034  df-nul 3311  df-if 3422  df-pw 3459  df-sn 3480  df-pr 3481  df-op 3483  df-uni 3684  df-int 3719  df-iun 3762  df-br 3876  df-opab 3930  df-mpt 3931  df-tr 3967  df-id 4153  df-iord 4226  df-on 4228  df-ilim 4229  df-suc 4231  df-iom 4443  df-xp 4483  df-rel 4484  df-cnv 4485  df-co 4486  df-dm 4487  df-rn 4488  df-res 4489  df-ima 4490  df-iota 5024  df-fun 5061  df-fn 5062  df-f 5063  df-f1 5064  df-fo 5065  df-f1o 5066  df-fv 5067  df-riota 5662  df-ov 5709  df-oprab 5710  df-mpo 5711  df-1st 5969  df-2nd 5970  df-recs 6132  df-irdg 6197  df-frec 6218  df-1o 6243  df-oadd 6247  df-er 6359  df-en 6565  df-dom 6566  df-fin 6567  df-pnf 7674  df-mnf 7675  df-xr 7676  df-ltxr 7677  df-le 7678  df-sub 7806  df-neg 7807  df-inn 8579  df-n0 8830  df-z 8907  df-uz 9177  df-ihash 10363
This theorem is referenced by:  hashunsng  10394  fihashssdif  10405  hashxp  10413  fsumconst  11062  phiprmpw  11690
  Copyright terms: Public domain W3C validator