Elementary Set Theory – How to Prove a Bijection Between a Countable Infinite Set and $\mathbb{N}$

elementary-set-theoryproof-writing

I'm trying to show that if a set $S$ is infinite and countable then there is a bijection $\varphi : S\to \mathbb{N}$. Since $S$ is countable, we know that there is an injection $f: S\to \mathbb{N}$. Now there are two things that can be done:

  1. We can construct a bijection $\varphi : S\to \mathbb{N}$ directly.
  2. We can construct a surjection $g: S\to \mathbb{N}$ and use Cantor-Bernstein-Schröder theorem to show there is a bijection between $S$ and $\mathbb{N}$.

The second way seems better, but I don't know how to start. I thought on the following: we want to build a surjection $g : S\to \mathbb{N}$. For that, fix an element $a_1\in S$ and define $g(a_1)=1$. Now, since $S$ is infinite, $S\setminus\{a_1\}$ is infinite, so we can pick $a_2\in S\setminus\{a_1\}$ and define $g(a_2)=2$.

We can continue this procedure arbitrarily so that given $n$ we will have $a_n\in S\setminus\{a_1,\dots,a_{n-1}\}$ so that $g(a_n)=n$, so that $g$ is a surjection.

Although the idea is clear to me, I recognize it lacks rigor. First of all, the statement "continue this process arbitrarily" when defining $g$ is not meaningful from a rigorous standpoint in my opinion. I believe there should be some argument with the axiom of choice to make this rigorous, but there might be a simpler way.

In that case, is this a correct way to prove the result? Also, how to make this idea I exposed rigorous and define $g$ correctly?

EDIT: The definitions I'm using are as follows:

  1. A set $S$ is countable if there is an injective function $f : S\to \mathbb{N}$

  2. A set $S$ is infinite if for all $n\in \mathbb{N}$ there is no bijection between $S$ and $\{1,\dots,n\}$.

From the second definition then I've proved that if $S$ is infinite and $a\in S$ then $S\setminus\{a\}$ is non-empty and still infinite.

Best Answer

Given an injection $f : S \to \mathbb{N}$, where $S$ is infinite, you can define a function $h : \mathbb{N} \to S$ by, for each $n \in \mathbb{N}$, defining $h(n)$ to be the element $s \in S$ for which $f(s)$ is the $n^{\text{th}}$ least element of $f(S) \subseteq \mathbb{N}$. This is possible because $S$ is infinite, so such an element $s \in S$ always exists, and $f$ is injective, so such an element $s \in S$ is unique.

It is straightforward to check that $h$ is bijective; then setting $g=h^{-1}$ gives you a bijection $g : S \to \mathbb{N}$.