If card$(A_n)\leq$ card$(\mathbb{R}), \forall n \in \mathbb{N}$ show that card$( \bigcup \{A_n : n\in \mathbb{N}\} ) \leq$ card$(\mathbb{R})$
My attemp:
If card$(A_n)\leq$ card$(\mathbb{R})$ for each $n\in\mathbb{N}$ exist $f_n:A_n\to\mathbb{R}$ an injective function.
First case. If $ \bigcup \{A_n : n\in \mathbb{N}\}$ is such that $A_n \cap A_m = \emptyset, n\neq m$
Let $g: \bigcup \{A_n : n\in \mathbb{N}\}\to\mathbb{R}$ defined as
$$ g(x)= \left\{ \begin{array}{lcc} f_1(x) & \textit{if} & x \in A_1 \\ \\ f_2(x) & \textit{if} & x \in A_2\\ \hspace{0.5cm}\vdots \\ f_m(x) & \textit{if} & x \in A_m \\ \hspace{0.5cm}\vdots \\ \end{array} \right. $$
Since each $f_n$ is an injective function and $A_n \cap A_m = \emptyset, n\neq m$ then $g$ is an injective function. Therefore card$( \bigcup \{A_n : n\in \mathbb{N}\} ) \leq$ card$(\mathbb{R})$
But, what happens with the case when $A_n \cap A_m \neq \emptyset$ for some $n, m \in \mathbb{N}$?
I’ll assume that you know that for each $n\in\Bbb Z$ there is a bijection $$h_n:\Bbb R\to(n,n+1)\,.$$
Define
$$\varphi:\bigcup_{n\in\Bbb N}A_n\to\Bbb N:x\mapsto\min\{k\in\Bbb N:x\in A_k\}\,,$$
and let
$$g:\bigcup_{n\in\Bbb N}A_n\to\Bbb R:x\mapsto (h_{\varphi(x)}\circ f_{\varphi(x)})(x)\,.$$
Now show that $g$ is injective.