Given a map $f : \mathbb{Q} \to \mathbb{Z}\times \mathbb{N},$ prove that $f$ is injective.

276 Views Asked by At

The full question: Define a map $f : \mathbb{Q} \to \mathbb{Z}\times \mathbb{N}$ by $f(x) = (z, n)$ if $x = \frac{z}{n} \in \mathbb{Q}$ with $z \in \mathbb{Z}$ and $n \in \mathbb{N}$ and $\gcd(z,n) = 1$ for $z \neq 0$. Prove that $f$ is injective.

Here is my proof:

Proof: Let $x = \frac{z}{n}$ and $x' = \frac{z'}{n'}$. Suppose $f(x) = f(x')$. This means that $(z', n') = (z, n)$ which implies that $z' = z$ and $n = n'$. Hence, $x = x'$ and thus, $f$ is injective. QED.

Is this valid? I understand that $\gcd(z, n)$ in the question means we take a rational number that is fully reduced but am not sure why we need to use it in the proof.

(EDITED): added in $x = x' \dots$

Any help is great! Thanks