In mathematics, the Heine–Cantor theorem states that a continuous function between two metric spaces is uniformly continuous if its domain is compact.
The theorem is named after Eduard Heine and Georg Cantor.
An important special case of the Cantor theorem is that every continuous function from a closed bounded interval to the real numbers is uniformly continuous.
Proof of Heine–Cantor theorem
Suppose that
and
are two metric spaces with metrics
and
, respectively. Suppose further that a function
is continuous and
is compact. We want to show that
is uniformly continuous, that is, for every positive real number
there exists a positive real number
such that for all points
in the function domain
,
implies that
.
Consider some positive real number
. By continuity, for any point
in the domain
, there exists some positive real number
such that
when
, i.e., a fact that
is within
of
implies that
is within
of
.
Let
be the open
-neighborhood of
, i.e. the set
![{\displaystyle U_{x}=\left\{y\mid d_{M}(x,y)<{\frac {1}{2}}\delta _{x}\right\}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b5091d99df5a01d42559cf6fd06a652432dce611)
Since each point
is contained in its own
, we find that the collection
is an open cover of
. Since
is compact, this cover has a finite subcover
where
. Each of these open sets has an associated radius
. Let us now define
, i.e. the minimum radius of these open sets. Since we have a finite number of positive radii, this minimum
is well-defined and positive. We now show that this
works for the definition of uniform continuity.
Suppose that
for any two
in
. Since the sets
form an open (sub)cover of our space
, we know that
must lie within one of them, say
. Then we have that
. The triangle inequality then implies that
![{\displaystyle d_{M}(x_{i},y)\leq d_{M}(x_{i},x)+d_{M}(x,y)<{\frac {1}{2}}\delta _{x_{i}}+\delta \leq \delta _{x_{i}},}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6d7746b824c33c4dfe4a00520241b600e52dcf71)
implying that
and
are both at most
away from
. By definition of
, this implies that
and
are both less than
. Applying the triangle inequality then yields the desired
![{\displaystyle d_{N}(f(x),f(y))\leq d_{N}(f(x_{i}),f(x))+d_{N}(f(x_{i}),f(y))<{\frac {\varepsilon }{2}}+{\frac {\varepsilon }{2}}=\varepsilon .}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0adeaad44b9173c49f16d57668b4eba0782d748a)
∎
For an alternative proof in the case of
, a closed interval, see the article Non-standard calculus.