Finite Union of Countable Sets is Countable

Theorem
The union of a finite number of countable sets is countable.

Proof
Let $S_0, \ldots, S_{n-1}$ be countable sets.

For $i \in \left\{{0, \ldots, n-1}\right\}$, let $f_i: \N \to S_i$ be a surjection.

These exist by Surjection from Natural Numbers iff Countable.

Now define $f: \N \to \displaystyle \bigcup_{i \mathop = 0}^{n-1} S_i$ by:


 * $f \left({m}\right) := f_i \left({\left\lfloor{\dfrac m n}\right\rfloor}\right)$

where $i$ is the unique element of $\left\{{0, \ldots, n-1}\right\}$ such that $m \equiv i \pmod n$, and $\left\lfloor{x}\right\rfloor$ denotes the floor of $x$.

Now let $x \in \displaystyle \bigcup_{i \mathop = 0}^{n-1} S_i$ be arbitrary.

Let $k$ be the smallest natural number such that $x \in S_k$.

Let $l$ be the smallest natural number such that $f_k \left({l}\right) = x$.

These are guaranteed to exist by definition of set union and surjectivity of $f_k$, respectively.

Then we have:


 * $f \left({l n + k}\right) = f_k \left({\left\lfloor{\dfrac {l n + k} n}\right\rfloor}\right) = f_k \left({l}\right) = x$

since $k < n$.

Since $x$ was arbitrary, $f$ is a surjection.

Hence by Surjection from Natural Numbers iff Countable, $\displaystyle \bigcup_{i \mathop = 0}^{n-1} S_i$ is countable