nLab Heine-Borel theorem





topology (point-set topology, point-free topology)

see also differential topology, algebraic topology, functional analysis and topological homotopy theory


Basic concepts

Universal constructions

Extra stuff, structure, properties


Basic statements


Analysis Theorems

topological homotopy theory



The classical Heine–Borel theorem identifies those topological subspaces of Cartesian spaces ( n\mathbb{R}^ns) that are compact in terms of simpler properties. A generalisation applies to all metric spaces and even to uniform spaces.


This is the classical theorem:


Let SS be a topological subspace of a Cartesian space (S nS \subset \mathbb{R}^n). Then SS is a compact topological space (with the induced topology) precisely if it is closed and bounded in n\mathbb{R}^n.

It's easy to prove that SS is closed precisely if it is a complete metric space as with the induced metric, and similarly SS is bounded precisely if it is totally bounded. This gives the next version:


Let SS be a topological subspace of a Cartesian space (S nS \subset \mathbb{R}^n). Then SS is a compact topological space (with the induced topology) precisely if it is complete and totally bounded (with the induced metric).

This refers entirely to SS as a metric space in its own right. In fact it holds much more generally than for subspaces of a cartesian space:


Let SS be a metric space. Then SS is compact precisely if it is complete and totally bounded.

This theorem refers only to uniform properties of SS, and in fact a further generalistion is true:


Let SS be a uniform space. Then SS is compact precisely if it is complete and totally bounded.

The hard part is proving that a complete totally bounded space is compact; the converse is easy.

We could also try to generalise Theorem to subspaces of other metric spaces, but this fails: every compact subspace of a metric space is closed and bounded (which is the easy direction), but not conversely.

Another variant of these statements is:

Logical status

In the old days, one called a closed and bounded interval in the real line ‘compact’; once closedness and boundedness were generalised from intervals to arbitrary subsets (of the real line), the definition of ‘compact’ also generalised. The content of Theorem , then, is that this condition is equivalent to the modern definition of ‘compact’ using open covers, and indeed the modern definition was only derived afterwards as a name for the conclusion of the theorem.

In constructive mathematics, one sees several definitions of ‘compact’, which may make the theorem provable, refutable, or undecidable in various constructive systems. Using the open-cover definition of ‘compact’, Theorems and are equivalent to the fan theorem (and so hold in intuitionism), but Theorems and are stronger and Brouwer could not prove them, leading him to define ‘compact’ (for a metric space) to mean complete and totally bounded. In other literature, one sometimes sees the abbreviation ‘CTB’ used instead. In Russian constructivism, already Theorems and can be refuted using the open-cover definition, but CTB spaces are still important.

In locale theory and other approaches to pointless topology, the open-cover definition of ‘compact’ is clearly correct, and the failure of CTB spaces to be compact (constructively) may be seen as a consequence of working with points. Already in Bishop's weak system of constructivism, every CTB metric space XX gives rise to a compact locale, which classically (assuming excluded middle and dependent choice) is the locale of open subsets of XX but constructively requires a more nuanced construction; see Vickers.

In dependent type theory, the open-cover definition of ‘compact’ holds as well, but one has to use the higher inductive family of inductive covers instead of the usual pointwise definitions of covers (UFP13, §11.5).


For definiteness, we restate the versions which we prove:


(closed interval is compact)

In classical mathematics:

For any a<ba \lt b \in \mathbb{R} the closed interval

[a,b] [a,b] \subset \mathbb{R}

regarded with its subspace topology is a compact topological space.


Since all the closed intervals are homeomorphic it is sufficient to show the statement for [0,1][0,1]. Hence let {U i[0,1]} iI\{U_i \subset [0,1]\}_{i \in I} be an open cover. We need to show that it has an open subcover.

Say that an element x[0,1]x \in [0,1] is admissible if the closed sub-interval [0,x][0,x] is covered by finitely many of the U iU_i. In this terminlogy, what we need to show is that 11 is admissible.

Observe from the definition that

  1. 0 is admissible,

  2. if y<x[0,1]y \lt x \in [0,1] and xx is admissible, then also yy is admissible.

This means that the set of admissible xx forms either an open interval [0,g)[0,g) or a closed interval [0,g][0,g], for some g[0,1]g \in [0,1]. We need to show that the latter is true, and for g=1g = 1. We do so by observing that the alternatives lead to contradictions:

  1. Assume that the set of admissible values were an open interval [0,g)[0,g). By assumption there would be a finite subset JIJ \subset I such that {U i[0,1]} iJI\{U_i \subset [0,1] \}_{i \in J \subset I} were a finite open cover of [0,g)[0,g). Accordingly, since there is some i gIi_g \in I such that gU i gg \in U_{i_g}, the union {U i} iJ{U i g}\{U_i\}_{i \in J } \sqcup \{U_{i_g}\} were a finite cover of the closed interval [0,g][0,g], contradicting the assumption that gg itself is not admissible (since it is not contained in [0,g)[0,g)).

  2. Assume that the set of admissible values were a closed interval [0,g][0,g] for g<1g \lt 1. By assumption there would then be a finite set JIJ \subset I such that {U i[0,1]} iJI\{U_i \subset [0,1]\}_{i \in J \subset I} were a finite cover of [0,g][0,g]. Hence there would be an index i gJi_g \in J such that gU i gg \in U_{i_g}. But then by the nature of open subsets in the Euclidean space \mathbb{R}, this U i gU_{i_g} would also contain an open ball B g (ϵ)=(gϵ,g+ϵ)B^\circ_g(\epsilon) = (g-\epsilon, g + \epsilon). This would mean that the set of admissible values includes the open interval [0,g+ϵ)[0,g+ \epsilon), contradicting the assumption.

This gives a proof by contradiction.


(Heine-Borel theorem classically)

For nn \in \mathbb{N}, regard n\mathbb{R}^n as the nn-dimensional Euclidean space, regarded as a topological space via its metric topology.

Then in classical mathematics for a topological subspace S nS \subset \mathbb{R}^n the following are equivalent:

  1. SS is compact,

  2. SS is closed and bounded.


First consider a subset S nS \subset \mathbb{R}^n which is closed and bounded. We need to show that regarded as a topological subspace it is compact.

The assumption that SS is bounded by (hence contained in) some open ball B x (ϵ)B^\circ_x(\epsilon) in n\mathbb{R}^n implies that it is contained in {(x i) i=1 n n|ϵx iϵ}\{ (x_i)_{i = 1}^n \in \mathbb{R}^n \,\vert\, -\epsilon \leq x_i \leq \epsilon \}. This topological subspace is homeomorphic to the nn-cube [ϵ,ϵ] n[-\epsilon, \epsilon]^n. Since the closed interval [ϵ,ϵ][-\epsilon, \epsilon] is compact by lemma , the Tychonoff theorem implies that this nn-cube is compact.

Since subsets are closed in a closed subspace precisely if they are closed in the ambient space the closed subset S nS \subset \mathbb{R}^n is still closed as a subset S[ϵ,ϵ] nS \subset [-\epsilon, \epsilon]^n. Since closed subspaces of compact spaces are compact this implies that SS is compact.

Conversely, assume that S nS \subset \mathbb{R}^n is a compact subspace. We need to show that it is closed and bounded.

The first statement follows since the Euclidean space n\mathbb{R}^n is Hausdorff and since compact subspaces of Hausdorff spaces are closed.

Hence what remains is to show that SS is bounded.

To that end, choose any positive real number ϵ >0\epsilon \in \mathbb{R}_{\gt 0} and consider the open cover of all of n\mathbb{R}^n by the open n-cubes

(k 1ϵ,k 1+1+ϵ)×(k 2ϵ,k 2+1+ϵ)××(k nϵ,k n+1+ϵ) (k_1-\epsilon, k_1+1+\epsilon) \times (k_2-\epsilon, k_2+1+\epsilon) \times \cdots \times (k_n-\epsilon, k_n+1+\epsilon)

for n-tuples of integers (k 1,k 2,,k n) n(k_1, k_2 , \cdots, k_n ) \in \mathbb{Z}^n. The restrictions of these to SS hence form an open cover of the subspace SS. By the assumption that SS is compact, there is then a finite subset of nn-tuples of integers such that the corresponding nn-cubes still cover SS. But the union of any finite number of bounded closed nn-cubes in n\mathbb{R}^n is clearly a bounded subset, and hence so is SS.


According to Wikipedia, the theorem was first proved by Pierre Cousin in 1895. It is named after Eduard Heine (who used it but did not prove it) and Émile Borel (who proved a limited version of it), an instance of Stigler's law of eponymy.

A proof is spelled out for instance at

On constructing a compact locale from a CTB metric space:

On the Heine-Borel theorem in dependent type theory using inductive covers, see section 11.5 of:

Last revised on January 8, 2024 at 17:40:08. See the history of this page for a list of all contributions to it.