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

Theorem ackbij1 10040
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 10038 . 2 𝐹:(𝒫 ω ∩ Fin)–1-1→ω
3 f1f 6700 . . . 4 (𝐹:(𝒫 ω ∩ Fin)–1-1→ω → 𝐹:(𝒫 ω ∩ Fin)⟶ω)
4 frn 6637 . . . 4 (𝐹:(𝒫 ω ∩ Fin)⟶ω → ran 𝐹 ⊆ ω)
52, 3, 4mp2b 10 . . 3 ran 𝐹 ⊆ ω
6 eleq1 2824 . . . . 5 (𝑏 = ∅ → (𝑏 ∈ ran 𝐹 ↔ ∅ ∈ ran 𝐹))
7 eleq1 2824 . . . . 5 (𝑏 = 𝑎 → (𝑏 ∈ ran 𝐹𝑎 ∈ ran 𝐹))
8 eleq1 2824 . . . . 5 (𝑏 = suc 𝑎 → (𝑏 ∈ ran 𝐹 ↔ suc 𝑎 ∈ ran 𝐹))
9 peano1 7767 . . . . . . . 8 ∅ ∈ ω
10 ackbij1lem3 10024 . . . . . . . 8 (∅ ∈ ω → ∅ ∈ (𝒫 ω ∩ Fin))
119, 10ax-mp 5 . . . . . . 7 ∅ ∈ (𝒫 ω ∩ Fin)
121ackbij1lem13 10034 . . . . . . 7 (𝐹‘∅) = ∅
13 fveqeq2 6813 . . . . . . . 8 (𝑎 = ∅ → ((𝐹𝑎) = ∅ ↔ (𝐹‘∅) = ∅))
1413rspcev 3566 . . . . . . 7 ((∅ ∈ (𝒫 ω ∩ Fin) ∧ (𝐹‘∅) = ∅) → ∃𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅)
1511, 12, 14mp2an 690 . . . . . 6 𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅
16 f1fn 6701 . . . . . . . 8 (𝐹:(𝒫 ω ∩ Fin)–1-1→ω → 𝐹 Fn (𝒫 ω ∩ Fin))
172, 16ax-mp 5 . . . . . . 7 𝐹 Fn (𝒫 ω ∩ Fin)
18 fvelrnb 6862 . . . . . . 7 (𝐹 Fn (𝒫 ω ∩ Fin) → (∅ ∈ ran 𝐹 ↔ ∃𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅))
1917, 18ax-mp 5 . . . . . 6 (∅ ∈ ran 𝐹 ↔ ∃𝑎 ∈ (𝒫 ω ∩ Fin)(𝐹𝑎) = ∅)
2015, 19mpbir 230 . . . . 5 ∅ ∈ ran 𝐹
211ackbij1lem18 10039 . . . . . . . . 9 (𝑐 ∈ (𝒫 ω ∩ Fin) → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc (𝐹𝑐))
2221adantl 483 . . . . . . . 8 ((𝑎 ∈ ω ∧ 𝑐 ∈ (𝒫 ω ∩ Fin)) → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc (𝐹𝑐))
23 suceq 6346 . . . . . . . . . 10 ((𝐹𝑐) = 𝑎 → suc (𝐹𝑐) = suc 𝑎)
2423eqeq2d 2747 . . . . . . . . 9 ((𝐹𝑐) = 𝑎 → ((𝐹𝑏) = suc (𝐹𝑐) ↔ (𝐹𝑏) = suc 𝑎))
2524rexbidv 3172 . . . . . . . 8 ((𝐹𝑐) = 𝑎 → (∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc (𝐹𝑐) ↔ ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
2622, 25syl5ibcom 245 . . . . . . 7 ((𝑎 ∈ ω ∧ 𝑐 ∈ (𝒫 ω ∩ Fin)) → ((𝐹𝑐) = 𝑎 → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
2726rexlimdva 3149 . . . . . 6 (𝑎 ∈ ω → (∃𝑐 ∈ (𝒫 ω ∩ Fin)(𝐹𝑐) = 𝑎 → ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
28 fvelrnb 6862 . . . . . . 7 (𝐹 Fn (𝒫 ω ∩ Fin) → (𝑎 ∈ ran 𝐹 ↔ ∃𝑐 ∈ (𝒫 ω ∩ Fin)(𝐹𝑐) = 𝑎))
2917, 28ax-mp 5 . . . . . 6 (𝑎 ∈ ran 𝐹 ↔ ∃𝑐 ∈ (𝒫 ω ∩ Fin)(𝐹𝑐) = 𝑎)
30 fvelrnb 6862 . . . . . . 7 (𝐹 Fn (𝒫 ω ∩ Fin) → (suc 𝑎 ∈ ran 𝐹 ↔ ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎))
3117, 30ax-mp 5 . . . . . 6 (suc 𝑎 ∈ ran 𝐹 ↔ ∃𝑏 ∈ (𝒫 ω ∩ Fin)(𝐹𝑏) = suc 𝑎)
3227, 29, 313imtr4g 296 . . . . 5 (𝑎 ∈ ω → (𝑎 ∈ ran 𝐹 → suc 𝑎 ∈ ran 𝐹))
336, 7, 8, 7, 20, 32finds 7777 . . . 4 (𝑎 ∈ ω → 𝑎 ∈ ran 𝐹)
3433ssriv 3930 . . 3 ω ⊆ ran 𝐹
355, 34eqssi 3942 . 2 ran 𝐹 = ω
36 dff1o5 6755 . 2 (𝐹:(𝒫 ω ∩ Fin)–1-1-onto→ω ↔ (𝐹:(𝒫 ω ∩ Fin)–1-1→ω ∧ ran 𝐹 = ω))
372, 35, 36mpbir2an 709 1 𝐹:(𝒫 ω ∩ Fin)–1-1-onto→ω
Colors of variables: wff setvar class
Syntax hints:  wb 205  wa 397   = wceq 1539  wcel 2104  wrex 3071  cin 3891  wss 3892  c0 4262  𝒫 cpw 4539  {csn 4565   ciun 4931  cmpt 5164   × cxp 5598  ran crn 5601  suc csuc 6283   Fn wfn 6453  wf 6454  1-1wf1 6455  1-1-ontowf1o 6457  cfv 6458  ωcom 7744  Fincfn 8764  cardccrd 9737
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1795  ax-4 1809  ax-5 1911  ax-6 1969  ax-7 2009  ax-8 2106  ax-9 2114  ax-10 2135  ax-11 2152  ax-12 2169  ax-ext 2707  ax-sep 5232  ax-nul 5239  ax-pow 5297  ax-pr 5361  ax-un 7620
This theorem depends on definitions:  df-bi 206  df-an 398  df-or 846  df-3or 1088  df-3an 1089  df-tru 1542  df-fal 1552  df-ex 1780  df-nf 1784  df-sb 2066  df-mo 2538  df-eu 2567  df-clab 2714  df-cleq 2728  df-clel 2814  df-nfc 2887  df-ne 2942  df-ral 3063  df-rex 3072  df-reu 3286  df-rab 3287  df-v 3439  df-sbc 3722  df-csb 3838  df-dif 3895  df-un 3897  df-in 3899  df-ss 3909  df-pss 3911  df-nul 4263  df-if 4466  df-pw 4541  df-sn 4566  df-pr 4568  df-op 4572  df-uni 4845  df-int 4887  df-iun 4933  df-br 5082  df-opab 5144  df-mpt 5165  df-tr 5199  df-id 5500  df-eprel 5506  df-po 5514  df-so 5515  df-fr 5555  df-we 5557  df-xp 5606  df-rel 5607  df-cnv 5608  df-co 5609  df-dm 5610  df-rn 5611  df-res 5612  df-ima 5613  df-pred 6217  df-ord 6284  df-on 6285  df-lim 6286  df-suc 6287  df-iota 6410  df-fun 6460  df-fn 6461  df-f 6462  df-f1 6463  df-fo 6464  df-f1o 6465  df-fv 6466  df-ov 7310  df-oprab 7311  df-mpo 7312  df-om 7745  df-1st 7863  df-2nd 7864  df-frecs 8128  df-wrecs 8159  df-recs 8233  df-rdg 8272  df-1o 8328  df-2o 8329  df-oadd 8332  df-er 8529  df-map 8648  df-en 8765  df-dom 8766  df-sdom 8767  df-fin 8768  df-dju 9703  df-card 9741
This theorem is referenced by:  fictb  10047  ackbijnn  15585
  Copyright terms: Public domain W3C validator