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

Theorem hashen 10323
Description: Two finite sets have the same number of elements iff they are equinumerous. (Contributed by Paul Chapman, 22-Jun-2011.) (Revised by Mario Carneiro, 15-Sep-2013.)
Assertion
Ref Expression
hashen ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝐴𝐵))

Proof of Theorem hashen
Dummy variables 𝑚 𝑛 𝑥 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 isfi 6558 . . . 4 (𝐴 ∈ Fin ↔ ∃𝑛 ∈ ω 𝐴𝑛)
21biimpi 119 . . 3 (𝐴 ∈ Fin → ∃𝑛 ∈ ω 𝐴𝑛)
32adantr 271 . 2 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) → ∃𝑛 ∈ ω 𝐴𝑛)
4 isfi 6558 . . . . 5 (𝐵 ∈ Fin ↔ ∃𝑚 ∈ ω 𝐵𝑚)
54biimpi 119 . . . 4 (𝐵 ∈ Fin → ∃𝑚 ∈ ω 𝐵𝑚)
65ad2antlr 474 . . 3 (((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) → ∃𝑚 ∈ ω 𝐵𝑚)
7 simplrl 503 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑛 ∈ ω)
8 simprl 499 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑚 ∈ ω)
9 nneneq 6653 . . . . 5 ((𝑛 ∈ ω ∧ 𝑚 ∈ ω) → (𝑛𝑚𝑛 = 𝑚))
107, 8, 9syl2anc 404 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛𝑚𝑛 = 𝑚))
11 simplrr 504 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐴𝑛)
12 enen1 6636 . . . . . 6 (𝐴𝑛 → (𝐴𝐵𝑛𝐵))
1311, 12syl 14 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵𝑛𝐵))
14 simprr 500 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐵𝑚)
15 enen2 6637 . . . . . 6 (𝐵𝑚 → (𝑛𝐵𝑛𝑚))
1614, 15syl 14 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛𝐵𝑛𝑚))
1713, 16bitrd 187 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵𝑛𝑚))
1811ensymd 6580 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑛𝐴)
19 hashennn 10319 . . . . . . 7 ((𝑛 ∈ ω ∧ 𝑛𝐴) → (♯‘𝐴) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛))
207, 18, 19syl2anc 404 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝐴) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛))
2114ensymd 6580 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑚𝐵)
22 hashennn 10319 . . . . . . 7 ((𝑚 ∈ ω ∧ 𝑚𝐵) → (♯‘𝐵) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚))
238, 21, 22syl2anc 404 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝐵) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚))
2420, 23eqeq12d 2109 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝐵) ↔ (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚)))
25 0zd 8860 . . . . . . . 8 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 0 ∈ ℤ)
26 eqid 2095 . . . . . . . 8 frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0) = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)
2725, 26frec2uzf1od 9962 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0):ω–1-1-onto→(ℤ‘0))
28 f1of1 5287 . . . . . . 7 (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0):ω–1-1-onto→(ℤ‘0) → frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0):ω–1-1→(ℤ‘0))
2927, 28syl 14 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0):ω–1-1→(ℤ‘0))
30 f1fveq 5589 . . . . . 6 ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0):ω–1-1→(ℤ‘0) ∧ (𝑛 ∈ ω ∧ 𝑚 ∈ ω)) → ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚) ↔ 𝑛 = 𝑚))
3129, 7, 8, 30syl12anc 1179 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚) ↔ 𝑛 = 𝑚))
3224, 31bitrd 187 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝑛 = 𝑚))
3310, 17, 323bitr4rd 220 . . 3 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝐴𝐵))
346, 33rexlimddv 2507 . 2 (((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝐴𝐵))
353, 34rexlimddv 2507 1 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝐴𝐵))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 103  wb 104   = wceq 1296  wcel 1445  wrex 2371   class class class wbr 3867  cmpt 3921  ωcom 4433  1-1wf1 5046  1-1-ontowf1o 5048  cfv 5049  (class class class)co 5690  freccfrec 6193  cen 6535  Fincfn 6537  0cc0 7447  1c1 7448   + caddc 7450  cz 8848  cuz 9118  chash 10314
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 582  ax-in2 583  ax-io 668  ax-5 1388  ax-7 1389  ax-gen 1390  ax-ie1 1434  ax-ie2 1435  ax-8 1447  ax-10 1448  ax-11 1449  ax-i12 1450  ax-bndl 1451  ax-4 1452  ax-13 1456  ax-14 1457  ax-17 1471  ax-i9 1475  ax-ial 1479  ax-i5r 1480  ax-ext 2077  ax-coll 3975  ax-sep 3978  ax-nul 3986  ax-pow 4030  ax-pr 4060  ax-un 4284  ax-setind 4381  ax-iinf 4431  ax-cnex 7533  ax-resscn 7534  ax-1cn 7535  ax-1re 7536  ax-icn 7537  ax-addcl 7538  ax-addrcl 7539  ax-mulcl 7540  ax-addcom 7542  ax-addass 7544  ax-distr 7546  ax-i2m1 7547  ax-0lt1 7548  ax-0id 7550  ax-rnegex 7551  ax-cnre 7553  ax-pre-ltirr 7554  ax-pre-ltwlin 7555  ax-pre-lttrn 7556  ax-pre-ltadd 7558
This theorem depends on definitions:  df-bi 116  df-dc 784  df-3or 928  df-3an 929  df-tru 1299  df-fal 1302  df-nf 1402  df-sb 1700  df-eu 1958  df-mo 1959  df-clab 2082  df-cleq 2088  df-clel 2091  df-nfc 2224  df-ne 2263  df-nel 2358  df-ral 2375  df-rex 2376  df-reu 2377  df-rab 2379  df-v 2635  df-sbc 2855  df-csb 2948  df-dif 3015  df-un 3017  df-in 3019  df-ss 3026  df-nul 3303  df-pw 3451  df-sn 3472  df-pr 3473  df-op 3475  df-uni 3676  df-int 3711  df-iun 3754  df-br 3868  df-opab 3922  df-mpt 3923  df-tr 3959  df-id 4144  df-iord 4217  df-on 4219  df-ilim 4220  df-suc 4222  df-iom 4434  df-xp 4473  df-rel 4474  df-cnv 4475  df-co 4476  df-dm 4477  df-rn 4478  df-res 4479  df-ima 4480  df-iota 5014  df-fun 5051  df-fn 5052  df-f 5053  df-f1 5054  df-fo 5055  df-f1o 5056  df-fv 5057  df-riota 5646  df-ov 5693  df-oprab 5694  df-mpt2 5695  df-recs 6108  df-frec 6194  df-er 6332  df-en 6538  df-dom 6539  df-fin 6540  df-pnf 7621  df-mnf 7622  df-xr 7623  df-ltxr 7624  df-le 7625  df-sub 7752  df-neg 7753  df-inn 8521  df-n0 8772  df-z 8849  df-uz 9119  df-ihash 10315
This theorem is referenced by:  hasheqf1o  10324  isfinite4im  10332  fihasheq0  10333  hashsng  10337  fihashen1  10338  fihashfn  10339  hashun  10344  hashfz  10360  hashxp  10365  mertenslemi1  11094  hashdvds  11640  crth  11643  phimullem  11644
  Copyright terms: Public domain W3C validator