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

Theorem ackbij1 7864
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 7862 . 2  |-  F :
( ~P om  i^i  Fin ) -1-1-> om
3 f1f 5437 . . . 4  |-  ( F : ( ~P om  i^i  Fin ) -1-1-> om  ->  F : ( ~P om  i^i  Fin ) --> om )
4 frn 5395 . . . 4  |-  ( F : ( ~P om  i^i  Fin ) --> om  ->  ran 
F  C_  om )
52, 3, 4mp2b 9 . . 3  |-  ran  F  C_ 
om
6 eleq1 2343 . . . . 5  |-  ( b  =  (/)  ->  ( b  e.  ran  F  <->  (/)  e.  ran  F ) )
7 eleq1 2343 . . . . 5  |-  ( b  =  a  ->  (
b  e.  ran  F  <->  a  e.  ran  F ) )
8 eleq1 2343 . . . . 5  |-  ( b  =  suc  a  -> 
( b  e.  ran  F  <->  suc  a  e.  ran  F ) )
9 peano1 4675 . . . . . . . 8  |-  (/)  e.  om
10 ackbij1lem3 7848 . . . . . . . 8  |-  ( (/)  e.  om  ->  (/)  e.  ( ~P om  i^i  Fin ) )
119, 10ax-mp 8 . . . . . . 7  |-  (/)  e.  ( ~P om  i^i  Fin )
121ackbij1lem13 7858 . . . . . . 7  |-  ( F `
 (/) )  =  (/)
13 fveq2 5525 . . . . . . . . 9  |-  ( a  =  (/)  ->  ( F `
 a )  =  ( F `  (/) ) )
1413eqeq1d 2291 . . . . . . . 8  |-  ( a  =  (/)  ->  ( ( F `  a )  =  (/)  <->  ( F `  (/) )  =  (/) ) )
1514rspcev 2884 . . . . . . 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 5438 . . . . . . . 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 5570 . . . . . . 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 7863 . . . . . . . . 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 4457 . . . . . . . . . 10  |-  ( ( F `  c )  =  a  ->  suc  ( F `  c )  =  suc  a )
2524eqeq2d 2294 . . . . . . . . 9  |-  ( ( F `  c )  =  a  ->  (
( F `  b
)  =  suc  ( F `  c )  <->  ( F `  b )  =  suc  a ) )
2625rexbidv 2564 . . . . . . . 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 2667 . . . . . 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 5570 . . . . . . 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 5570 . . . . . . 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 4682 . . . 4  |-  ( a  e.  om  ->  a  e.  ran  F )
3534ssriv 3184 . . 3  |-  om  C_  ran  F
365, 35eqssi 3195 . 2  |-  ran  F  =  om
37 dff1o5 5481 . 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 1623    e. wcel 1684   E.wrex 2544    i^i cin 3151    C_ wss 3152   (/)c0 3455   ~Pcpw 3625   {csn 3640   U_ciun 3905    e. cmpt 4077   suc csuc 4394   omcom 4656    X. cxp 4687   ran crn 4690    Fn wfn 5250   -->wf 5251   -1-1->wf1 5252   -1-1-onto->wf1o 5254   ` cfv 5255   Fincfn 6863   cardccrd 7568
This theorem is referenced by:  fictb  7871  ackbijnn  12286
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1533  ax-5 1544  ax-17 1603  ax-9 1635  ax-8 1643  ax-13 1686  ax-14 1688  ax-6 1703  ax-7 1708  ax-11 1715  ax-12 1866  ax-ext 2264  ax-rep 4131  ax-sep 4141  ax-nul 4149  ax-pow 4188  ax-pr 4214  ax-un 4512
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 1529  df-nf 1532  df-sb 1630  df-eu 2147  df-mo 2148  df-clab 2270  df-cleq 2276  df-clel 2279  df-nfc 2408  df-ne 2448  df-ral 2548  df-rex 2549  df-reu 2550  df-rmo 2551  df-rab 2552  df-v 2790  df-sbc 2992  df-csb 3082  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-pss 3168  df-nul 3456  df-if 3566  df-pw 3627  df-sn 3646  df-pr 3647  df-tp 3648  df-op 3649  df-uni 3828  df-int 3863  df-iun 3907  df-br 4024  df-opab 4078  df-mpt 4079  df-tr 4114  df-eprel 4305  df-id 4309  df-po 4314  df-so 4315  df-fr 4352  df-we 4354  df-ord 4395  df-on 4396  df-lim 4397  df-suc 4398  df-om 4657  df-xp 4695  df-rel 4696  df-cnv 4697  df-co 4698  df-dm 4699  df-rn 4700  df-res 4701  df-ima 4702  df-iota 5219  df-fun 5257  df-fn 5258  df-f 5259  df-f1 5260  df-fo 5261  df-f1o 5262  df-fv 5263  df-ov 5861  df-oprab 5862  df-mpt2 5863  df-1st 6122  df-2nd 6123  df-recs 6388  df-rdg 6423  df-1o 6479  df-2o 6480  df-oadd 6483  df-er 6660  df-map 6774  df-en 6864  df-dom 6865  df-sdom 6866  df-fin 6867  df-card 7572  df-cda 7794
  Copyright terms: Public domain W3C validator