Solution (source code)

= Solution

The <Heine-Borel theorem> says that a <subset> $K$ of finite-dimensional <Euclidean space> is <compact> exactly when it is both <closed> and <bounded>:
$$
\boxed{K\subseteq\mathbb R^n\text{ compact}\iff K\text{ closed and bounded}.}
$$
Here <compactness> refers to the <subspace topology> induced by the usual <Euclidean metric>, and <closedness> and <boundedness> are measured in the ambient <Euclidean space>. This characterization does not hold for arbitrary <metric spaces>.