I am trying to understand a proof from Mathematical Analysis by Apostol for the following theorem:
The set of rationals $\mathbb{Q}$ is countable.
Here is the proof (I rewrote a few things):
Let $A_n$ be the set of positive rational numbers that have denominator $n$. Then the following is true: $$\mathbb{Q}^+=\bigcup_{i=1}^\infty A_i$$ Since each $A_i$ is countable, $\mathbb{Q}^+$ is countable. Similarly for $\mathbb{Q}^-$ and $\{0\}$. Then $\mathbb{Q}=\mathbb{Q}^-\cup\{0\}\cup\mathbb{Q}^+$ is countable.
For some reason, I cannot understand the bold part. How is that each $A_{i}$ is countable?
Consider the map $f_i:A_i\rightarrow \mathbb{N}$ defined by $f({a\over i})=a$, it is injective. This implies that $A_i$ has a cardinality of a subset of $\mathbb{N}$ so it is countable.