While reading Walter Rudin's Principles of Mathematical Analysis, I ran into the following theorem and proof:
Theorem 2.12. Let $\left\{E_n\right\}$, $n=1,2,\dots$, be a sequence of countable sets, and put
$$ S=\bigcup_{n=1}^\infty E_n. $$
Then $S$ is countable.
Proof. Let every set $E_n$ be arranged in a sequence $\left\{X_{nk}\right\}$, $k=1,2,3,\dots$, and consider the infinite array
in which the elements of $E_n$ form the $n$th row. The array contains all elements of $S$. As indicated by the arrows, these elements can be arranged in a sequence
$$ x_{11};x_{21},x_{12};x_{31},x_{22},x_{13};x_{41},x_{32},x_{23},x_{14};\dots\tag{*} $$
If any two of the sets $E_n$ have elements in common, these will appear more than once in $(*)$. Hence there is a subset $T$ of the set of all positive integers such that $S\sim T$, which shows that $S$ is at most countable. Since $E_1\subset S$, and $E_1$ is infinite, $S$ is infinite, and thus countable. $\blacksquare$
One accepted answer has been provided in the link, The union of a sequence of infinite, countable sets is countable., which is,
Look at the sequence *
$x_{11};x_{21},x_{12};x_{31},x_{22},x_{13};x_{41},x_{32},x_{23},x_{14};…$
Within each ;; add the suffixes.
1+1 =2
2+1 = 1+2 = 3
1+3 = 2+2 = 3+1 = 4
and so on.
So for any positive integer you shall get a countable (finite) number of such combination and in each case you shall get elements of $S$. If you remove duplicate items then you shall get a set $S$. This set will be bijective with the set of natural numbers as for each natural number you shall get only a finite number of elements.
I hope it is clear now. The bold sequence is constructed by taking arrows in the matrix. In the matrix the elements of the set $E_i$ are written in arrow.
I understand there is a bijective mapping from N to the collection of subsets of S, each of which is formed by taking points between two consecutive ;; in (*). Because the set of En is countable, the collection of such subsets is countable, by the construction of the subsets. The part I don't understand in the answer is that,
This set will be bijective with the set of natural numbers as for each natural number you shall get only a finite number of elements.
Even after removing duplicates, what we have still a bijective, mapping from N to a collection of subsets of S, whose union is equal to S. What is theorem or definition in baby Rudin that implies the existence of such bijective mentioned in the answer?
Thanks,


This traditional picture of the ''countably infinite rectangular array'' might serve to give a certain description of what is going on, but it certainly doesn't make for a very clean and elegant proof. Let us then try to indicate a more succinct argumentation for
Proof: Let us employ the following lemmas:
It is not difficult to supply a proof for this, let me know if you were interested in seeing one.
proof of lemma: on the one hand, $\mathbb{N} \times \mathbb{N}$ clearly embeds $\mathbb{N}$ (set $A$ is said to embed set $B$ if there exists an injection from $B$ to $A$) so the cartesian product is infinite; on the other hand, the map: $$\mathbb{N} \times \mathbb{N} \to \mathbb{N} \\ (m,n) \mapsto 2^m3^n$$ is seen to be an injection esentially thanks to the fundamental theorem of arithmetic (the uniqueness of prime factor decompositions); therefore, $\mathbb{N} \times \mathbb{N}$ will have the same cardinality as an infinite subset of $\mathbb{N}$ hence as that of $\mathbb{N}$, by virtue of lemma 1.
Coming back to the context of the theorem, set $$\bigcup_{n \in \mathbb{N}}A_n=B$$ Since $B$ includes the infinite set $A_0$ it itself is infinite; on the other hand we have the relation: $$|B| \leqslant \left|\bigsqcup_{n \in \mathbb{N}} A_n\right|=\sum_{n \in \mathbb{N}}|A_n|=\sum_{n \in \mathbb{N}}|\mathbb{N}|=|\mathbb{N}|^2=|\mathbb{N}^2|=|\mathbb{N}|$$ by virtue of lemma 2, so $B$ is seen to be equipotent to an infinite subset of $\mathbb{N}$, therefore itself equipotent to $\mathbb{N}$ by another application of lemma 1.
The inequality in the relation above is a particular case of the general statement that $$\left|\bigcup_{i \in I} A_i\right| \leqslant \left|\bigsqcup_{i \in I} A_i\right|$$ in other words the cardinal of a union of a family of sets is always at most equal to the cardinal of the disjoint union of the respective family of sets. $\Box$