Unbounded continuous witnesses to noncompactness of a real subspace (source code)

= Unbounded continuous witnesses to noncompactness of a real subspace

If $X\subseteq\mathbb R$ is not <compact>, there is an unbounded <continuous function> $X\to\mathbb R$. By the <Heine-Borel theorem>, either $X$ is <unbounded>, when $f(x)=x$ works, or it is not <closed>. In the latter case choose $a\in\overline X\setminus X$; the <continuous function> $f(x)=|x-a|^{-1}$ is unbounded because points of $X$ approach the missing <limit point> $a$. This proof uses the specific compactness characterization of real subspaces; boundedness of a general <metric space> does not imply compactness.