I want to prove that if $A$ is an infinite subset of the natural numbers, then it is countable.
I thought of an informal proof: put the elements of $A$ in increasing order. Then associate the smallest to $1$, the second smallest to $2$, the third smallest to $3$ and so on.
I've tried to formalise this proof in this way: consider the sequence $$ \begin{cases} A_1=A \\ A_n=A_{n-1}-\min{A_{n-1}}\end{cases}$$ The function $f(\min{A_n})=n$ has domain $A$ and codomain $\mathbb{N}$ and is a bijection, therefore $A$ is countable.
My questions are the following:
- Is what I wrote correct?
- If so, how do you prove that $f$ is actually a function from $A$ to $\mathbb{N}$ and is also a bijection?