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

Theorem qnnen 12872
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 10404 . . 3 ((𝑝 ∈ ℚ ∧ 𝑞 ∈ ℚ) → DECID 𝑝 = 𝑞)
21rgen2a 2561 . 2 𝑝 ∈ ℚ ∀𝑞 ∈ ℚ DECID 𝑝 = 𝑞
3 znnen 12839 . . . . . . . 8 ℤ ≈ ℕ
4 nnex 9057 . . . . . . . . 9 ℕ ∈ V
54enref 6868 . . . . . . . 8 ℕ ≈ ℕ
6 xpen 6956 . . . . . . . 8 ((ℤ ≈ ℕ ∧ ℕ ≈ ℕ) → (ℤ × ℕ) ≈ (ℕ × ℕ))
73, 5, 6mp2an 426 . . . . . . 7 (ℤ × ℕ) ≈ (ℕ × ℕ)
8 xpnnen 12835 . . . . . . 7 (ℕ × ℕ) ≈ ℕ
97, 8entri 6890 . . . . . 6 (ℤ × ℕ) ≈ ℕ
10 nnenom 10596 . . . . . 6 ℕ ≈ ω
119, 10entri 6890 . . . . 5 (ℤ × ℕ) ≈ ω
1211ensymi 6886 . . . 4 ω ≈ (ℤ × ℕ)
13 bren 6847 . . . 4 (ω ≈ (ℤ × ℕ) ↔ ∃𝑔 𝑔:ω–1-1-onto→(ℤ × ℕ))
1412, 13mpbi 145 . . 3 𝑔 𝑔:ω–1-1-onto→(ℤ × ℕ)
15 f1ofo 5540 . . . . 5 (𝑔:ω–1-1-onto→(ℤ × ℕ) → 𝑔:ω–onto→(ℤ × ℕ))
16 divfnzn 9757 . . . . . . . . 9 ( / ↾ (ℤ × ℕ)) Fn (ℤ × ℕ)
17 fnfun 5379 . . . . . . . . 9 (( / ↾ (ℤ × ℕ)) Fn (ℤ × ℕ) → Fun ( / ↾ (ℤ × ℕ)))
1816, 17ax-mp 5 . . . . . . . 8 Fun ( / ↾ (ℤ × ℕ))
19 fndm 5381 . . . . . . . . 9 (( / ↾ (ℤ × ℕ)) Fn (ℤ × ℕ) → dom ( / ↾ (ℤ × ℕ)) = (ℤ × ℕ))
20 eqimss2 3252 . . . . . . . . 9 (dom ( / ↾ (ℤ × ℕ)) = (ℤ × ℕ) → (ℤ × ℕ) ⊆ dom ( / ↾ (ℤ × ℕ)))
2116, 19, 20mp2b 8 . . . . . . . 8 (ℤ × ℕ) ⊆ dom ( / ↾ (ℤ × ℕ))
22 fores 5519 . . . . . . . 8 ((Fun ( / ↾ (ℤ × ℕ)) ∧ (ℤ × ℕ) ⊆ dom ( / ↾ (ℤ × ℕ))) → (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)))
2318, 21, 22mp2an 426 . . . . . . 7 (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ))
24 resima 5000 . . . . . . . . 9 (( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) = ( / “ (ℤ × ℕ))
25 df-q 9756 . . . . . . . . 9 ℚ = ( / “ (ℤ × ℕ))
2624, 25eqtr4i 2230 . . . . . . . 8 (( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) = ℚ
27 foeq3 5507 . . . . . . . 8 ((( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) = ℚ → ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) ↔ (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ))
2826, 27ax-mp 5 . . . . . . 7 ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) ↔ (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ)
2923, 28mpbi 145 . . . . . 6 (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ
30 foco 5520 . . . . . 6 (((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ ∧ 𝑔:ω–onto→(ℤ × ℕ)) → ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ)
3129, 30mpan 424 . . . . 5 (𝑔:ω–onto→(ℤ × ℕ) → ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ)
32 zex 9396 . . . . . . . . 9 ℤ ∈ V
3332, 4xpex 4797 . . . . . . . 8 (ℤ × ℕ) ∈ V
34 resfunexg 5817 . . . . . . . 8 ((Fun ( / ↾ (ℤ × ℕ)) ∧ (ℤ × ℕ) ∈ V) → (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∈ V)
3518, 33, 34mp2an 426 . . . . . . 7 (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∈ V
36 vex 2776 . . . . . . 7 𝑔 ∈ V
3735, 36coex 5236 . . . . . 6 ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔) ∈ V
38 foeq1 5505 . . . . . 6 (𝑓 = ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔) → (𝑓:ω–onto→ℚ ↔ ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ))
3937, 38spcev 2872 . . . . 5 (((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ → ∃𝑓 𝑓:ω–onto→ℚ)
4015, 31, 393syl 17 . . . 4 (𝑔:ω–1-1-onto→(ℤ × ℕ) → ∃𝑓 𝑓:ω–onto→ℚ)
4140exlimiv 1622 . . 3 (∃𝑔 𝑔:ω–1-1-onto→(ℤ × ℕ) → ∃𝑓 𝑓:ω–onto→ℚ)
4214, 41ax-mp 5 . 2 𝑓 𝑓:ω–onto→ℚ
4310ensymi 6886 . . 3 ω ≈ ℕ
44 qex 9768 . . . 4 ℚ ∈ V
45 nnssq 9765 . . . 4 ℕ ⊆ ℚ
46 ssdomg 6882 . . . 4 (ℚ ∈ V → (ℕ ⊆ ℚ → ℕ ≼ ℚ))
4744, 45, 46mp2 16 . . 3 ℕ ≼ ℚ
48 endomtr 6894 . . 3 ((ω ≈ ℕ ∧ ℕ ≼ ℚ) → ω ≼ ℚ)
4943, 47, 48mp2an 426 . 2 ω ≼ ℚ
50 ctinf 12871 . 2 (ℚ ≈ ℕ ↔ (∀𝑝 ∈ ℚ ∀𝑞 ∈ ℚ DECID 𝑝 = 𝑞 ∧ ∃𝑓 𝑓:ω–onto→ℚ ∧ ω ≼ ℚ))
512, 42, 49, 50mpbir3an 1182 1 ℚ ≈ ℕ
Colors of variables: wff set class
Syntax hints:  wb 105  DECID wdc 836   = wceq 1373  wex 1516  wcel 2177  wral 2485  Vcvv 2773  wss 3170   class class class wbr 4050  ωcom 4645   × cxp 4680  dom cdm 4682  cres 4684  cima 4685  ccom 4686  Fun wfun 5273   Fn wfn 5274  ontowfo 5277  1-1-ontowf1o 5278  cen 6837  cdom 6838   / cdiv 8760  cn 9051  cz 9387  cq 9755
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 711  ax-5 1471  ax-7 1472  ax-gen 1473  ax-ie1 1517  ax-ie2 1518  ax-8 1528  ax-10 1529  ax-11 1530  ax-i12 1531  ax-bndl 1533  ax-4 1534  ax-17 1550  ax-i9 1554  ax-ial 1558  ax-i5r 1559  ax-13 2179  ax-14 2180  ax-ext 2188  ax-coll 4166  ax-sep 4169  ax-nul 4177  ax-pow 4225  ax-pr 4260  ax-un 4487  ax-setind 4592  ax-iinf 4643  ax-cnex 8031  ax-resscn 8032  ax-1cn 8033  ax-1re 8034  ax-icn 8035  ax-addcl 8036  ax-addrcl 8037  ax-mulcl 8038  ax-mulrcl 8039  ax-addcom 8040  ax-mulcom 8041  ax-addass 8042  ax-mulass 8043  ax-distr 8044  ax-i2m1 8045  ax-0lt1 8046  ax-1rid 8047  ax-0id 8048  ax-rnegex 8049  ax-precex 8050  ax-cnre 8051  ax-pre-ltirr 8052  ax-pre-ltwlin 8053  ax-pre-lttrn 8054  ax-pre-apti 8055  ax-pre-ltadd 8056  ax-pre-mulgt0 8057  ax-pre-mulext 8058  ax-arch 8059
This theorem depends on definitions:  df-bi 117  df-dc 837  df-3or 982  df-3an 983  df-tru 1376  df-fal 1379  df-xor 1396  df-nf 1485  df-sb 1787  df-eu 2058  df-mo 2059  df-clab 2193  df-cleq 2199  df-clel 2202  df-nfc 2338  df-ne 2378  df-nel 2473  df-ral 2490  df-rex 2491  df-reu 2492  df-rmo 2493  df-rab 2494  df-v 2775  df-sbc 3003  df-csb 3098  df-dif 3172  df-un 3174  df-in 3176  df-ss 3183  df-nul 3465  df-if 3576  df-pw 3622  df-sn 3643  df-pr 3644  df-op 3646  df-uni 3856  df-int 3891  df-iun 3934  df-br 4051  df-opab 4113  df-mpt 4114  df-tr 4150  df-id 4347  df-po 4350  df-iso 4351  df-iord 4420  df-on 4422  df-ilim 4423  df-suc 4425  df-iom 4646  df-xp 4688  df-rel 4689  df-cnv 4690  df-co 4691  df-dm 4692  df-rn 4693  df-res 4694  df-ima 4695  df-iota 5240  df-fun 5281  df-fn 5282  df-f 5283  df-f1 5284  df-fo 5285  df-f1o 5286  df-fv 5287  df-riota 5911  df-ov 5959  df-oprab 5960  df-mpo 5961  df-1st 6238  df-2nd 6239  df-recs 6403  df-frec 6489  df-1o 6514  df-er 6632  df-pm 6750  df-en 6840  df-dom 6841  df-fin 6842  df-dju 7154  df-inl 7163  df-inr 7164  df-case 7200  df-pnf 8124  df-mnf 8125  df-xr 8126  df-ltxr 8127  df-le 8128  df-sub 8260  df-neg 8261  df-reap 8663  df-ap 8670  df-div 8761  df-inn 9052  df-2 9110  df-n0 9311  df-z 9388  df-uz 9664  df-q 9756  df-rp 9791  df-fz 10146  df-fl 10430  df-mod 10485  df-seqfrec 10610  df-exp 10701  df-dvds 12169
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator