I'm self-studying from the book Understanding Analysis by Stephen Abbott, and I have a question about the prove of theorem 3.3.4 on page 84 (i.e. the Heine-Borel theorem).
To be more specific, let us assume $K \subseteq \mathbb{R}$ to be compact.$^1$ Then we would like to prove that this implies that $K$ is closed.$^2$ Stephen Abbott proceeds by considering a sequence $(x_n)$ with $x = \lim x_n$, where $(x_n)$ is contained in $K$. By definition of a compact set, the sequence $(x_n)$ has a convergent subsequence $(x_{n_k})$, and it follows from a well-known theorem$^3$ that $(x_{n_k})$ converges to the same limit $x$. Finally, the definition of a compact set requires that $x \in K$. Then according to Stephen Abbott, this proves that $K$ is closed.
But in his prove he has assumed that the sequence $(x_n)$ converges. What happens if $(x_n)$ does not converge? Then we can still have a subsequence that converges to a limit, right? If so, then I think his theorem is incomplete, or am I missing something?
$^1$ A set $K \subseteq \mathbb{R}$ is compact if every sequence in $K$ has a subsequence that converges to a limit that is also in $K$.
$^2$ A set $K \subseteq \mathbb{R}$ is closed if it contains its limit points.$^{2.1}$
$^{2.1}$ A point $x$ is a limit point of a set $K$ if every $\epsilon$-neighborhood $V_\epsilon (x)$ of $x$ intersects the set $K$ in some point other than $x$.
$^3$ Subsequences of a convergent sequence converge to the same limit as the original sequence.