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

Theorem hashen 10748
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 6755 . . . 4 (𝐴 ∈ Fin ↔ ∃𝑛 ∈ ω 𝐴𝑛)
21biimpi 120 . . 3 (𝐴 ∈ Fin → ∃𝑛 ∈ ω 𝐴𝑛)
32adantr 276 . 2 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) → ∃𝑛 ∈ ω 𝐴𝑛)
4 isfi 6755 . . . . 5 (𝐵 ∈ Fin ↔ ∃𝑚 ∈ ω 𝐵𝑚)
54biimpi 120 . . . 4 (𝐵 ∈ Fin → ∃𝑚 ∈ ω 𝐵𝑚)
65ad2antlr 489 . . 3 (((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) → ∃𝑚 ∈ ω 𝐵𝑚)
7 simplrl 535 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑛 ∈ ω)
8 simprl 529 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑚 ∈ ω)
9 nneneq 6851 . . . . 5 ((𝑛 ∈ ω ∧ 𝑚 ∈ ω) → (𝑛𝑚𝑛 = 𝑚))
107, 8, 9syl2anc 411 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛𝑚𝑛 = 𝑚))
11 simplrr 536 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐴𝑛)
12 enen1 6834 . . . . . 6 (𝐴𝑛 → (𝐴𝐵𝑛𝐵))
1311, 12syl 14 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵𝑛𝐵))
14 simprr 531 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝐵𝑚)
15 enen2 6835 . . . . . 6 (𝐵𝑚 → (𝑛𝐵𝑛𝑚))
1614, 15syl 14 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝑛𝐵𝑛𝑚))
1713, 16bitrd 188 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (𝐴𝐵𝑛𝑚))
1811ensymd 6777 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑛𝐴)
19 hashennn 10744 . . . . . . 7 ((𝑛 ∈ ω ∧ 𝑛𝐴) → (♯‘𝐴) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛))
207, 18, 19syl2anc 411 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝐴) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛))
2114ensymd 6777 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 𝑚𝐵)
22 hashennn 10744 . . . . . . 7 ((𝑚 ∈ ω ∧ 𝑚𝐵) → (♯‘𝐵) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚))
238, 21, 22syl2anc 411 . . . . . 6 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → (♯‘𝐵) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚))
2420, 23eqeq12d 2192 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝐵) ↔ (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚)))
25 0zd 9254 . . . . . . . 8 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → 0 ∈ ℤ)
26 eqid 2177 . . . . . . . 8 frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0) = frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)
2725, 26frec2uzf1od 10392 . . . . . . 7 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0):ω–1-1-onto→(ℤ‘0))
28 f1of1 5456 . . . . . . 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 5767 . . . . . 6 ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0):ω–1-1→(ℤ‘0) ∧ (𝑛 ∈ ω ∧ 𝑚 ∈ ω)) → ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚) ↔ 𝑛 = 𝑚))
3129, 7, 8, 30syl12anc 1236 . . . . 5 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑛) = (frec((𝑥 ∈ ℤ ↦ (𝑥 + 1)), 0)‘𝑚) ↔ 𝑛 = 𝑚))
3224, 31bitrd 188 . . . 4 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝑛 = 𝑚))
3310, 17, 323bitr4rd 221 . . 3 ((((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) ∧ (𝑚 ∈ ω ∧ 𝐵𝑚)) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝐴𝐵))
346, 33rexlimddv 2599 . 2 (((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) ∧ (𝑛 ∈ ω ∧ 𝐴𝑛)) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝐴𝐵))
353, 34rexlimddv 2599 1 ((𝐴 ∈ Fin ∧ 𝐵 ∈ Fin) → ((♯‘𝐴) = (♯‘𝐵) ↔ 𝐴𝐵))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 104  wb 105   = wceq 1353  wcel 2148  wrex 2456   class class class wbr 4000  cmpt 4061  ωcom 4586  1-1wf1 5209  1-1-ontowf1o 5211  cfv 5212  (class class class)co 5869  freccfrec 6385  cen 6732  Fincfn 6734  0cc0 7802  1c1 7803   + caddc 7805  cz 9242  cuz 9517  chash 10739
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 614  ax-in2 615  ax-io 709  ax-5 1447  ax-7 1448  ax-gen 1449  ax-ie1 1493  ax-ie2 1494  ax-8 1504  ax-10 1505  ax-11 1506  ax-i12 1507  ax-bndl 1509  ax-4 1510  ax-17 1526  ax-i9 1530  ax-ial 1534  ax-i5r 1535  ax-13 2150  ax-14 2151  ax-ext 2159  ax-coll 4115  ax-sep 4118  ax-nul 4126  ax-pow 4171  ax-pr 4206  ax-un 4430  ax-setind 4533  ax-iinf 4584  ax-cnex 7893  ax-resscn 7894  ax-1cn 7895  ax-1re 7896  ax-icn 7897  ax-addcl 7898  ax-addrcl 7899  ax-mulcl 7900  ax-addcom 7902  ax-addass 7904  ax-distr 7906  ax-i2m1 7907  ax-0lt1 7908  ax-0id 7910  ax-rnegex 7911  ax-cnre 7913  ax-pre-ltirr 7914  ax-pre-ltwlin 7915  ax-pre-lttrn 7916  ax-pre-ltadd 7918
This theorem depends on definitions:  df-bi 117  df-dc 835  df-3or 979  df-3an 980  df-tru 1356  df-fal 1359  df-nf 1461  df-sb 1763  df-eu 2029  df-mo 2030  df-clab 2164  df-cleq 2170  df-clel 2173  df-nfc 2308  df-ne 2348  df-nel 2443  df-ral 2460  df-rex 2461  df-reu 2462  df-rab 2464  df-v 2739  df-sbc 2963  df-csb 3058  df-dif 3131  df-un 3133  df-in 3135  df-ss 3142  df-nul 3423  df-pw 3576  df-sn 3597  df-pr 3598  df-op 3600  df-uni 3808  df-int 3843  df-iun 3886  df-br 4001  df-opab 4062  df-mpt 4063  df-tr 4099  df-id 4290  df-iord 4363  df-on 4365  df-ilim 4366  df-suc 4368  df-iom 4587  df-xp 4629  df-rel 4630  df-cnv 4631  df-co 4632  df-dm 4633  df-rn 4634  df-res 4635  df-ima 4636  df-iota 5174  df-fun 5214  df-fn 5215  df-f 5216  df-f1 5217  df-fo 5218  df-f1o 5219  df-fv 5220  df-riota 5825  df-ov 5872  df-oprab 5873  df-mpo 5874  df-recs 6300  df-frec 6386  df-er 6529  df-en 6735  df-dom 6736  df-fin 6737  df-pnf 7984  df-mnf 7985  df-xr 7986  df-ltxr 7987  df-le 7988  df-sub 8120  df-neg 8121  df-inn 8909  df-n0 9166  df-z 9243  df-uz 9518  df-ihash 10740
This theorem is referenced by:  hasheqf1o  10749  isfinite4im  10756  fihasheq0  10757  hashsng  10762  fihashen1  10763  fihashfn  10764  hashun  10769  hashfz  10785  hashxp  10790  mertenslemi1  11527  hashdvds  12204  crth  12207  phimullem  12208  eulerth  12216
  Copyright terms: Public domain W3C validator