# Inverse of Heine–Cantor theorem

We have by Heine–Cantor theorem that:

If $M$ and $N$ are metric spaces and $M$ is compact then every continuous function $f : M \to N$, is uniformly continuous.

Is the inverse of this theorem is satisfied?

-
How would you state rhe unverse theorem? –  Norbert Feb 27 '13 at 19:13
Do you mean "If any map from $M$ to another metric space is uniformly continuous, then $M$ is compact?" –  Thomas Andrews Feb 27 '13 at 19:19
@Norbert: IF every continuous function f : M → N be uniformly continuous then M is compact. –  rese Feb 27 '13 at 19:21
Obviously not true unless you all $N$ to vary. For example, if $N=\{0\}$ then every continous function $\mathbb R\to N$ is uniformly continuous, but $\mathbb R$ is not compact. –  Thomas Andrews Feb 27 '13 at 19:22
It's not true, since if $M=\mathbb Z$, for instance, or any discrete metric space, then any map from $M\to N$ is uniformly continous. You might need to add the condition that $M$ is connected. –  Thomas Andrews Feb 27 '13 at 19:34

## 2 Answers

Let $(M,d)$ be a metric space that is not compact and has no isolated points. Then there exists a countable discrete subspace $Z$. For this, there exists an enumeration $Z=\{z_n\mid n\in\mathbb N\}$ and radii $r_n>0$ such that $Z\cap B(z_n,r_n)=\{z_n\}$. Then the $B(z_n,\frac12r_n)$ are pairwise disjoint. We may assume wlog. that $r_n\to 0$. Then for any $x\in M$, there exists $r>0$ such that $B(x,r)$ intersects only finitely many $B(z_n,\frac12r_n)$. Therefore if for each $n$ we have a continuous function $f_n\colon M\to\mathbb R$ with $f_n(x)=0$ for all $x$ with $d(x,z_n)\ge \frac12r_n$, then the sum $$\tag1f(x):=\sum_{n\in\mathbb N} f_n(x)$$ is in fact locally finite (that is each point has a neighbourhood where all but finitely many summands are identically $0$), hence continuous. Since the $z_n$ are not isolated, we find $y_n$ with $0<d(y_n,z_n)<r_n$ and can define $$f_n(x)=\max\left\{0, 1-\frac{d(x,z_n)}{d(y_n,z_n)}\right\}.$$ With this choice of $f_n$, the function $f$ is not uniformly continuous: No matter how small we choose $\delta>0$, we will find $n$ with $r_n<\delta$ and hence $d(y_n,z_n)<\delta$. But $f(y_n)=f_n(y_n)=0$ and $f(z_n)=f_n(z_n)=1$.

We also note that pointwise at most one summand in $(5)$ is nonzero, hence $0\le f(x)\le 1$ with our choice of $f_n$.

Conclusion: If $(M,d)$ is a metric space without isolated points and every continuous function $f\colon M\to\mathbb [0,1]$ is uniformly continuous, then $M$ is compact.

-
Nice! The first paragraph had me a little confused - the existence of $Z$ is asserted without any reference to why. (I figured it out, but it took me a little while.) –  Thomas Andrews Mar 2 '13 at 12:52
Ir seems like you want $d(y_n,z_n)<r_n/2$ for the condition on $f_n$ to be true... –  Thomas Andrews Mar 2 '13 at 15:22

If $M$ is path-connected and any continuous $f:\mathbb M\to \mathbb R$ is uniformly continuous, then $M$ is compact. (I think it is true if $M$ is connected, but I'm not sure.)

First prove that $M$ is bounded. If $M$ is not bounded, pick $x_0\in M$ and define $f(x)=d_M(x_0,x)^2$. Show that this is not uniformly continuous. So $$|f(x)-f(y)|=|d(x_0,x)-d(x_0,y)|(d(x_0,x)+d(x_0,y))\geq d(x,y)d(x_0,x)$$

So, given an $\epsilon>0$ and a $\delta>0$, pick $x$ so that $d(x_0,x)>2\epsilon/\delta$. Pick $y$ so that $d(x,y)=\delta/2$ (which is possible by connectedness.) Then $$|f(x)-f(y)| > \frac{\delta}{2} d(x_0,x) =\epsilon$$ So $f$ is not uniformly continuous.

Then we prove that $M$ is complete.

Assume $x_1,x_2,\dots,x_n,\dots$ is a Cauchy sequence which does not converge. For each $x\in M$, the sequence of real numbers $d(x,x_1),d(x,x_2),\dots$ is Cauchy in $\mathbb R$. Define$$g(x)=\lim_{n\to\infty} d(x,x_n)$$ Show that this is a continuous map from $M\to\mathbb R^+$. Then define $f(x)=\frac{1}{g(x)}$, which is again continuous. Finally, show that this $f$ cannot be uniformly continuous I'll leave these last steps to you.

-
It should be enough that $M$ has no isolated points (and all $f\colon M\to \mathbb R$ are unoiformly continuous). –  Hagen von Eitzen Feb 27 '13 at 20:20
For the unbounded part, for example, I need, before I pick $\delta$, some $0<\alpha<1$ so that after I've chosen $x$ I can always find a $y$ such that $\alpha\delta < d(x,y) < \delta$. If such an $\alpha$ exists, I'm done. Connectedness means I can choose any $\alpha$ but I couldn't see how to get it just from "no isolated points." @HagenvonEitzen –  Thomas Andrews Feb 27 '13 at 20:43
Or even some $p:(0,\infty)\to(0,\infty)$ so that $p(\delta)<\delta$ and $$\forall x\in M,\delta>0 \exists y\in M: p(\delta)<d(x,y)<\delta$$ –  Thomas Andrews Feb 27 '13 at 20:47