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

Theorem qnnen 12432
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 10247 . . 3 ((𝑝 ∈ ℚ ∧ 𝑞 ∈ ℚ) → DECID 𝑝 = 𝑞)
21rgen2a 2531 . 2 𝑝 ∈ ℚ ∀𝑞 ∈ ℚ DECID 𝑝 = 𝑞
3 znnen 12399 . . . . . . . 8 ℤ ≈ ℕ
4 nnex 8925 . . . . . . . . 9 ℕ ∈ V
54enref 6765 . . . . . . . 8 ℕ ≈ ℕ
6 xpen 6845 . . . . . . . 8 ((ℤ ≈ ℕ ∧ ℕ ≈ ℕ) → (ℤ × ℕ) ≈ (ℕ × ℕ))
73, 5, 6mp2an 426 . . . . . . 7 (ℤ × ℕ) ≈ (ℕ × ℕ)
8 xpnnen 12395 . . . . . . 7 (ℕ × ℕ) ≈ ℕ
97, 8entri 6786 . . . . . 6 (ℤ × ℕ) ≈ ℕ
10 nnenom 10434 . . . . . 6 ℕ ≈ ω
119, 10entri 6786 . . . . 5 (ℤ × ℕ) ≈ ω
1211ensymi 6782 . . . 4 ω ≈ (ℤ × ℕ)
13 bren 6747 . . . 4 (ω ≈ (ℤ × ℕ) ↔ ∃𝑔 𝑔:ω–1-1-onto→(ℤ × ℕ))
1412, 13mpbi 145 . . 3 𝑔 𝑔:ω–1-1-onto→(ℤ × ℕ)
15 f1ofo 5469 . . . . 5 (𝑔:ω–1-1-onto→(ℤ × ℕ) → 𝑔:ω–onto→(ℤ × ℕ))
16 divfnzn 9621 . . . . . . . . 9 ( / ↾ (ℤ × ℕ)) Fn (ℤ × ℕ)
17 fnfun 5314 . . . . . . . . 9 (( / ↾ (ℤ × ℕ)) Fn (ℤ × ℕ) → Fun ( / ↾ (ℤ × ℕ)))
1816, 17ax-mp 5 . . . . . . . 8 Fun ( / ↾ (ℤ × ℕ))
19 fndm 5316 . . . . . . . . 9 (( / ↾ (ℤ × ℕ)) Fn (ℤ × ℕ) → dom ( / ↾ (ℤ × ℕ)) = (ℤ × ℕ))
20 eqimss2 3211 . . . . . . . . 9 (dom ( / ↾ (ℤ × ℕ)) = (ℤ × ℕ) → (ℤ × ℕ) ⊆ dom ( / ↾ (ℤ × ℕ)))
2116, 19, 20mp2b 8 . . . . . . . 8 (ℤ × ℕ) ⊆ dom ( / ↾ (ℤ × ℕ))
22 fores 5448 . . . . . . . 8 ((Fun ( / ↾ (ℤ × ℕ)) ∧ (ℤ × ℕ) ⊆ dom ( / ↾ (ℤ × ℕ))) → (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)))
2318, 21, 22mp2an 426 . . . . . . 7 (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ))
24 resima 4941 . . . . . . . . 9 (( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) = ( / “ (ℤ × ℕ))
25 df-q 9620 . . . . . . . . 9 ℚ = ( / “ (ℤ × ℕ))
2624, 25eqtr4i 2201 . . . . . . . 8 (( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) = ℚ
27 foeq3 5437 . . . . . . . 8 ((( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) = ℚ → ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) ↔ (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ))
2826, 27ax-mp 5 . . . . . . 7 ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→(( / ↾ (ℤ × ℕ)) “ (ℤ × ℕ)) ↔ (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ)
2923, 28mpbi 145 . . . . . 6 (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ
30 foco 5449 . . . . . 6 (((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)):(ℤ × ℕ)–onto→ℚ ∧ 𝑔:ω–onto→(ℤ × ℕ)) → ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ)
3129, 30mpan 424 . . . . 5 (𝑔:ω–onto→(ℤ × ℕ) → ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ)
32 zex 9262 . . . . . . . . 9 ℤ ∈ V
3332, 4xpex 4742 . . . . . . . 8 (ℤ × ℕ) ∈ V
34 resfunexg 5738 . . . . . . . 8 ((Fun ( / ↾ (ℤ × ℕ)) ∧ (ℤ × ℕ) ∈ V) → (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∈ V)
3518, 33, 34mp2an 426 . . . . . . 7 (( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∈ V
36 vex 2741 . . . . . . 7 𝑔 ∈ V
3735, 36coex 5175 . . . . . 6 ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔) ∈ V
38 foeq1 5435 . . . . . 6 (𝑓 = ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔) → (𝑓:ω–onto→ℚ ↔ ((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ))
3937, 38spcev 2833 . . . . 5 (((( / ↾ (ℤ × ℕ)) ↾ (ℤ × ℕ)) ∘ 𝑔):ω–onto→ℚ → ∃𝑓 𝑓:ω–onto→ℚ)
4015, 31, 393syl 17 . . . 4 (𝑔:ω–1-1-onto→(ℤ × ℕ) → ∃𝑓 𝑓:ω–onto→ℚ)
4140exlimiv 1598 . . 3 (∃𝑔 𝑔:ω–1-1-onto→(ℤ × ℕ) → ∃𝑓 𝑓:ω–onto→ℚ)
4214, 41ax-mp 5 . 2 𝑓 𝑓:ω–onto→ℚ
4310ensymi 6782 . . 3 ω ≈ ℕ
44 qex 9632 . . . 4 ℚ ∈ V
45 nnssq 9629 . . . 4 ℕ ⊆ ℚ
46 ssdomg 6778 . . . 4 (ℚ ∈ V → (ℕ ⊆ ℚ → ℕ ≼ ℚ))
4744, 45, 46mp2 16 . . 3 ℕ ≼ ℚ
48 endomtr 6790 . . 3 ((ω ≈ ℕ ∧ ℕ ≼ ℚ) → ω ≼ ℚ)
4943, 47, 48mp2an 426 . 2 ω ≼ ℚ
50 ctinf 12431 . 2 (ℚ ≈ ℕ ↔ (∀𝑝 ∈ ℚ ∀𝑞 ∈ ℚ DECID 𝑝 = 𝑞 ∧ ∃𝑓 𝑓:ω–onto→ℚ ∧ ω ≼ ℚ))
512, 42, 49, 50mpbir3an 1179 1 ℚ ≈ ℕ
Colors of variables: wff set class
Syntax hints:  wb 105  DECID wdc 834   = wceq 1353  wex 1492  wcel 2148  wral 2455  Vcvv 2738  wss 3130   class class class wbr 4004  ωcom 4590   × cxp 4625  dom cdm 4627  cres 4629  cima 4630  ccom 4631  Fun wfun 5211   Fn wfn 5212  ontowfo 5215  1-1-ontowf1o 5216  cen 6738  cdom 6739   / cdiv 8629  cn 8919  cz 9253  cq 9619
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 614  ax-in2 615  ax-io 709  ax-5 1447  ax-7 1448  ax-gen 1449  ax-ie1 1493  ax-ie2 1494  ax-8 1504  ax-10 1505  ax-11 1506  ax-i12 1507  ax-bndl 1509  ax-4 1510  ax-17 1526  ax-i9 1530  ax-ial 1534  ax-i5r 1535  ax-13 2150  ax-14 2151  ax-ext 2159  ax-coll 4119  ax-sep 4122  ax-nul 4130  ax-pow 4175  ax-pr 4210  ax-un 4434  ax-setind 4537  ax-iinf 4588  ax-cnex 7902  ax-resscn 7903  ax-1cn 7904  ax-1re 7905  ax-icn 7906  ax-addcl 7907  ax-addrcl 7908  ax-mulcl 7909  ax-mulrcl 7910  ax-addcom 7911  ax-mulcom 7912  ax-addass 7913  ax-mulass 7914  ax-distr 7915  ax-i2m1 7916  ax-0lt1 7917  ax-1rid 7918  ax-0id 7919  ax-rnegex 7920  ax-precex 7921  ax-cnre 7922  ax-pre-ltirr 7923  ax-pre-ltwlin 7924  ax-pre-lttrn 7925  ax-pre-apti 7926  ax-pre-ltadd 7927  ax-pre-mulgt0 7928  ax-pre-mulext 7929  ax-arch 7930
This theorem depends on definitions:  df-bi 117  df-dc 835  df-3or 979  df-3an 980  df-tru 1356  df-fal 1359  df-xor 1376  df-nf 1461  df-sb 1763  df-eu 2029  df-mo 2030  df-clab 2164  df-cleq 2170  df-clel 2173  df-nfc 2308  df-ne 2348  df-nel 2443  df-ral 2460  df-rex 2461  df-reu 2462  df-rmo 2463  df-rab 2464  df-v 2740  df-sbc 2964  df-csb 3059  df-dif 3132  df-un 3134  df-in 3136  df-ss 3143  df-nul 3424  df-if 3536  df-pw 3578  df-sn 3599  df-pr 3600  df-op 3602  df-uni 3811  df-int 3846  df-iun 3889  df-br 4005  df-opab 4066  df-mpt 4067  df-tr 4103  df-id 4294  df-po 4297  df-iso 4298  df-iord 4367  df-on 4369  df-ilim 4370  df-suc 4372  df-iom 4591  df-xp 4633  df-rel 4634  df-cnv 4635  df-co 4636  df-dm 4637  df-rn 4638  df-res 4639  df-ima 4640  df-iota 5179  df-fun 5219  df-fn 5220  df-f 5221  df-f1 5222  df-fo 5223  df-f1o 5224  df-fv 5225  df-riota 5831  df-ov 5878  df-oprab 5879  df-mpo 5880  df-1st 6141  df-2nd 6142  df-recs 6306  df-frec 6392  df-1o 6417  df-er 6535  df-pm 6651  df-en 6741  df-dom 6742  df-fin 6743  df-dju 7037  df-inl 7046  df-inr 7047  df-case 7083  df-pnf 7994  df-mnf 7995  df-xr 7996  df-ltxr 7997  df-le 7998  df-sub 8130  df-neg 8131  df-reap 8532  df-ap 8539  df-div 8630  df-inn 8920  df-2 8978  df-n0 9177  df-z 9254  df-uz 9529  df-q 9620  df-rp 9654  df-fz 10009  df-fl 10270  df-mod 10323  df-seqfrec 10446  df-exp 10520  df-dvds 11795
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator