Rational Numbers are Countably Infinite/Proof 2

From ProofWiki
Jump to navigation Jump to search

Theorem

The set $\Q$ of rational numbers is countably infinite.


Proof

Let us define the mapping $\phi: \Q \to \Z \times \N$ as follows:

$\forall \dfrac p q \in \Q: \phi \left({\dfrac p q}\right) = \left({p, q}\right)$

where $\dfrac p q$ is in canonical form.

Then $\phi$ is clearly injective.

From Cartesian Product of Countable Sets is Countable‎, we have that $\Z \times \N$ is countably infinite.

The result follows directly from Domain of Injection to Countable Set is Countable‎.

$\blacksquare$