Metamath Proof Explorer


Theorem ackbij2

Description: The Ackermann bijection, part 2: hereditarily finite sets can be represented by recursive binary notation. (Contributed by Stefan O'Rear, 18-Nov-2014)

Ref Expression
Hypotheses ackbij.f F = x 𝒫 ω Fin card y x y × 𝒫 y
ackbij.g G = x V y 𝒫 dom x F x y
ackbij.h H = rec G ω
Assertion ackbij2 H : R1 ω 1-1 onto ω

Proof

Step Hyp Ref Expression
1 ackbij.f F = x 𝒫 ω Fin card y x y × 𝒫 y
2 ackbij.g G = x V y 𝒫 dom x F x y
3 ackbij.h H = rec G ω
4 fveq2 a = b rec G a = rec G b
5 fvex rec G a V
6 4 5 f1iun a ω rec G a : R1 a 1-1 ω b ω rec G a rec G b rec G b rec G a a ω rec G a : a ω R1 a 1-1 ω
7 1 2 ackbij2lem2 a ω rec G a : R1 a 1-1 onto card R1 a
8 f1of1 rec G a : R1 a 1-1 onto card R1 a rec G a : R1 a 1-1 card R1 a
9 7 8 syl a ω rec G a : R1 a 1-1 card R1 a
10 ordom Ord ω
11 r1fin a ω R1 a Fin
12 ficardom R1 a Fin card R1 a ω
13 11 12 syl a ω card R1 a ω
14 ordelss Ord ω card R1 a ω card R1 a ω
15 10 13 14 sylancr a ω card R1 a ω
16 f1ss rec G a : R1 a 1-1 card R1 a card R1 a ω rec G a : R1 a 1-1 ω
17 9 15 16 syl2anc a ω rec G a : R1 a 1-1 ω
18 nnord a ω Ord a
19 nnord b ω Ord b
20 ordtri2or2 Ord a Ord b a b b a
21 18 19 20 syl2an a ω b ω a b b a
22 1 2 ackbij2lem4 b ω a ω a b rec G a rec G b
23 22 ex b ω a ω a b rec G a rec G b
24 23 ancoms a ω b ω a b rec G a rec G b
25 1 2 ackbij2lem4 a ω b ω b a rec G b rec G a
26 25 ex a ω b ω b a rec G b rec G a
27 24 26 orim12d a ω b ω a b b a rec G a rec G b rec G b rec G a
28 21 27 mpd a ω b ω rec G a rec G b rec G b rec G a
29 28 ralrimiva a ω b ω rec G a rec G b rec G b rec G a
30 17 29 jca a ω rec G a : R1 a 1-1 ω b ω rec G a rec G b rec G b rec G a
31 6 30 mprg a ω rec G a : a ω R1 a 1-1 ω
32 rdgfun Fun rec G
33 funiunfv Fun rec G a ω rec G a = rec G ω
34 33 eqcomd Fun rec G rec G ω = a ω rec G a
35 f1eq1 rec G ω = a ω rec G a rec G ω : R1 ω 1-1 ω a ω rec G a : R1 ω 1-1 ω
36 32 34 35 mp2b rec G ω : R1 ω 1-1 ω a ω rec G a : R1 ω 1-1 ω
37 r1funlim Fun R1 Lim dom R1
38 37 simpli Fun R1
39 funiunfv Fun R1 a ω R1 a = R1 ω
40 f1eq2 a ω R1 a = R1 ω a ω rec G a : a ω R1 a 1-1 ω a ω rec G a : R1 ω 1-1 ω
41 38 39 40 mp2b a ω rec G a : a ω R1 a 1-1 ω a ω rec G a : R1 ω 1-1 ω
42 36 41 bitr4i rec G ω : R1 ω 1-1 ω a ω rec G a : a ω R1 a 1-1 ω
43 31 42 mpbir rec G ω : R1 ω 1-1 ω
44 rnuni ran rec G ω = a rec G ω ran a
45 eliun b a rec G ω ran a a rec G ω b ran a
46 df-rex a rec G ω b ran a a a rec G ω b ran a
47 funfn Fun rec G rec G Fn dom rec G
48 32 47 mpbi rec G Fn dom rec G
49 rdgdmlim Lim dom rec G
50 limomss Lim dom rec G ω dom rec G
51 49 50 ax-mp ω dom rec G
52 fvelimab rec G Fn dom rec G ω dom rec G a rec G ω c ω rec G c = a
53 48 51 52 mp2an a rec G ω c ω rec G c = a
54 1 2 ackbij2lem2 c ω rec G c : R1 c 1-1 onto card R1 c
55 f1ofo rec G c : R1 c 1-1 onto card R1 c rec G c : R1 c onto card R1 c
56 forn rec G c : R1 c onto card R1 c ran rec G c = card R1 c
57 54 55 56 3syl c ω ran rec G c = card R1 c
58 r1fin c ω R1 c Fin
59 ficardom R1 c Fin card R1 c ω
60 58 59 syl c ω card R1 c ω
61 ordelss Ord ω card R1 c ω card R1 c ω
62 10 60 61 sylancr c ω card R1 c ω
63 57 62 eqsstrd c ω ran rec G c ω
64 rneq rec G c = a ran rec G c = ran a
65 64 sseq1d rec G c = a ran rec G c ω ran a ω
66 63 65 syl5ibcom c ω rec G c = a ran a ω
67 66 rexlimiv c ω rec G c = a ran a ω
68 53 67 sylbi a rec G ω ran a ω
69 68 sselda a rec G ω b ran a b ω
70 69 exlimiv a a rec G ω b ran a b ω
71 peano2 b ω suc b ω
72 fnfvima rec G Fn dom rec G ω dom rec G suc b ω rec G suc b rec G ω
73 48 51 71 72 mp3an12i b ω rec G suc b rec G ω
74 vex b V
75 cardnn suc b ω card suc b = suc b
76 fvex R1 suc b V
77 37 simpri Lim dom R1
78 limomss Lim dom R1 ω dom R1
79 77 78 ax-mp ω dom R1
80 79 sseli suc b ω suc b dom R1
81 onssr1 suc b dom R1 suc b R1 suc b
82 80 81 syl suc b ω suc b R1 suc b
83 ssdomg R1 suc b V suc b R1 suc b suc b R1 suc b
84 76 82 83 mpsyl suc b ω suc b R1 suc b
85 nnon suc b ω suc b On
86 onenon suc b On suc b dom card
87 85 86 syl suc b ω suc b dom card
88 r1fin suc b ω R1 suc b Fin
89 finnum R1 suc b Fin R1 suc b dom card
90 88 89 syl suc b ω R1 suc b dom card
91 carddom2 suc b dom card R1 suc b dom card card suc b card R1 suc b suc b R1 suc b
92 87 90 91 syl2anc suc b ω card suc b card R1 suc b suc b R1 suc b
93 84 92 mpbird suc b ω card suc b card R1 suc b
94 75 93 eqsstrrd suc b ω suc b card R1 suc b
95 71 94 syl b ω suc b card R1 suc b
96 sucssel b V suc b card R1 suc b b card R1 suc b
97 74 95 96 mpsyl b ω b card R1 suc b
98 1 2 ackbij2lem2 suc b ω rec G suc b : R1 suc b 1-1 onto card R1 suc b
99 f1ofo rec G suc b : R1 suc b 1-1 onto card R1 suc b rec G suc b : R1 suc b onto card R1 suc b
100 forn rec G suc b : R1 suc b onto card R1 suc b ran rec G suc b = card R1 suc b
101 71 98 99 100 4syl b ω ran rec G suc b = card R1 suc b
102 97 101 eleqtrrd b ω b ran rec G suc b
103 fvex rec G suc b V
104 eleq1 a = rec G suc b a rec G ω rec G suc b rec G ω
105 rneq a = rec G suc b ran a = ran rec G suc b
106 105 eleq2d a = rec G suc b b ran a b ran rec G suc b
107 104 106 anbi12d a = rec G suc b a rec G ω b ran a rec G suc b rec G ω b ran rec G suc b
108 103 107 spcev rec G suc b rec G ω b ran rec G suc b a a rec G ω b ran a
109 73 102 108 syl2anc b ω a a rec G ω b ran a
110 70 109 impbii a a rec G ω b ran a b ω
111 45 46 110 3bitri b a rec G ω ran a b ω
112 111 eqriv a rec G ω ran a = ω
113 44 112 eqtri ran rec G ω = ω
114 dff1o5 rec G ω : R1 ω 1-1 onto ω rec G ω : R1 ω 1-1 ω ran rec G ω = ω
115 43 113 114 mpbir2an rec G ω : R1 ω 1-1 onto ω
116 f1oeq1 H = rec G ω H : R1 ω 1-1 onto ω rec G ω : R1 ω 1-1 onto ω
117 3 116 ax-mp H : R1 ω 1-1 onto ω rec G ω : R1 ω 1-1 onto ω
118 115 117 mpbir H : R1 ω 1-1 onto ω