In mathematics, the Heine–Cantor theorem, named after Eduard Heine and Georg Cantor, states that if f : M → N is a continuous function between two metric spaces, and M is compact, then f is uniformly continuous. An important special case is that every continuous function from a bounded closed interval to the real numbers is uniformly continuous.
Suppose that
M
and
N
are two metric spaces with metrics
d
M
and
d
N
, respectively. Suppose further that
f
:
M
→
N
is continuous, and that
M
is compact. We want to show that
f
is uniformly continuous, that is, for every
ε
>
0
there exists
δ
>
0
such that for all points
x
,
y
in the domain
M
,
d
M
(
x
,
y
)
<
δ
implies that
d
N
(
f
(
x
)
,
f
(
y
)
)
<
ε
.
Fix some positive
ε
>
0
. Then by continuity, for any point
x
in our domain
M
, there exists a positive real number
δ
x
>
0
such that
d
N
(
f
(
x
)
,
f
(
y
)
)
<
ε
/
2
when
y
is within
δ
x
of
x
.
Let
U
x
be the open
δ
x
/
2
-neighborhood of
x
, i.e. the set
U
x
=
{
y
∣
d
M
(
x
,
y
)
<
1
2
δ
x
}
Since each point
x
is contained in its own
U
x
, we find that the collection
{
U
x
∣
x
∈
M
}
is an open cover of
M
. Since
M
is compact, this cover has a finite subcover. That subcover must be of the form
U
x
1
,
U
x
2
,
…
,
U
x
n
for some finite set of points
{
x
1
,
x
2
,
…
,
x
n
}
⊂
M
. Each of these open sets has an associated radius
δ
x
i
/
2
. Let us now define
δ
=
min
1
≤
i
≤
n
1
2
δ
x
i
, i.e. the minimum radius of these open sets. Since we have a finite number of positive radii, this number
δ
is well-defined and positive. We may now show that this
δ
works for the definition of uniform continuity.
Suppose that
d
M
(
x
,
y
)
<
δ
for any two
x
,
y
in
M
. Since the sets
U
x
i
form an open (sub)cover of our space
M
, we know that
x
must lie within one of them, say
U
x
i
. Then we have that
d
M
(
x
,
x
i
)
<
1
2
δ
x
i
. The Triangle Inequality then implies that
d
M
(
x
i
,
y
)
≤
d
M
(
x
i
,
x
)
+
d
M
(
x
,
y
)
<
1
2
δ
x
i
+
δ
≤
δ
x
i
implying that
x
and
y
are both at most
δ
x
i
away from
x
i
. By definition of
δ
x
i
, this implies that
d
N
(
f
(
x
i
)
,
f
(
x
)
)
and
d
N
(
f
(
x
i
)
,
f
(
y
)
)
are both less than
ε
/
2
. Applying the Triangle Inequality then yields the desired
d
N
(
f
(
x
)
,
f
(
y
)
)
≤
d
N
(
f
(
x
i
)
,
f
(
x
)
)
+
d
N
(
f
(
x
i
)
,
f
(
y
)
)
<
1
2
ε
+
1
2
ε
=
ε
For an alternative proof in the case of
M
=
[
a
,
b
]
a closed interval, see the article on non-standard calculus.