About the proof of the Heine-Borel Theorem 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.
 A: I think you are not understanding what is going on. You need to prove that $K$ is closed, so you must prove that any point $x$ that is the limit of a sequence of pints $x_n \in K$ belongs to $K$. So you must assume that $x=\lim_n x_n$! 
A: Definition (Hausdorff space)
A topological space $X$ is called Hausdorff or $T_2$ space if and only iff every two points $x,y\in X$ have disjunct neighbourhoods $x\in O_x\subset x$ and $y\in O_y\subset X$.
Example (Metric spaces are Hausdorff) 
Every metric space $M$ is (as a topological space) $T_2$ - for each $x, y\in M$ say $d:=d(x,y)$ is their distance, then the $\epsilon$-spheres around $x$ and $y$ with $\epsilon < \frac{d}{2}$ (f.i. open intervals with midpoint $x$ resp. $y$) are disjoint neighbourhoods of $x$ and $y$. Therefore especially $R$ is $T_2$ (since $R$ is a metric space).
Proposition (Compact subsets of $T_2$ spaces are closed) 
Say $A\subset X$ where $X$ is a topological space that is Hausdorff (f.i. $R$).
If $A$ is compact then $A$ is closed.
Proof: Say $X$ is $T_2$ and $A\subset X$ is compact. We show that $A^c$ is open (and thereby $A$ is closed) by showing that any $y\in A^c$ has a neighbourhood $V_y\subset A^c$:
Say $y\in A^c$ arbitrary. Then for any $x\in A$ we have a neighbourhood $O_x$ of $x$ and a neighbourhood $V_y^x$ of $y$ that is disjoint to $O_x$ (since $X$ is $T_2$). So we have
$$A\subset \bigcup_{x\in A}O_x$$ and
$$\bigcup_{x\in A}O_x \cap\bigcap_{x\in A}V_y^x=\emptyset$$
and therefore
$$\bigcap_{x\in A}V_y^x\subset A^c$$ 
Because $A$ is compact we can argue with finitely many $x\in A$. But then $V_y:=\bigcap_{x\in A}V_y^x$ is open - so altogether $V_y$ is an open neighbourhood of $y$ that is contained in $A^c$. $\diamond$ 

(For $X=R$ the $O_x$ and $V_y^x$ become open intervals in $R$ with midpoint $x$ resp. $y$. )
