Heine-Borel theorem. I'm interested in one question about Heine-Borel theorem.
We know that if S is bounded and closed then it's compact.
Standard proof using fact that some segment is compact. And because of S is bounded it's have left and right bound of segment. But my question is my S should be closed? We could take open , bounded S and some segment which cover out set. Why it's so necessary ?

Let $S$ be any subset of $\Bbb R$ that is not closed; then $S$ is not compact. 
To see this, note first that since $S$ is not closed, it has a limit point $p$ that is not in $S$. For each $n\in\Bbb Z^+$ let 
$$U_n=\left\{x\in\Bbb R:|x-p|>\frac1n\right\}\;;$$
each $U_n$ is an open set in $\Bbb R$, and $\bigcup_{n\in\Bbb N}U_n=\Bbb R\setminus\{p\}\supseteq S$, so $\mathscr{U}=\{U_n:n\in\Bbb Z^+\}$ is an open cover of $S$. Suppose that $F$ is a finite subset of $\Bbb Z^+$. Let $m=\max F$; then each $U_n$ with $n\in F$ is a subset of $U_m$, so $\bigcup_{n\in F}U_n=U_m$. But $p$ is a limit point of $S$, so there is an $x\in S$ such that $|p-x|<\frac1m$, and clearly $x\in S\setminus U_m$. Thus, no finite subfamily of $\mathscr{U}$ covers $S$.
