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

Theorem ackbij1 9004
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 9002 . 2 𝐹:(𝒫 ω ∩ Fin)–1-1→ω
3 f1f 6058 . . . 4 (𝐹:(𝒫 ω ∩ Fin)–1-1→ω → 𝐹:(𝒫 ω ∩ Fin)⟶ω)
4 frn 6010 . . . 4 (𝐹:(𝒫 ω ∩ Fin)⟶ω → ran 𝐹 ⊆ ω)
52, 3, 4mp2b 10 . . 3 ran 𝐹 ⊆ ω
6 eleq1 2686 . . . . 5 (𝑏 = ∅ → (𝑏 ∈ ran 𝐹 ↔ ∅ ∈ ran 𝐹))
7 eleq1 2686 . . . . 5 (𝑏 = 𝑎 → (𝑏 ∈ ran 𝐹𝑎 ∈ ran 𝐹))
8 eleq1 2686 . . . . 5 (𝑏 = suc 𝑎 → (𝑏 ∈ ran 𝐹 ↔ suc 𝑎 ∈ ran 𝐹))
9 peano1 7032 . . . . . . . 8 ∅ ∈ ω
10 ackbij1lem3 8988 . . . . . . . 8 (∅ ∈ ω → ∅ ∈ (𝒫 ω ∩ Fin))
119, 10ax-mp 5 . . . . . . 7 ∅ ∈ (𝒫 ω ∩ Fin)
121ackbij1lem13 8998 . . . . . . 7 (𝐹‘∅) = ∅
13 fveq2 6148 . . . . . . . . 9 (𝑎 = ∅ → (𝐹𝑎) = (𝐹‘∅))
1413eqeq1d 2623 . . . . . . . 8 (𝑎 = ∅ → ((𝐹𝑎) = ∅ ↔ (𝐹‘∅) = ∅))
1514rspcev 3295 . . . . . . 7 ((∅ ∈ (𝒫 ω ∩ Fin) ∧ (𝐹‘∅) = ∅) → ∃𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅)
1611, 12, 15mp2an 707 . . . . . 6 𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅
17 f1fn 6059 . . . . . . . 8 (𝐹:(𝒫 ω ∩ Fin)–1-1→ω → 𝐹 Fn (𝒫 ω ∩ Fin))
182, 17ax-mp 5 . . . . . . 7 𝐹 Fn (𝒫 ω ∩ Fin)
19 fvelrnb 6200 . . . . . . 7 (𝐹 Fn (𝒫 ω ∩ Fin) → (∅ ∈ ran 𝐹 ↔ ∃𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅))
2018, 19ax-mp 5 . . . . . 6 (∅ ∈ ran 𝐹 ↔ ∃𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅)
2116, 20mpbir 221 . . . . 5 ∅ ∈ ran 𝐹
221ackbij1lem18 9003 . . . . . . . . 9 (𝑐 ∈ (𝒫 ω ∩ Fin) → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc (𝐹𝑐))
2322adantl 482 . . . . . . . 8 ((𝑎 ∈ ω ∧ 𝑐 ∈ (𝒫 ω ∩ Fin)) → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc (𝐹𝑐))
24 suceq 5749 . . . . . . . . . 10 ((𝐹𝑐) = 𝑎 → suc (𝐹𝑐) = suc 𝑎)
2524eqeq2d 2631 . . . . . . . . 9 ((𝐹𝑐) = 𝑎 → ((𝐹𝑏) = suc (𝐹𝑐) ↔ (𝐹𝑏) = suc 𝑎))
2625rexbidv 3045 . . . . . . . 8 ((𝐹𝑐) = 𝑎 → (∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc (𝐹𝑐) ↔ ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
2723, 26syl5ibcom 235 . . . . . . 7 ((𝑎 ∈ ω ∧ 𝑐 ∈ (𝒫 ω ∩ Fin)) → ((𝐹𝑐) = 𝑎 → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
2827rexlimdva 3024 . . . . . 6 (𝑎 ∈ ω → (∃𝑐 ∈ (𝒫 ω ∩ Fin)(𝐹𝑐) = 𝑎 → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
29 fvelrnb 6200 . . . . . . 7 (𝐹 Fn (𝒫 ω ∩ Fin) → (𝑎 ∈ ran 𝐹 ↔ ∃𝑐 ∈ (𝒫 ω ∩ Fin)(𝐹𝑐) = 𝑎))
3018, 29ax-mp 5 . . . . . 6 (𝑎 ∈ ran 𝐹 ↔ ∃𝑐 ∈ (𝒫 ω ∩ Fin)(𝐹𝑐) = 𝑎)
31 fvelrnb 6200 . . . . . . 7 (𝐹 Fn (𝒫 ω ∩ Fin) → (suc 𝑎 ∈ ran 𝐹 ↔ ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
3218, 31ax-mp 5 . . . . . 6 (suc 𝑎 ∈ ran 𝐹 ↔ ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎)
3328, 30, 323imtr4g 285 . . . . 5 (𝑎 ∈ ω → (𝑎 ∈ ran 𝐹 → suc 𝑎 ∈ ran 𝐹))
346, 7, 8, 7, 21, 33finds 7039 . . . 4 (𝑎 ∈ ω → 𝑎 ∈ ran 𝐹)
3534ssriv 3587 . . 3 ω ⊆ ran 𝐹
365, 35eqssi 3599 . 2 ran 𝐹 = ω
37 dff1o5 6103 . 2 (𝐹:(𝒫 ω ∩ Fin)–1-1-onto→ω ↔ (𝐹:(𝒫 ω ∩ Fin)–1-1→ω ∧ ran 𝐹 = ω))
382, 36, 37mpbir2an 954 1 𝐹:(𝒫 ω ∩ Fin)–1-1-onto→ω
Colors of variables: wff setvar class
Syntax hints:  wb 196  wa 384   = wceq 1480  wcel 1987  wrex 2908  cin 3554  wss 3555  c0 3891  𝒫 cpw 4130  {csn 4148   ciun 4485  cmpt 4673   × cxp 5072  ran crn 5075  suc csuc 5684   Fn wfn 5842  wf 5843  1-1wf1 5844  1-1-ontowf1o 5846  cfv 5847  ωcom 7012  Fincfn 7899  cardccrd 8705
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4731  ax-sep 4741  ax-nul 4749  ax-pow 4803  ax-pr 4867  ax-un 6902
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-ral 2912  df-rex 2913  df-reu 2914  df-rmo 2915  df-rab 2916  df-v 3188  df-sbc 3418  df-csb 3515  df-dif 3558  df-un 3560  df-in 3562  df-ss 3569  df-pss 3571  df-nul 3892  df-if 4059  df-pw 4132  df-sn 4149  df-pr 4151  df-tp 4153  df-op 4155  df-uni 4403  df-int 4441  df-iun 4487  df-br 4614  df-opab 4674  df-mpt 4675  df-tr 4713  df-eprel 4985  df-id 4989  df-po 4995  df-so 4996  df-fr 5033  df-we 5035  df-xp 5080  df-rel 5081  df-cnv 5082  df-co 5083  df-dm 5084  df-rn 5085  df-res 5086  df-ima 5087  df-pred 5639  df-ord 5685  df-on 5686  df-lim 5687  df-suc 5688  df-iota 5810  df-fun 5849  df-fn 5850  df-f 5851  df-f1 5852  df-fo 5853  df-f1o 5854  df-fv 5855  df-ov 6607  df-oprab 6608  df-mpt2 6609  df-om 7013  df-1st 7113  df-2nd 7114  df-wrecs 7352  df-recs 7413  df-rdg 7451  df-1o 7505  df-2o 7506  df-oadd 7509  df-er 7687  df-map 7804  df-en 7900  df-dom 7901  df-sdom 7902  df-fin 7903  df-card 8709  df-cda 8934
This theorem is referenced by:  fictb  9011  ackbijnn  14485
  Copyright terms: Public domain W3C validator