I have a question about the following exercise
Let $(S,<)$ be a linearly ordered set and let $\left\langle A_n \mid n \in N\right\rangle$ be an infinite sequence of finite subsets of $S$. Then $\bigcup_{n=0}^{\infty} A_n$ is at most countable. [Hint: For every $n \in \boldsymbol{N}$ consider the unique enumeration $\left\langle a_n(k)\right| k<$ $\left.\left|A_n\right|\right\rangle$ of $A_n$ in the increasing order.]
I could say that $a_n(k)=s_k \in S$ ?
I don't know how to use the hint, because I construct the sequence and I could make an injective function from the set of sequences to $Seq(N)$, but I don't know what to do anymore.
Please help me
This is one of those that it's easier to see the enumeration by drawing it than talking about it.
One idea looks like this: $$ a_0(0),a_0(1),\ldots, a_0(|A_0|-1),a_1(0),a_1(1),\ldots, a_1(|A_1|-1),a_2(0),\ldots.$$
(Though note this may have repeat values, but there's a standard way to get around that.)
Another idea is that you can surject $\mathbb N\times\mathbb N$ onto $\bigcup_n A_n$ via $(n,k)\mapsto a_n(k)$ if $a_n(k)$ exists, otherwise to some default value in $\bigcup_n A_n$. And then use the countability of $\mathbb N\times \mathbb N$ and the surjection to argue $\bigcup_n A_n$ is countable.
I'll add that this result is clear from the fact that a countable union of countable sets is countable, but I presume that this exercise is prior to that. In addition, that theorem needs to use the axiom of choice in the general case, whereas this exercise quite intentionally avoids it by using further assumptions that let allow you to definably enumerate the $A_n$.