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

Theorem hashun 10826
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 6791 . . . 4 (𝐴 ∈ Fin ↔ ∃𝑛 ∈ ω 𝐴𝑛)
21biimpi 120 . . 3 (𝐴 ∈ Fin → ∃𝑛 ∈ ω 𝐴𝑛)
323ad2ant1 1020 . 2 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) → ∃𝑛 ∈ ω 𝐴𝑛)
4 isfi 6791 . . . . . 6 (𝐵 ∈ Fin ↔ ∃𝑚 ∈ ω 𝐵𝑚)
54biimpi 120 . . . . 5 (𝐵 ∈ Fin → ∃𝑚 ∈ ω 𝐵𝑚)
653ad2ant2 1021 . . . 4 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) → ∃𝑚 ∈ ω 𝐵𝑚)
76adantr 276 . . 3 (((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) → ∃𝑚 ∈ ω 𝐵𝑚)
8 simplrl 535 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑛 ∈ ω)
9 simprl 529 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑚 ∈ ω)
10 eqid 2189 . . . . . . 7 frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0) = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)
1110omgadd 10823 . . . . . 6 ((𝑛 ∈ ω ∧ 𝑚 ∈ ω) → (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘(𝑛 +o 𝑚)) = ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) + (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚)))
128, 9, 11syl2anc 411 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘(𝑛 +o 𝑚)) = ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) + (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚)))
13 nnacl 6509 . . . . . . 7 ((𝑛 ∈ ω ∧ 𝑚 ∈ ω) → (𝑛 +o 𝑚) ∈ ω)
148, 9, 13syl2anc 411 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛 +o 𝑚) ∈ ω)
15 enrefg 6794 . . . . . . 7 ((𝑛 +o 𝑚) ∈ ω → (𝑛 +o 𝑚) ≈ (𝑛 +o 𝑚))
1614, 15syl 14 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛 +o 𝑚) ≈ (𝑛 +o 𝑚))
17 hashennn 10801 . . . . . 6 (((𝑛 +o 𝑚) ∈ ω ∧ (𝑛 +o 𝑚) ≈ (𝑛 +o 𝑚)) → (♯‘(𝑛 +o 𝑚)) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘(𝑛 +o 𝑚)))
1814, 16, 17syl2anc 411 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘(𝑛 +o 𝑚)) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘(𝑛 +o 𝑚)))
19 vex 2755 . . . . . . . 8 𝑛 ∈ V
2019enref 6795 . . . . . . 7 𝑛𝑛
21 hashennn 10801 . . . . . . 7 ((𝑛 ∈ ω ∧ 𝑛𝑛) → (♯‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛))
228, 20, 21sylancl 413 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛))
23 vex 2755 . . . . . . . 8 𝑚 ∈ V
2423enref 6795 . . . . . . 7 𝑚𝑚
25 hashennn 10801 . . . . . . 7 ((𝑚 ∈ ω ∧ 𝑚𝑚) → (♯‘𝑚) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚))
269, 24, 25sylancl 413 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝑚) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚))
2722, 26oveq12d 5918 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝑛) + (♯‘𝑚)) = ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) + (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚)))
2812, 18, 273eqtr4d 2232 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘(𝑛 +o 𝑚)) = ((♯‘𝑛) + (♯‘𝑚)))
29 simpll1 1038 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐴 ∈ Fin)
30 simpll2 1039 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐵 ∈ Fin)
31 simpll3 1040 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵) = ∅)
32 simplrr 536 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐴𝑛)
33 simprr 531 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐵𝑚)
3429, 30, 31, 8, 9, 32, 33hashunlem 10825 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵) ≈ (𝑛 +o 𝑚))
35 unfidisj 6954 . . . . . . 7 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) → (𝐴𝐵) ∈ Fin)
3635ad2antrr 488 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵) ∈ Fin)
37 nnfi 6904 . . . . . . . 8 ((𝑛 +o 𝑚) ∈ ω → (𝑛 +o 𝑚) ∈ Fin)
3813, 37syl 14 . . . . . . 7 ((𝑛 ∈ ω ∧ 𝑚 ∈ ω) → (𝑛 +o 𝑚) ∈ Fin)
398, 9, 38syl2anc 411 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛 +o 𝑚) ∈ Fin)
40 hashen 10805 . . . . . 6 (((𝐴𝐵) ∈ Fin ∧ (𝑛 +o 𝑚) ∈ Fin) → ((♯‘(𝐴𝐵)) = (♯‘(𝑛 +o 𝑚)) ↔ (𝐴𝐵) ≈ (𝑛 +o 𝑚)))
4136, 39, 40syl2anc 411 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘(𝐴𝐵)) = (♯‘(𝑛 +o 𝑚)) ↔ (𝐴𝐵) ≈ (𝑛 +o 𝑚)))
4234, 41mpbird 167 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘(𝐴𝐵)) = (♯‘(𝑛 +o 𝑚)))
43 nnfi 6904 . . . . . . . 8 (𝑛 ∈ ω → 𝑛 ∈ Fin)
448, 43syl 14 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑛 ∈ Fin)
45 hashen 10805 . . . . . . 7 ((𝐴 ∈ Fin ∧ 𝑛 ∈ Fin) → ((♯‘𝐴) = (♯‘𝑛) ↔ 𝐴𝑛))
4629, 44, 45syl2anc 411 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝑛) ↔ 𝐴𝑛))
4732, 46mpbird 167 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝐴) = (♯‘𝑛))
48 nnfi 6904 . . . . . . . 8 (𝑚 ∈ ω → 𝑚 ∈ Fin)
499, 48syl 14 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑚 ∈ Fin)
50 hashen 10805 . . . . . . 7 ((𝐵 ∈ Fin ∧ 𝑚 ∈ Fin) → ((♯‘𝐵) = (♯‘𝑚) ↔ 𝐵𝑚))
5130, 49, 50syl2anc 411 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐵) = (♯‘𝑚) ↔ 𝐵𝑚))
5233, 51mpbird 167 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝐵) = (♯‘𝑚))
5347, 52oveq12d 5918 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) + (♯‘𝐵)) = ((♯‘𝑛) + (♯‘𝑚)))
5428, 42, 533eqtr4d 2232 . . 3 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘(𝐴𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
557, 54rexlimddv 2612 . 2 (((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) → (♯‘(𝐴𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
563, 55rexlimddv 2612 1 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin ∧ (𝐴𝐵) = ∅) → (♯‘(𝐴𝐵)) = ((♯‘𝐴) + (♯‘𝐵)))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 104  wb 105  w3a 980   = wceq 1364  wcel 2160  wrex 2469  cun 3142  cin 3143  c0 3437   class class class wbr 4021  cmpt 4082  ωcom 4610  cfv 5238  (class class class)co 5900  freccfrec 6419   +o coa 6442  cen 6768  Fincfn 6770  0cc0 7846  1c1 7847   + caddc 7849  cz 9288  chash 10796
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 710  ax-5 1458  ax-7 1459  ax-gen 1460  ax-ie1 1504  ax-ie2 1505  ax-8 1515  ax-10 1516  ax-11 1517  ax-i12 1518  ax-bndl 1520  ax-4 1521  ax-17 1537  ax-i9 1541  ax-ial 1545  ax-i5r 1546  ax-13 2162  ax-14 2163  ax-ext 2171  ax-coll 4136  ax-sep 4139  ax-nul 4147  ax-pow 4195  ax-pr 4230  ax-un 4454  ax-setind 4557  ax-iinf 4608  ax-cnex 7937  ax-resscn 7938  ax-1cn 7939  ax-1re 7940  ax-icn 7941  ax-addcl 7942  ax-addrcl 7943  ax-mulcl 7944  ax-addcom 7946  ax-addass 7948  ax-distr 7950  ax-i2m1 7951  ax-0lt1 7952  ax-0id 7954  ax-rnegex 7955  ax-cnre 7957  ax-pre-ltirr 7958  ax-pre-ltwlin 7959  ax-pre-lttrn 7960  ax-pre-ltadd 7962
This theorem depends on definitions:  df-bi 117  df-dc 836  df-3or 981  df-3an 982  df-tru 1367  df-fal 1370  df-nf 1472  df-sb 1774  df-eu 2041  df-mo 2042  df-clab 2176  df-cleq 2182  df-clel 2185  df-nfc 2321  df-ne 2361  df-nel 2456  df-ral 2473  df-rex 2474  df-reu 2475  df-rab 2477  df-v 2754  df-sbc 2978  df-csb 3073  df-dif 3146  df-un 3148  df-in 3150  df-ss 3157  df-nul 3438  df-if 3550  df-pw 3595  df-sn 3616  df-pr 3617  df-op 3619  df-uni 3828  df-int 3863  df-iun 3906  df-br 4022  df-opab 4083  df-mpt 4084  df-tr 4120  df-id 4314  df-iord 4387  df-on 4389  df-ilim 4390  df-suc 4392  df-iom 4611  df-xp 4653  df-rel 4654  df-cnv 4655  df-co 4656  df-dm 4657  df-rn 4658  df-res 4659  df-ima 4660  df-iota 5199  df-fun 5240  df-fn 5241  df-f 5242  df-f1 5243  df-fo 5244  df-f1o 5245  df-fv 5246  df-riota 5855  df-ov 5903  df-oprab 5904  df-mpo 5905  df-1st 6169  df-2nd 6170  df-recs 6334  df-irdg 6399  df-frec 6420  df-1o 6445  df-oadd 6449  df-er 6563  df-en 6771  df-dom 6772  df-fin 6773  df-pnf 8029  df-mnf 8030  df-xr 8031  df-ltxr 8032  df-le 8033  df-sub 8165  df-neg 8166  df-inn 8955  df-n0 9212  df-z 9289  df-uz 9564  df-ihash 10797
This theorem is referenced by:  hashunsng  10828  fihashssdif  10839  hashxp  10847  fsumconst  11503  phiprmpw  12265  4sqlem11  12444
  Copyright terms: Public domain W3C validator