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

Theorem ackbij1 9313
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 𝐹 = (𝑥 ∈ (𝒫 ω ∩ Fin) ↦ (card‘ 𝑦𝑥 ({𝑦} × 𝒫 𝑦)))
Assertion
Ref Expression
ackbij1 𝐹:(𝒫 ω ∩ Fin)–1-1-onto→ω
Distinct variable group:   𝑥,𝐹,𝑦

Proof of Theorem ackbij1
Dummy variables 𝑎 𝑏 𝑐 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 ackbij.f . . 3 𝐹 = (𝑥 ∈ (𝒫 ω ∩ Fin) ↦ (card‘ 𝑦𝑥 ({𝑦} × 𝒫 𝑦)))
21ackbij1lem17 9311 . 2 𝐹:(𝒫 ω ∩ Fin)–1-1→ω
3 f1f 6283 . . . 4 (𝐹:(𝒫 ω ∩ Fin)–1-1→ω → 𝐹:(𝒫 ω ∩ Fin)⟶ω)
4 frn 6229 . . . 4 (𝐹:(𝒫 ω ∩ Fin)⟶ω → ran 𝐹 ⊆ ω)
52, 3, 4mp2b 10 . . 3 ran 𝐹 ⊆ ω
6 eleq1 2832 . . . . 5 (𝑏 = ∅ → (𝑏 ∈ ran 𝐹 ↔ ∅ ∈ ran 𝐹))
7 eleq1 2832 . . . . 5 (𝑏 = 𝑎 → (𝑏 ∈ ran 𝐹𝑎 ∈ ran 𝐹))
8 eleq1 2832 . . . . 5 (𝑏 = suc 𝑎 → (𝑏 ∈ ran 𝐹 ↔ suc 𝑎 ∈ ran 𝐹))
9 peano1 7283 . . . . . . . 8 ∅ ∈ ω
10 ackbij1lem3 9297 . . . . . . . 8 (∅ ∈ ω → ∅ ∈ (𝒫 ω ∩ Fin))
119, 10ax-mp 5 . . . . . . 7 ∅ ∈ (𝒫 ω ∩ Fin)
121ackbij1lem13 9307 . . . . . . 7 (𝐹‘∅) = ∅
13 fveqeq2 6384 . . . . . . . 8 (𝑎 = ∅ → ((𝐹𝑎) = ∅ ↔ (𝐹‘∅) = ∅))
1413rspcev 3461 . . . . . . 7 ((∅ ∈ (𝒫 ω ∩ Fin) ∧ (𝐹‘∅) = ∅) → ∃𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅)
1511, 12, 14mp2an 683 . . . . . 6 𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅
16 f1fn 6284 . . . . . . . 8 (𝐹:(𝒫 ω ∩ Fin)–1-1→ω → 𝐹 Fn (𝒫 ω ∩ Fin))
172, 16ax-mp 5 . . . . . . 7 𝐹 Fn (𝒫 ω ∩ Fin)
18 fvelrnb 6432 . . . . . . 7 (𝐹 Fn (𝒫 ω ∩ Fin) → (∅ ∈ ran 𝐹 ↔ ∃𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅))
1917, 18ax-mp 5 . . . . . 6 (∅ ∈ ran 𝐹 ↔ ∃𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅)
2015, 19mpbir 222 . . . . 5 ∅ ∈ ran 𝐹
211ackbij1lem18 9312 . . . . . . . . 9 (𝑐 ∈ (𝒫 ω ∩ Fin) → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc (𝐹𝑐))
2221adantl 473 . . . . . . . 8 ((𝑎 ∈ ω ∧ 𝑐 ∈ (𝒫 ω ∩ Fin)) → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc (𝐹𝑐))
23 suceq 5973 . . . . . . . . . 10 ((𝐹𝑐) = 𝑎 → suc (𝐹𝑐) = suc 𝑎)
2423eqeq2d 2775 . . . . . . . . 9 ((𝐹𝑐) = 𝑎 → ((𝐹𝑏) = suc (𝐹𝑐) ↔ (𝐹𝑏) = suc 𝑎))
2524rexbidv 3199 . . . . . . . 8 ((𝐹𝑐) = 𝑎 → (∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc (𝐹𝑐) ↔ ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
2622, 25syl5ibcom 236 . . . . . . 7 ((𝑎 ∈ ω ∧ 𝑐 ∈ (𝒫 ω ∩ Fin)) → ((𝐹𝑐) = 𝑎 → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
2726rexlimdva 3178 . . . . . 6 (𝑎 ∈ ω → (∃𝑐 ∈ (𝒫 ω ∩ Fin)(𝐹𝑐) = 𝑎 → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
28 fvelrnb 6432 . . . . . . 7 (𝐹 Fn (𝒫 ω ∩ Fin) → (𝑎 ∈ ran 𝐹 ↔ ∃𝑐 ∈ (𝒫 ω ∩ Fin)(𝐹𝑐) = 𝑎))
2917, 28ax-mp 5 . . . . . 6 (𝑎 ∈ ran 𝐹 ↔ ∃𝑐 ∈ (𝒫 ω ∩ Fin)(𝐹𝑐) = 𝑎)
30 fvelrnb 6432 . . . . . . 7 (𝐹 Fn (𝒫 ω ∩ Fin) → (suc 𝑎 ∈ ran 𝐹 ↔ ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
3117, 30ax-mp 5 . . . . . 6 (suc 𝑎 ∈ ran 𝐹 ↔ ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎)
3227, 29, 313imtr4g 287 . . . . 5 (𝑎 ∈ ω → (𝑎 ∈ ran 𝐹 → suc 𝑎 ∈ ran 𝐹))
336, 7, 8, 7, 20, 32finds 7290 . . . 4 (𝑎 ∈ ω → 𝑎 ∈ ran 𝐹)
3433ssriv 3765 . . 3 ω ⊆ ran 𝐹
355, 34eqssi 3777 . 2 ran 𝐹 = ω
36 dff1o5 6329 . 2 (𝐹:(𝒫 ω ∩ Fin)–1-1-onto→ω ↔ (𝐹:(𝒫 ω ∩ Fin)–1-1→ω ∧ ran 𝐹 = ω))
372, 35, 36mpbir2an 702 1 𝐹:(𝒫 ω ∩ Fin)–1-1-onto→ω
Colors of variables: wff setvar class
Syntax hints:  wb 197  wa 384   = wceq 1652  wcel 2155  wrex 3056  cin 3731  wss 3732  c0 4079  𝒫 cpw 4315  {csn 4334   ciun 4676  cmpt 4888   × cxp 5275  ran crn 5278  suc csuc 5910   Fn wfn 6063  wf 6064  1-1wf1 6065  1-1-ontowf1o 6067  cfv 6068  ωcom 7263  Fincfn 8160  cardccrd 9012
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1890  ax-4 1904  ax-5 2005  ax-6 2070  ax-7 2105  ax-8 2157  ax-9 2164  ax-10 2183  ax-11 2198  ax-12 2211  ax-13 2352  ax-ext 2743  ax-rep 4930  ax-sep 4941  ax-nul 4949  ax-pow 5001  ax-pr 5062  ax-un 7147
This theorem depends on definitions:  df-bi 198  df-an 385  df-or 874  df-3or 1108  df-3an 1109  df-tru 1656  df-ex 1875  df-nf 1879  df-sb 2063  df-mo 2565  df-eu 2582  df-clab 2752  df-cleq 2758  df-clel 2761  df-nfc 2896  df-ne 2938  df-ral 3060  df-rex 3061  df-reu 3062  df-rmo 3063  df-rab 3064  df-v 3352  df-sbc 3597  df-csb 3692  df-dif 3735  df-un 3737  df-in 3739  df-ss 3746  df-pss 3748  df-nul 4080  df-if 4244  df-pw 4317  df-sn 4335  df-pr 4337  df-tp 4339  df-op 4341  df-uni 4595  df-int 4634  df-iun 4678  df-br 4810  df-opab 4872  df-mpt 4889  df-tr 4912  df-id 5185  df-eprel 5190  df-po 5198  df-so 5199  df-fr 5236  df-we 5238  df-xp 5283  df-rel 5284  df-cnv 5285  df-co 5286  df-dm 5287  df-rn 5288  df-res 5289  df-ima 5290  df-pred 5865  df-ord 5911  df-on 5912  df-lim 5913  df-suc 5914  df-iota 6031  df-fun 6070  df-fn 6071  df-f 6072  df-f1 6073  df-fo 6074  df-f1o 6075  df-fv 6076  df-ov 6845  df-oprab 6846  df-mpt2 6847  df-om 7264  df-1st 7366  df-2nd 7367  df-wrecs 7610  df-recs 7672  df-rdg 7710  df-1o 7764  df-2o 7765  df-oadd 7768  df-er 7947  df-map 8062  df-en 8161  df-dom 8162  df-sdom 8163  df-fin 8164  df-card 9016  df-cda 9243
This theorem is referenced by:  fictb  9320  ackbijnn  14844
  Copyright terms: Public domain W3C validator