Finite union of compact sets is compact

Let $\mathcal{O}$ be an open cover of $Y$. Since $\mathcal{O}$ is an open cover of each $Y_i$, there exists a finite subcover $\mathcal{O}_i \subset \mathcal{O}$ that covers each $Y_i$. Then $\bigcup_{i=1}^n \mathcal{O}_i \subset \mathcal{O}$ is a finite subcover. That's it; no need to deal with sequences.


It looks like your definition of compactness is that every sequence has a convergent subsequence. There is something you need to be cautious about, here: you are using $n$ for two different things! You use it first as the highest index of your $Y_i$s, and then as the index variable of your arbitrary sequence. Instead, let's go with $Y_1,...,Y_k$ as your compact sets.

Now, your proof gets the job done, but your detour into the "all but finitely many $y_n$ lie in some $Y_i$" possibility (how you start your proof) is unnecessary, as is induction. We can get there more simply if we recall that a union of finitely-many finite sets is again a finite set.

For $1\le i\le k,$ let $$\mathcal I_i=\{n\in\Bbb N:y_n\in Y_i\}.$$ (That is, $\mathcal I_i$ is the set of indices of sequence elements lying in $Y_i$.) Since the $y_n$ are all in $Y=\bigcup_{i=1}^kY_i,$ then $\bigcup_{i=1}^k\mathcal I_i=\Bbb N,$ whence at least one of the $\mathcal I_i$ is infinite (by the fact we recalled earlier). Without loss of generality, suppose $\mathcal I_1$ is infinite, so that the points $y_n$ lying in $Y_1$ form a subsequence of $\{y_n\}_{n=0}^\infty.$ Then we can proceed as you did.