The first part of the proof is obvious. If | f(t) - f(s) | is
small whenever |s - t | is small, regardless of the particular
location of s and t, then in particular | f(x) - f(
)
| must be small when | x -
|
is small.
The second part is much more complicated, and relies on the structure
of compact sets on the real line. Recall that a set is compact
if every open cover has a finite subcover. We first want to define
a suitable open cover: pick an
>
0. For every fixed
in the compact
set D there exists a (possibly different)
(
) > 0 such that
Define
Then U is an open cover of D, so by compactness
can be reduced to a finite subcover. Suppose that the sets
,
, ...,
cover
the set D:
Let
Since this is a minimum over a finite set, we know that
>
0. Now take any two numbers t, s in D such that | t - s
| <
. Since the finite
collection covers the compact set D we know that s is contained
in, say,
.
How far away from the center of
is
t then ?
By the
choice of
we know that
Now we are almost done, because if | t - s | <
then
The first difference on the right is less than epsilon because
| t -
| <
(
). The second one is also less
than epsilon because s is contained in the set
.
Hence, the difference on the left is less than twice epsilon.
But now it should be easy for you to modify the proof so that
we can arrive at
That finishes the proof.