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

Theorem hashen 10537
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  |-  ( ( A  e.  Fin  /\  B  e.  Fin )  ->  ( ( `  A
)  =  ( `  B
)  <->  A  ~~  B ) )

Proof of Theorem hashen
Dummy variables  m  n  x are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 isfi 6655 . . . 4  |-  ( A  e.  Fin  <->  E. n  e.  om  A  ~~  n
)
21biimpi 119 . . 3  |-  ( A  e.  Fin  ->  E. n  e.  om  A  ~~  n
)
32adantr 274 . 2  |-  ( ( A  e.  Fin  /\  B  e.  Fin )  ->  E. n  e.  om  A  ~~  n )
4 isfi 6655 . . . . 5  |-  ( B  e.  Fin  <->  E. m  e.  om  B  ~~  m
)
54biimpi 119 . . . 4  |-  ( B  e.  Fin  ->  E. m  e.  om  B  ~~  m
)
65ad2antlr 480 . . 3  |-  ( ( ( A  e.  Fin  /\  B  e.  Fin )  /\  ( n  e.  om  /\  A  ~~  n ) )  ->  E. m  e.  om  B  ~~  m
)
7 simplrl 524 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  n  e.  om )
8 simprl 520 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  m  e.  om )
9 nneneq 6751 . . . . 5  |-  ( ( n  e.  om  /\  m  e.  om )  ->  ( n  ~~  m  <->  n  =  m ) )
107, 8, 9syl2anc 408 . . . 4  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( n  ~~  m  <->  n  =  m ) )
11 simplrr 525 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  A  ~~  n )
12 enen1 6734 . . . . . 6  |-  ( A 
~~  n  ->  ( A  ~~  B  <->  n  ~~  B ) )
1311, 12syl 14 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( A  ~~  B  <->  n 
~~  B ) )
14 simprr 521 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  B  ~~  m )
15 enen2 6735 . . . . . 6  |-  ( B 
~~  m  ->  (
n  ~~  B  <->  n  ~~  m ) )
1614, 15syl 14 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( n  ~~  B  <->  n 
~~  m ) )
1713, 16bitrd 187 . . . 4  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( A  ~~  B  <->  n 
~~  m ) )
1811ensymd 6677 . . . . . . 7  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  n  ~~  A )
19 hashennn 10533 . . . . . . 7  |-  ( ( n  e.  om  /\  n  ~~  A )  -> 
( `  A )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  n ) )
207, 18, 19syl2anc 408 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( `  A )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  n ) )
2114ensymd 6677 . . . . . . 7  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  m  ~~  B )
22 hashennn 10533 . . . . . . 7  |-  ( ( m  e.  om  /\  m  ~~  B )  -> 
( `  B )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  m ) )
238, 21, 22syl2anc 408 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( `  B )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  m ) )
2420, 23eqeq12d 2154 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( ( `  A
)  =  ( `  B
)  <->  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  n )  =  (frec ( ( x  e.  ZZ  |->  ( x  + 
1 ) ) ,  0 ) `  m
) ) )
25 0zd 9073 . . . . . . . 8  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
0  e.  ZZ )
26 eqid 2139 . . . . . . . 8  |- frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 )  = frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 )
2725, 26frec2uzf1od 10186 . . . . . . 7  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> frec ( ( x  e.  ZZ  |->  ( x  + 
1 ) ) ,  0 ) : om -1-1-onto-> ( ZZ>=
`  0 ) )
28 f1of1 5366 . . . . . . 7  |-  (frec ( ( x  e.  ZZ  |->  ( x  +  1
) ) ,  0 ) : om -1-1-onto-> ( ZZ>= `  0 )  -> frec ( ( x  e.  ZZ  |->  ( x  + 
1 ) ) ,  0 ) : om -1-1-> (
ZZ>= `  0 ) )
2927, 28syl 14 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> frec ( ( x  e.  ZZ  |->  ( x  + 
1 ) ) ,  0 ) : om -1-1-> (
ZZ>= `  0 ) )
30 f1fveq 5673 . . . . . 6  |-  ( (frec ( ( x  e.  ZZ  |->  ( x  + 
1 ) ) ,  0 ) : om -1-1-> (
ZZ>= `  0 )  /\  ( n  e.  om  /\  m  e.  om )
)  ->  ( (frec ( ( x  e.  ZZ  |->  ( x  + 
1 ) ) ,  0 ) `  n
)  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1
) ) ,  0 ) `  m )  <-> 
n  =  m ) )
3129, 7, 8, 30syl12anc 1214 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `
 n )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  m )  <->  n  =  m ) )
3224, 31bitrd 187 . . . 4  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( ( `  A
)  =  ( `  B
)  <->  n  =  m
) )
3310, 17, 323bitr4rd 220 . . 3  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( ( `  A
)  =  ( `  B
)  <->  A  ~~  B ) )
346, 33rexlimddv 2554 . 2  |-  ( ( ( A  e.  Fin  /\  B  e.  Fin )  /\  ( n  e.  om  /\  A  ~~  n ) )  ->  ( ( `  A )  =  ( `  B )  <->  A  ~~  B ) )
353, 34rexlimddv 2554 1  |-  ( ( A  e.  Fin  /\  B  e.  Fin )  ->  ( ( `  A
)  =  ( `  B
)  <->  A  ~~  B ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 103    <-> wb 104    = wceq 1331    e. wcel 1480   E.wrex 2417   class class class wbr 3929    |-> cmpt 3989   omcom 4504   -1-1->wf1 5120   -1-1-onto->wf1o 5122   ` cfv 5123  (class class class)co 5774  freccfrec 6287    ~~ cen 6632   Fincfn 6634   0cc0 7627   1c1 7628    + caddc 7630   ZZcz 9061   ZZ>=cuz 9333  ♯chash 10528
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 7718  ax-resscn 7719  ax-1cn 7720  ax-1re 7721  ax-icn 7722  ax-addcl 7723  ax-addrcl 7724  ax-mulcl 7725  ax-addcom 7727  ax-addass 7729  ax-distr 7731  ax-i2m1 7732  ax-0lt1 7733  ax-0id 7735  ax-rnegex 7736  ax-cnre 7738  ax-pre-ltirr 7739  ax-pre-ltwlin 7740  ax-pre-lttrn 7741  ax-pre-ltadd 7743
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 7809  df-mnf 7810  df-xr 7811  df-ltxr 7812  df-le 7813  df-sub 7942  df-neg 7943  df-inn 8728  df-n0 8985  df-z 9062  df-uz 9334  df-ihash 10529
This theorem is referenced by:  hasheqf1o  10538  isfinite4im  10546  fihasheq0  10547  hashsng  10551  fihashen1  10552  fihashfn  10553  hashun  10558  hashfz  10574  hashxp  10579  mertenslemi1  11311  hashdvds  11904  crth  11907  phimullem  11908
  Copyright terms: Public domain W3C validator