ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  qnnen GIF version

Theorem qnnen 12582
Description: The rational numbers are countably infinite. Corollary 8.1.23 of [AczelRathjen], p. 75. This is Metamath 100 proof #3. (Contributed by Jim Kingdon, 11-Aug-2023.)
Assertion
Ref Expression
qnnen ℚ ≈ ℕ

Proof of Theorem qnnen
Dummy variables 𝑓 𝑔 𝑝 𝑞 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 qdceq 10308 . . 3 ((𝑝 ∈ ℚ ∧ 𝑞 ∈ ℚ) → DECID 𝑝 = 𝑞)
21rgen2a 2548 . 2 𝑝 ∈ ℚ ∀𝑞 ∈ ℚ DECID 𝑝 = 𝑞
3 znnen 12549 . . . . . . . 8 ℤ ≈ ℕ
4 nnex 8982 . . . . . . . . 9 ℕ ∈ V
54enref 6814 . . . . . . . 8 ℕ ≈ ℕ
6 xpen 6896 . . . . . . . 8 ((ℤ ≈ ℕ ∧ ℕ ≈ ℕ) → (ℤ × ℕ) ≈ (ℕ × ℕ))
73, 5, 6mp2an 426 . . . . . . 7 (ℤ × ℕ) ≈ (ℕ × ℕ)
8 xpnnen 12545 . . . . . . 7 (ℕ × ℕ) ≈ ℕ
97, 8entri 6835 . . . . . 6 (ℤ × ℕ) ≈ ℕ
10 nnenom 10499 . . . . . 6 ℕ ≈ ω
119, 10entri 6835 . . . . 5 (ℤ × ℕ) ≈ ω
1211ensymi 6831 . . . 4 ω ≈ (ℤ × ℕ)
13 bren 6796 . . . 4 (ω ≈ (ℤ × ℕ) ↔ ∃𝑔 𝑔:ω–1-1-onto→(ℤ × ℕ))
1412, 13mpbi 145 . . 3 𝑔 𝑔:ω–1-1-onto→(ℤ × ℕ)
15 f1ofo 5503 . . . . 5 (𝑔:ω–1-1-onto→(ℤ × ℕ) → 𝑔:ω–onto→(ℤ × ℕ))
16 divfnzn 9680 . . . . . . . . 9 ( / ↾ (ℤ × ℕ)) Fn (ℤ × ℕ)
17 fnfun 5347 . . . . . . . . 9 (( / ↾ (ℤ × ℕ)) Fn (ℤ × ℕ) → Fun ( / ↾ (ℤ × ℕ)))
1816, 17ax-mp 5 . . . . . . . 8 Fun ( / ↾ (ℤ × ℕ))
19 fndm 5349 . . . . . . . . 9 (( / ↾ (ℤ × ℕ)) Fn (ℤ × ℕ) → dom ( / ↾ (ℤ × ℕ)) = (ℤ × ℕ))
20 eqimss2 3234 . . . . . . . . 9 (dom ( / ↾ (ℤ × ℕ)) = (ℤ × ℕ) → (ℤ × ℕ) ⊆ dom ( / ↾ (ℤ × ℕ)))
2116, 19, 20mp2b 8 . . . . . . . 8 (ℤ × ℕ) ⊆ dom ( / ↾ (ℤ × ℕ))
22 fores 5482 . . . . . . . 8 ((Fun ( / ↾ (ℤ × ℕ)) ∧ (ℤ × ℕ) ⊆ dom ( / ↾ (ℤ × ℕ))) → (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)))
2318, 21, 22mp2an 426 . . . . . . 7 (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ))
24 resima 4971 . . . . . . . . 9 (( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) = ( / “ (ℤ × ℕ))
25 df-q 9679 . . . . . . . . 9 ℚ = ( / “ (ℤ × ℕ))
2624, 25eqtr4i 2217 . . . . . . . 8 (( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) = ℚ
27 foeq3 5470 . . . . . . . 8 ((( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) = ℚ → ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) ↔ (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ))
2826, 27ax-mp 5 . . . . . . 7 ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) ↔ (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ)
2923, 28mpbi 145 . . . . . 6 (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ
30 foco 5483 . . . . . 6 (((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ ∧ 𝑔:ω–onto→(ℤ × ℕ)) → ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ)
3129, 30mpan 424 . . . . 5 (𝑔:ω–onto→(ℤ × ℕ) → ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ)
32 zex 9320 . . . . . . . . 9 ℤ ∈ V
3332, 4xpex 4772 . . . . . . . 8 (ℤ × ℕ) ∈ V
34 resfunexg 5775 . . . . . . . 8 ((Fun ( / ↾ (ℤ × ℕ)) ∧ (ℤ × ℕ) ∈ V) → (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∈ V)
3518, 33, 34mp2an 426 . . . . . . 7 (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∈ V
36 vex 2763 . . . . . . 7 𝑔 ∈ V
3735, 36coex 5207 . . . . . 6 ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔) ∈ V
38 foeq1 5468 . . . . . 6 (𝑓 = ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔) → (𝑓:ω–onto→ℚ ↔ ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ))
3937, 38spcev 2855 . . . . 5 (((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ → ∃𝑓 𝑓:ω–onto→ℚ)
4015, 31, 393syl 17 . . . 4 (𝑔:ω–1-1-onto→(ℤ × ℕ) → ∃𝑓 𝑓:ω–onto→ℚ)
4140exlimiv 1609 . . 3 (∃𝑔 𝑔:ω–1-1-onto→(ℤ × ℕ) → ∃𝑓 𝑓:ω–onto→ℚ)
4214, 41ax-mp 5 . 2 𝑓 𝑓:ω–onto→ℚ
4310ensymi 6831 . . 3 ω ≈ ℕ
44 qex 9691 . . . 4 ℚ ∈ V
45 nnssq 9688 . . . 4 ℕ ⊆ ℚ
46 ssdomg 6827 . . . 4 (ℚ ∈ V → (ℕ ⊆ ℚ → ℕ ≼ ℚ))
4744, 45, 46mp2 16 . . 3 ℕ ≼ ℚ
48 endomtr 6839 . . 3 ((ω ≈ ℕ ∧ ℕ ≼ ℚ) → ω ≼ ℚ)
4943, 47, 48mp2an 426 . 2 ω ≼ ℚ
50 ctinf 12581 . 2 (ℚ ≈ ℕ ↔ (∀𝑝 ∈ ℚ ∀𝑞 ∈ ℚ DECID 𝑝 = 𝑞 ∧ ∃𝑓 𝑓:ω–onto→ℚ ∧ ω ≼ ℚ))
512, 42, 49, 50mpbir3an 1181 1 ℚ ≈ ℕ
Colors of variables: wff set class
Syntax hints:  wb 105  DECID wdc 835   = wceq 1364  wex 1503  wcel 2164  wral 2472  Vcvv 2760  wss 3153   class class class wbr 4029  ωcom 4620   × cxp 4655  dom cdm 4657  cres 4659  cima 4660  ccom 4661  Fun wfun 5244   Fn wfn 5245  ontowfo 5248  1-1-ontowf1o 5249  cen 6787  cdom 6788   / cdiv 8685  cn 8976  cz 9311  cq 9678
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 710  ax-5 1458  ax-7 1459  ax-gen 1460  ax-ie1 1504  ax-ie2 1505  ax-8 1515  ax-10 1516  ax-11 1517  ax-i12 1518  ax-bndl 1520  ax-4 1521  ax-17 1537  ax-i9 1541  ax-ial 1545  ax-i5r 1546  ax-13 2166  ax-14 2167  ax-ext 2175  ax-coll 4144  ax-sep 4147  ax-nul 4155  ax-pow 4203  ax-pr 4238  ax-un 4462  ax-setind 4567  ax-iinf 4618  ax-cnex 7957  ax-resscn 7958  ax-1cn 7959  ax-1re 7960  ax-icn 7961  ax-addcl 7962  ax-addrcl 7963  ax-mulcl 7964  ax-mulrcl 7965  ax-addcom 7966  ax-mulcom 7967  ax-addass 7968  ax-mulass 7969  ax-distr 7970  ax-i2m1 7971  ax-0lt1 7972  ax-1rid 7973  ax-0id 7974  ax-rnegex 7975  ax-precex 7976  ax-cnre 7977  ax-pre-ltirr 7978  ax-pre-ltwlin 7979  ax-pre-lttrn 7980  ax-pre-apti 7981  ax-pre-ltadd 7982  ax-pre-mulgt0 7983  ax-pre-mulext 7984  ax-arch 7985
This theorem depends on definitions:  df-bi 117  df-dc 836  df-3or 981  df-3an 982  df-tru 1367  df-fal 1370  df-xor 1387  df-nf 1472  df-sb 1774  df-eu 2045  df-mo 2046  df-clab 2180  df-cleq 2186  df-clel 2189  df-nfc 2325  df-ne 2365  df-nel 2460  df-ral 2477  df-rex 2478  df-reu 2479  df-rmo 2480  df-rab 2481  df-v 2762  df-sbc 2986  df-csb 3081  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-nul 3447  df-if 3558  df-pw 3603  df-sn 3624  df-pr 3625  df-op 3627  df-uni 3836  df-int 3871  df-iun 3914  df-br 4030  df-opab 4091  df-mpt 4092  df-tr 4128  df-id 4322  df-po 4325  df-iso 4326  df-iord 4395  df-on 4397  df-ilim 4398  df-suc 4400  df-iom 4621  df-xp 4663  df-rel 4664  df-cnv 4665  df-co 4666  df-dm 4667  df-rn 4668  df-res 4669  df-ima 4670  df-iota 5211  df-fun 5252  df-fn 5253  df-f 5254  df-f1 5255  df-fo 5256  df-f1o 5257  df-fv 5258  df-riota 5869  df-ov 5917  df-oprab 5918  df-mpo 5919  df-1st 6188  df-2nd 6189  df-recs 6353  df-frec 6439  df-1o 6464  df-er 6582  df-pm 6700  df-en 6790  df-dom 6791  df-fin 6792  df-dju 7091  df-inl 7100  df-inr 7101  df-case 7137  df-pnf 8050  df-mnf 8051  df-xr 8052  df-ltxr 8053  df-le 8054  df-sub 8186  df-neg 8187  df-reap 8588  df-ap 8595  df-div 8686  df-inn 8977  df-2 9035  df-n0 9235  df-z 9312  df-uz 9587  df-q 9679  df-rp 9714  df-fz 10069  df-fl 10333  df-mod 10388  df-seqfrec 10513  df-exp 10604  df-dvds 11925
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator