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

Theorem hashen 10530
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 6655 . . . 4 (𝐴 ∈ Fin ↔ ∃𝑛 ∈ ω 𝐴𝑛)
21biimpi 119 . . 3 (𝐴 ∈ Fin → ∃𝑛 ∈ ω 𝐴𝑛)
32adantr 274 . 2 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) → ∃𝑛 ∈ ω 𝐴𝑛)
4 isfi 6655 . . . . 5 (𝐵 ∈ Fin ↔ ∃𝑚 ∈ ω 𝐵𝑚)
54biimpi 119 . . . 4 (𝐵 ∈ Fin → ∃𝑚 ∈ ω 𝐵𝑚)
65ad2antlr 480 . . 3 (((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) → ∃𝑚 ∈ ω 𝐵𝑚)
7 simplrl 524 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑛 ∈ ω)
8 simprl 520 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑚 ∈ ω)
9 nneneq 6751 . . . . 5 ((𝑛 ∈ ω ∧ 𝑚 ∈ ω) → (𝑛𝑚𝑛 = 𝑚))
107, 8, 9syl2anc 408 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛𝑚𝑛 = 𝑚))
11 simplrr 525 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐴𝑛)
12 enen1 6734 . . . . . 6 (𝐴𝑛 → (𝐴𝐵𝑛𝐵))
1311, 12syl 14 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵𝑛𝐵))
14 simprr 521 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐵𝑚)
15 enen2 6735 . . . . . 6 (𝐵𝑚 → (𝑛𝐵𝑛𝑚))
1614, 15syl 14 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛𝐵𝑛𝑚))
1713, 16bitrd 187 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵𝑛𝑚))
1811ensymd 6677 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑛𝐴)
19 hashennn 10526 . . . . . . 7 ((𝑛 ∈ ω ∧ 𝑛𝐴) → (♯‘𝐴) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛))
207, 18, 19syl2anc 408 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝐴) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛))
2114ensymd 6677 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑚𝐵)
22 hashennn 10526 . . . . . . 7 ((𝑚 ∈ ω ∧ 𝑚𝐵) → (♯‘𝐵) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚))
238, 21, 22syl2anc 408 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝐵) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚))
2420, 23eqeq12d 2154 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝐵) ↔ (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚)))
25 0zd 9066 . . . . . . . 8 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 0 ∈ ℤ)
26 eqid 2139 . . . . . . . 8 frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0) = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)
2725, 26frec2uzf1od 10179 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0):ω–1-1-onto→(ℤ‘0))
28 f1of1 5366 . . . . . . 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 5673 . . . . . 6 ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0):ω–1-1→(ℤ‘0) ∧ (𝑛 ∈ ω ∧ 𝑚 ∈ ω)) → ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚) ↔ 𝑛 = 𝑚))
3129, 7, 8, 30syl12anc 1214 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚) ↔ 𝑛 = 𝑚))
3224, 31bitrd 187 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝑛 = 𝑚))
3310, 17, 323bitr4rd 220 . . 3 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝐴𝐵))
346, 33rexlimddv 2554 . 2 (((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝐴𝐵))
353, 34rexlimddv 2554 1 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝐴𝐵))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 103  wb 104   = wceq 1331  wcel 1480  wrex 2417   class class class wbr 3929  cmpt 3989  ωcom 4504  1-1wf1 5120  1-1-ontowf1o 5122  cfv 5123  (class class class)co 5774  freccfrec 6287  cen 6632  Fincfn 6634  0cc0 7620  1c1 7621   + caddc 7623  cz 9054  cuz 9326  chash 10521
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 603  ax-in2 604  ax-io 698  ax-5 1423  ax-7 1424  ax-gen 1425  ax-ie1 1469  ax-ie2 1470  ax-8 1482  ax-10 1483  ax-11 1484  ax-i12 1485  ax-bndl 1486  ax-4 1487  ax-13 1491  ax-14 1492  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-ext 2121  ax-coll 4043  ax-sep 4046  ax-nul 4054  ax-pow 4098  ax-pr 4131  ax-un 4355  ax-setind 4452  ax-iinf 4502  ax-cnex 7711  ax-resscn 7712  ax-1cn 7713  ax-1re 7714  ax-icn 7715  ax-addcl 7716  ax-addrcl 7717  ax-mulcl 7718  ax-addcom 7720  ax-addass 7722  ax-distr 7724  ax-i2m1 7725  ax-0lt1 7726  ax-0id 7728  ax-rnegex 7729  ax-cnre 7731  ax-pre-ltirr 7732  ax-pre-ltwlin 7733  ax-pre-lttrn 7734  ax-pre-ltadd 7736
This theorem depends on definitions:  df-bi 116  df-dc 820  df-3or 963  df-3an 964  df-tru 1334  df-fal 1337  df-nf 1437  df-sb 1736  df-eu 2002  df-mo 2003  df-clab 2126  df-cleq 2132  df-clel 2135  df-nfc 2270  df-ne 2309  df-nel 2404  df-ral 2421  df-rex 2422  df-reu 2423  df-rab 2425  df-v 2688  df-sbc 2910  df-csb 3004  df-dif 3073  df-un 3075  df-in 3077  df-ss 3084  df-nul 3364  df-pw 3512  df-sn 3533  df-pr 3534  df-op 3536  df-uni 3737  df-int 3772  df-iun 3815  df-br 3930  df-opab 3990  df-mpt 3991  df-tr 4027  df-id 4215  df-iord 4288  df-on 4290  df-ilim 4291  df-suc 4293  df-iom 4505  df-xp 4545  df-rel 4546  df-cnv 4547  df-co 4548  df-dm 4549  df-rn 4550  df-res 4551  df-ima 4552  df-iota 5088  df-fun 5125  df-fn 5126  df-f 5127  df-f1 5128  df-fo 5129  df-f1o 5130  df-fv 5131  df-riota 5730  df-ov 5777  df-oprab 5778  df-mpo 5779  df-recs 6202  df-frec 6288  df-er 6429  df-en 6635  df-dom 6636  df-fin 6637  df-pnf 7802  df-mnf 7803  df-xr 7804  df-ltxr 7805  df-le 7806  df-sub 7935  df-neg 7936  df-inn 8721  df-n0 8978  df-z 9055  df-uz 9327  df-ihash 10522
This theorem is referenced by:  hasheqf1o  10531  isfinite4im  10539  fihasheq0  10540  hashsng  10544  fihashen1  10545  fihashfn  10546  hashun  10551  hashfz  10567  hashxp  10572  mertenslemi1  11304  hashdvds  11897  crth  11900  phimullem  11901
  Copyright terms: Public domain W3C validator