MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  ackbij1 Unicode version

Theorem ackbij1 7880
Description: The Ackermann bijection, part 1: each natural number can be uniquely coded in binary as a finite set of natural numbers and conversely. (Contributed by Stefan O'Rear, 18-Nov-2014.)
Hypothesis
Ref Expression
ackbij.f  |-  F  =  ( x  e.  ( ~P om  i^i  Fin )  |->  ( card `  U_ y  e.  x  ( {
y }  X.  ~P y ) ) )
Assertion
Ref Expression
ackbij1  |-  F :
( ~P om  i^i  Fin ) -1-1-onto-> om
Distinct variable group:    x, F, y

Proof of Theorem ackbij1
Dummy variables  a 
b  c are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 ackbij.f . . 3  |-  F  =  ( x  e.  ( ~P om  i^i  Fin )  |->  ( card `  U_ y  e.  x  ( {
y }  X.  ~P y ) ) )
21ackbij1lem17 7878 . 2  |-  F :
( ~P om  i^i  Fin ) -1-1-> om
3 f1f 5453 . . . 4  |-  ( F : ( ~P om  i^i  Fin ) -1-1-> om  ->  F : ( ~P om  i^i  Fin ) --> om )
4 frn 5411 . . . 4  |-  ( F : ( ~P om  i^i  Fin ) --> om  ->  ran 
F  C_  om )
52, 3, 4mp2b 9 . . 3  |-  ran  F  C_ 
om
6 eleq1 2356 . . . . 5  |-  ( b  =  (/)  ->  ( b  e.  ran  F  <->  (/)  e.  ran  F ) )
7 eleq1 2356 . . . . 5  |-  ( b  =  a  ->  (
b  e.  ran  F  <->  a  e.  ran  F ) )
8 eleq1 2356 . . . . 5  |-  ( b  =  suc  a  -> 
( b  e.  ran  F  <->  suc  a  e.  ran  F ) )
9 peano1 4691 . . . . . . . 8  |-  (/)  e.  om
10 ackbij1lem3 7864 . . . . . . . 8  |-  ( (/)  e.  om  ->  (/)  e.  ( ~P om  i^i  Fin ) )
119, 10ax-mp 8 . . . . . . 7  |-  (/)  e.  ( ~P om  i^i  Fin )
121ackbij1lem13 7874 . . . . . . 7  |-  ( F `
 (/) )  =  (/)
13 fveq2 5541 . . . . . . . . 9  |-  ( a  =  (/)  ->  ( F `
 a )  =  ( F `  (/) ) )
1413eqeq1d 2304 . . . . . . . 8  |-  ( a  =  (/)  ->  ( ( F `  a )  =  (/)  <->  ( F `  (/) )  =  (/) ) )
1514rspcev 2897 . . . . . . 7  |-  ( (
(/)  e.  ( ~P om  i^i  Fin )  /\  ( F `  (/) )  =  (/) )  ->  E. a  e.  ( ~P om  i^i  Fin ) ( F `  a )  =  (/) )
1611, 12, 15mp2an 653 . . . . . 6  |-  E. a  e.  ( ~P om  i^i  Fin ) ( F `  a )  =  (/)
17 f1fn 5454 . . . . . . . 8  |-  ( F : ( ~P om  i^i  Fin ) -1-1-> om  ->  F  Fn  ( ~P om  i^i  Fin ) )
182, 17ax-mp 8 . . . . . . 7  |-  F  Fn  ( ~P om  i^i  Fin )
19 fvelrnb 5586 . . . . . . 7  |-  ( F  Fn  ( ~P om  i^i  Fin )  ->  ( (/) 
e.  ran  F  <->  E. a  e.  ( ~P om  i^i  Fin ) ( F `  a )  =  (/) ) )
2018, 19ax-mp 8 . . . . . 6  |-  ( (/)  e.  ran  F  <->  E. a  e.  ( ~P om  i^i  Fin ) ( F `  a )  =  (/) )
2116, 20mpbir 200 . . . . 5  |-  (/)  e.  ran  F
221ackbij1lem18 7879 . . . . . . . . 9  |-  ( c  e.  ( ~P om  i^i  Fin )  ->  E. b  e.  ( ~P om  i^i  Fin ) ( F `  b )  =  suc  ( F `  c ) )
2322adantl 452 . . . . . . . 8  |-  ( ( a  e.  om  /\  c  e.  ( ~P om  i^i  Fin ) )  ->  E. b  e.  ( ~P om  i^i  Fin ) ( F `  b )  =  suc  ( F `  c ) )
24 suceq 4473 . . . . . . . . . 10  |-  ( ( F `  c )  =  a  ->  suc  ( F `  c )  =  suc  a )
2524eqeq2d 2307 . . . . . . . . 9  |-  ( ( F `  c )  =  a  ->  (
( F `  b
)  =  suc  ( F `  c )  <->  ( F `  b )  =  suc  a ) )
2625rexbidv 2577 . . . . . . . 8  |-  ( ( F `  c )  =  a  ->  ( E. b  e.  ( ~P om  i^i  Fin )
( F `  b
)  =  suc  ( F `  c )  <->  E. b  e.  ( ~P
om  i^i  Fin )
( F `  b
)  =  suc  a
) )
2723, 26syl5ibcom 211 . . . . . . 7  |-  ( ( a  e.  om  /\  c  e.  ( ~P om  i^i  Fin ) )  ->  ( ( F `
 c )  =  a  ->  E. b  e.  ( ~P om  i^i  Fin ) ( F `  b )  =  suc  a ) )
2827rexlimdva 2680 . . . . . 6  |-  ( a  e.  om  ->  ( E. c  e.  ( ~P om  i^i  Fin )
( F `  c
)  =  a  ->  E. b  e.  ( ~P om  i^i  Fin )
( F `  b
)  =  suc  a
) )
29 fvelrnb 5586 . . . . . . 7  |-  ( F  Fn  ( ~P om  i^i  Fin )  ->  (
a  e.  ran  F  <->  E. c  e.  ( ~P
om  i^i  Fin )
( F `  c
)  =  a ) )
3018, 29ax-mp 8 . . . . . 6  |-  ( a  e.  ran  F  <->  E. c  e.  ( ~P om  i^i  Fin ) ( F `  c )  =  a )
31 fvelrnb 5586 . . . . . . 7  |-  ( F  Fn  ( ~P om  i^i  Fin )  ->  ( suc  a  e.  ran  F  <->  E. b  e.  ( ~P om  i^i  Fin )
( F `  b
)  =  suc  a
) )
3218, 31ax-mp 8 . . . . . 6  |-  ( suc  a  e.  ran  F  <->  E. b  e.  ( ~P
om  i^i  Fin )
( F `  b
)  =  suc  a
)
3328, 30, 323imtr4g 261 . . . . 5  |-  ( a  e.  om  ->  (
a  e.  ran  F  ->  suc  a  e.  ran  F ) )
346, 7, 8, 7, 21, 33finds 4698 . . . 4  |-  ( a  e.  om  ->  a  e.  ran  F )
3534ssriv 3197 . . 3  |-  om  C_  ran  F
365, 35eqssi 3208 . 2  |-  ran  F  =  om
37 dff1o5 5497 . 2  |-  ( F : ( ~P om  i^i  Fin ) -1-1-onto-> om  <->  ( F :
( ~P om  i^i  Fin ) -1-1-> om  /\  ran  F  =  om ) )
382, 36, 37mpbir2an 886 1  |-  F :
( ~P om  i^i  Fin ) -1-1-onto-> om
Colors of variables: wff set class
Syntax hints:    <-> wb 176    /\ wa 358    = wceq 1632    e. wcel 1696   E.wrex 2557    i^i cin 3164    C_ wss 3165   (/)c0 3468   ~Pcpw 3638   {csn 3653   U_ciun 3921    e. cmpt 4093   suc csuc 4410   omcom 4672    X. cxp 4703   ran crn 4706    Fn wfn 5266   -->wf 5267   -1-1->wf1 5268   -1-1-onto->wf1o 5270   ` cfv 5271   Fincfn 6879   cardccrd 7584
This theorem is referenced by:  fictb  7887  ackbijnn  12302
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1536  ax-5 1547  ax-17 1606  ax-9 1644  ax-8 1661  ax-13 1698  ax-14 1700  ax-6 1715  ax-7 1720  ax-11 1727  ax-12 1878  ax-ext 2277  ax-rep 4147  ax-sep 4157  ax-nul 4165  ax-pow 4204  ax-pr 4230  ax-un 4528
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1310  df-ex 1532  df-nf 1535  df-sb 1639  df-eu 2160  df-mo 2161  df-clab 2283  df-cleq 2289  df-clel 2292  df-nfc 2421  df-ne 2461  df-ral 2561  df-rex 2562  df-reu 2563  df-rmo 2564  df-rab 2565  df-v 2803  df-sbc 3005  df-csb 3095  df-dif 3168  df-un 3170  df-in 3172  df-ss 3179  df-pss 3181  df-nul 3469  df-if 3579  df-pw 3640  df-sn 3659  df-pr 3660  df-tp 3661  df-op 3662  df-uni 3844  df-int 3879  df-iun 3923  df-br 4040  df-opab 4094  df-mpt 4095  df-tr 4130  df-eprel 4321  df-id 4325  df-po 4330  df-so 4331  df-fr 4368  df-we 4370  df-ord 4411  df-on 4412  df-lim 4413  df-suc 4414  df-om 4673  df-xp 4711  df-rel 4712  df-cnv 4713  df-co 4714  df-dm 4715  df-rn 4716  df-res 4717  df-ima 4718  df-iota 5235  df-fun 5273  df-fn 5274  df-f 5275  df-f1 5276  df-fo 5277  df-f1o 5278  df-fv 5279  df-ov 5877  df-oprab 5878  df-mpt2 5879  df-1st 6138  df-2nd 6139  df-recs 6404  df-rdg 6439  df-1o 6495  df-2o 6496  df-oadd 6499  df-er 6676  df-map 6790  df-en 6880  df-dom 6881  df-sdom 6882  df-fin 6883  df-card 7588  df-cda 7810
  Copyright terms: Public domain W3C validator