# Understanding the Heine–Cantor theorem

The "Heine–Cantor theorem" states: If $f : M → N$ is a continuous function between two metric spaces, and $M$ is compact, then $f$ is uniformly continuous.

I do not doubt its validity, of course, just trying to understand why it is valid.

If we, say, take the function: $y = x^4$. It rises very quickly with the rising value of the argument. How is it that according to Heine–Cantor theorem just because we enclose the argument of the function, say, between $[0, 10]$ it automatically becomes "uniformly continuous" (considering of course that it is "continuous")?

There are areas of function values inside the argument segment where function will rise quicker than in some other areas.

Does the reason have to do with the fact that we could in worst case choose $\delta=10$ (length of the segment in example) and thus cover all possible cases for $\varepsilon$?

• The rough idea is that, in the $\varepsilon-\delta$ language, for fixed $\varepsilon$ we have that $\delta$ is a continuous function of $x \in M$. So if $M$ is compact it admits a minimum by Weierstrass theorem, and this implies that continuity is in fact uniform continuity. – Francesco Polizzi Jul 17 '17 at 14:17
• It means that this δ would be sufficient for any $\epsilon$ you might choose for the definition of the uniform continuity to hold. – user464118 Jul 17 '17 at 14:27
• @Eval it is not independent of $\epsilon$. It's independent of $x$. – Alfred Yerger Jul 17 '17 at 14:27

Compactness is a finiteness property. It says that given any infinite collection of data associated to open sets in a topological space, you can in fact deal with only finitely many.

The great thing about a finite number of objects, is that you can compare them. Unlike with infinite sets, which only have well-defined suprema and infima, finite sets have maxima and minima (infinite sets can have these, but often don't, such as with sets like $(0,1)$, which has no maxima or minima).

Uniform continuity is a statement that one particular $\delta$ works for every $x$. Compactness says finitely many $\delta$ suffice to talk about the $\delta$'s needed for the whole space. So the finiteness lets us pick the one we need for the whole space.

• Is thus "the one we need for the whole space" in fact the one that represents the length of the segment where a continuous function is defined? – user464118 Jul 17 '17 at 14:22
• @Eval I'm not sure I understand this question. The $\delta$ that we pick is the minimum of the finitely many $\delta$'s that appear after applying compactness. Maybe said another way, you can think of $\delta$ as a function which depends on $x$. It tells you how close to $x$ you have to be to ensure continuity changes the function by at most $\epsilon$. Uniform continuity is the statement that we can choose $\delta$ to be small enough that it is independent of $x$. – Alfred Yerger Jul 17 '17 at 14:27
• @Eval Applying the (metric) definition of continuity at each point for any fixed $\epsilon$ gives you an open cover of $[a,b]$, so that if you have two points in the same interval their images are within $\epsilon$ of each other. Compactness gives a finite subcover. The intervals in this finite subcover necessarily have some minimal positive length, which is your $\delta(\epsilon)$ (not depending on $x$ but still depending on $\epsilon$). – Ian Jul 17 '17 at 14:39

you can also consider the following idea(take for simplicty $N = \mathbb{R})$: since $f$ is continouus and $M$ is compact, the function $f$ obtains its maximal value, which is some real number, inside $M$ (see also here). In other words, you can control the values in $N$ taken by $f$ and in particular, $f:M \to \mathbb{R}$ is a bounded function (because $f$ is always less or equal than its maximum). That example makes it easier to understand why you can control $f$ on the entire compact set $M$, as you questioned.

• I don't think this helps, as it says nothing of why for instance $f(x)=\sin(1/x)$ on $(0,1]$ is not uniformly continuous. – Ian Jul 17 '17 at 14:38