Prove the set of all dyadic numbers is countable

elementary-set-theoryfunctionsrational numbers

A number is said to be dyadic if it has the form $\frac{k}{2^n}$ for some integers $k$
and $n$ in $\mathbb Z^+ $. Show that the set of all dyadic numbers is countable.

Here is a proof I have (but couldn't complete),

Proof:
Let $ M_k := \{ \frac{k}{2^n}: n \in \mathbb Z^+ \}$ for each $k \in \mathbb Z^+$

To show that $M_k$ is countable for any $k$, I tried to construct a one-to-one mapping from $M_k \to \mathbb N$. But I couldn't be sure if such a mapping is correct: $\frac{k}{2^m} \mapsto m-1$ (or while mapping is the left hand side always a single variable such as x so I have to do mapping like $x \mapsto …$?). After mapping, I will show that the function(mapping) is one-to-one. Since $M_k$ is countable and the countable union of countable sets is countable, the set of dyadic numbers is countable.

Best Answer

The set $\mathbb{Z}^+\times\mathbb{Z}^+$ is countable and, by definition,$$\begin{array}{ccc}\mathbb{Z}^+\times\mathbb{Z}^+&\longrightarrow&\{\text{dyadic numbers}\}\\(k,n)&\mapsto&\dfrac k{2^n}\end{array}$$is surjective. Therefore, the set of dyadic numbers is either finite or countable. But since it is infinite, it is countable.