Help with the proof: union $A\cup B$ of two countably infinite sets $A,B$ is countably infinite

137 Views Asked by At

There are many questions and answers on this proof here, but I would still appreciate the help with the proof that I tried on my own.

Disjoined sets

It is enough to show what happens with the countability of a union of two disjoint sets, because if they have an intersection, the union can be reformmulated as a union of the intersection and original sets with the intersection removed. If $A \cap B \ne \emptyset$, then if $C = A \cap B, A'=A \setminus C, B' = B \setminus C$, we get $A \cup B = A' \cup B' \cup C$ and $A' \cap B' \cap C = \emptyset$, so it is enough to show that $A' \cup B'$ is countably infinite, as $(A' \cup B')$ and $C$ are also disjoint.

Therefore, it makes no difference if $A \cap B = \emptyset$ or not, so it is assumed that $A \cap B = \emptyset$.

Proof

If $A$ is countably infinite, $\exists$ a bijection $f : A \to \mathbb{N}$. A bijection $g : A \to \mathbb{N}^{2n-1}$ is introduced $g(i) = 2 f(a_i) - 1, a_i \in A$. (1)

If $B$ is countably infinite, $\exists$ a bijection $h : B \to \mathbb{N}$. A bijection $j : B \to \mathbb{N}^{2n}$ is introduced $j(i) = 2 f(b_i), b_i \in B$. (2)

The elements of $A \cup B$ can be arbitrarily ordered, so they can be ordered in pairs, taking one element of A, then one from B, like this:

$A \cup B = \{a_{1_1}, b_{2_1}, a_{3_2}, b_{4_2}, a_{5_3}, b_{6_3}, ..., a_{2n-1_n}, b_{2n_n} \}=\{a_{g(i)}, b_{j(i)}: i \in \mathbb{N}, a_{g(i)} \in A, b_{g(i)} \in B \} $

Because $\forall i \in \mathbb{N}$ the pair $(2i-1, 2i)$ is unique. From $(g(i), j(i))$ a unique $i$ can be computed from either $g$ or $j$, giving $a_i \in A$ and $b_i \in B$. Therefore, $i \to (g(i), j(i))$ is bijective so $A \cup B$ is also countably infinite.

Is this OK?

Edit: Jerry asked for the finite + countably infinite set combination.

Say that $A$ is finite and $B$ is countably infinite. Then $|A| = C_A \in \mathbb{N}$.

Their union can be written by inserting $A$ at the beginning of $B$ (because A is finite):

$A \cup B = \{a_1, a_2, a_3, ... a_{C_A}, b_{1+C_A}, b_{2+C_A}, b_{3+C_A}, ... \} = \{b_i\}$

and $\{1,2,3,...,C_A,C_A+1,C_A+2,...\}=\mathbb{N}$, so $A\cup B$ is countably infinite.

Is this OK as well?