I'm reading the text about the proof of Z and Q are countable.

The proof reads:

$\displaystyle \mathbb {Z} $ is the union of the countable sets $\displaystyle \mathbb {N} \ , \ \{ -n : n \in \mathbb {N} \} \ , \ \{ 0 \} $, and one can define a surjection $\displaystyle f: \mathbb {Z} ^2 \rightarrow \mathbb {Q} $ by $\displaystyle f(m,n) = \frac {m}{n} $ if $\displaystyle n \neq 0 $ and $\displaystyle f(m,0) = 0 $

End of proof.

I understand that basically the system of Z and Q are equivalent, so if Z is countable so is Q, but where in the proof did it show that there exist an injection from Z to the set of natural numbers? Thanks.