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

Theorem hashen 10041
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 6411 . . . 4  |-  ( A  e.  Fin  <->  E. n  e.  om  A  ~~  n
)
21biimpi 118 . . 3  |-  ( A  e.  Fin  ->  E. n  e.  om  A  ~~  n
)
32adantr 270 . 2  |-  ( ( A  e.  Fin  /\  B  e.  Fin )  ->  E. n  e.  om  A  ~~  n )
4 isfi 6411 . . . . 5  |-  ( B  e.  Fin  <->  E. m  e.  om  B  ~~  m
)
54biimpi 118 . . . 4  |-  ( B  e.  Fin  ->  E. m  e.  om  B  ~~  m
)
65ad2antlr 473 . . 3  |-  ( ( ( A  e.  Fin  /\  B  e.  Fin )  /\  ( n  e.  om  /\  A  ~~  n ) )  ->  E. m  e.  om  B  ~~  m
)
7 simplrl 502 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  n  e.  om )
8 simprl 498 . . . . 5  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  m  e.  om )
9 nneneq 6506 . . . . 5  |-  ( ( n  e.  om  /\  m  e.  om )  ->  ( n  ~~  m  <->  n  =  m ) )
107, 8, 9syl2anc 403 . . . 4  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( n  ~~  m  <->  n  =  m ) )
11 simplrr 503 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  A  ~~  n )
12 enen1 6489 . . . . . 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 499 . . . . . 6  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  B  ~~  m )
15 enen2 6490 . . . . . 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 186 . . . 4  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( A  ~~  B  <->  n 
~~  m ) )
1811ensymd 6433 . . . . . . 7  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  n  ~~  A )
19 hashennn 10037 . . . . . . 7  |-  ( ( n  e.  om  /\  n  ~~  A )  -> 
( `  A )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  n ) )
207, 18, 19syl2anc 403 . . . . . 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 6433 . . . . . . 7  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  ->  m  ~~  B )
22 hashennn 10037 . . . . . . 7  |-  ( ( m  e.  om  /\  m  ~~  B )  -> 
( `  B )  =  (frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 ) `  m ) )
238, 21, 22syl2anc 403 . . . . . 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 2099 . . . . 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 8672 . . . . . . . 8  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
0  e.  ZZ )
26 eqid 2085 . . . . . . . 8  |- frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 )  = frec ( ( x  e.  ZZ  |->  ( x  +  1 ) ) ,  0 )
2725, 26frec2uzf1od 9716 . . . . . . 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 5203 . . . . . . 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 5494 . . . . . 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 1170 . . . . 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 186 . . . 4  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( ( `  A
)  =  ( `  B
)  <->  n  =  m
) )
3310, 17, 323bitr4rd 219 . . 3  |-  ( ( ( ( A  e. 
Fin  /\  B  e.  Fin )  /\  (
n  e.  om  /\  A  ~~  n ) )  /\  ( m  e. 
om  /\  B  ~~  m ) )  -> 
( ( `  A
)  =  ( `  B
)  <->  A  ~~  B ) )
346, 33rexlimddv 2489 . 2  |-  ( ( ( A  e.  Fin  /\  B  e.  Fin )  /\  ( n  e.  om  /\  A  ~~  n ) )  ->  ( ( `  A )  =  ( `  B )  <->  A  ~~  B ) )
353, 34rexlimddv 2489 1  |-  ( ( A  e.  Fin  /\  B  e.  Fin )  ->  ( ( `  A
)  =  ( `  B
)  <->  A  ~~  B ) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    /\ wa 102    <-> wb 103    = wceq 1287    e. wcel 1436   E.wrex 2356   class class class wbr 3814    |-> cmpt 3868   omcom 4371   -1-1->wf1 4969   -1-1-onto->wf1o 4971   ` cfv 4972  (class class class)co 5594  freccfrec 6090    ~~ cen 6388   Fincfn 6390   0cc0 7271   1c1 7272    + caddc 7274   ZZcz 8660   ZZ>=cuz 8928  ♯chash 10032
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 104  ax-ia2 105  ax-ia3 106  ax-in1 577  ax-in2 578  ax-io 663  ax-5 1379  ax-7 1380  ax-gen 1381  ax-ie1 1425  ax-ie2 1426  ax-8 1438  ax-10 1439  ax-11 1440  ax-i12 1441  ax-bndl 1442  ax-4 1443  ax-13 1447  ax-14 1448  ax-17 1462  ax-i9 1466  ax-ial 1470  ax-i5r 1471  ax-ext 2067  ax-coll 3922  ax-sep 3925  ax-nul 3933  ax-pow 3977  ax-pr 4003  ax-un 4227  ax-setind 4319  ax-iinf 4369  ax-cnex 7357  ax-resscn 7358  ax-1cn 7359  ax-1re 7360  ax-icn 7361  ax-addcl 7362  ax-addrcl 7363  ax-mulcl 7364  ax-addcom 7366  ax-addass 7368  ax-distr 7370  ax-i2m1 7371  ax-0lt1 7372  ax-0id 7374  ax-rnegex 7375  ax-cnre 7377  ax-pre-ltirr 7378  ax-pre-ltwlin 7379  ax-pre-lttrn 7380  ax-pre-ltadd 7382
This theorem depends on definitions:  df-bi 115  df-dc 779  df-3or 923  df-3an 924  df-tru 1290  df-fal 1293  df-nf 1393  df-sb 1690  df-eu 1948  df-mo 1949  df-clab 2072  df-cleq 2078  df-clel 2081  df-nfc 2214  df-ne 2252  df-nel 2347  df-ral 2360  df-rex 2361  df-reu 2362  df-rab 2364  df-v 2616  df-sbc 2829  df-csb 2922  df-dif 2988  df-un 2990  df-in 2992  df-ss 2999  df-nul 3273  df-pw 3411  df-sn 3431  df-pr 3432  df-op 3434  df-uni 3631  df-int 3666  df-iun 3709  df-br 3815  df-opab 3869  df-mpt 3870  df-tr 3905  df-id 4087  df-iord 4160  df-on 4162  df-ilim 4163  df-suc 4165  df-iom 4372  df-xp 4410  df-rel 4411  df-cnv 4412  df-co 4413  df-dm 4414  df-rn 4415  df-res 4416  df-ima 4417  df-iota 4937  df-fun 4974  df-fn 4975  df-f 4976  df-f1 4977  df-fo 4978  df-f1o 4979  df-fv 4980  df-riota 5550  df-ov 5597  df-oprab 5598  df-mpt2 5599  df-recs 6005  df-frec 6091  df-er 6225  df-en 6391  df-dom 6392  df-fin 6393  df-pnf 7445  df-mnf 7446  df-xr 7447  df-ltxr 7448  df-le 7449  df-sub 7576  df-neg 7577  df-inn 8335  df-n0 8584  df-z 8661  df-uz 8929  df-ihash 10033
This theorem is referenced by:  hasheqf1o  10042  isfinite4im  10050  fihasheq0  10051  hashsng  10055  fihashen1  10056  fihashfn  10057  hashun  10062  hashfz  10078  hashxp  10083  hashdvds  10991  crth  10994  phimullem  10995
  Copyright terms: Public domain W3C validator