# Prove by reduction to the absurd that if $K$ is compact and $f$ is continuous on $K$ then $f$ is uniformly continuous in $K$.

[Heine–Cantor theorem] Prove by reduction to the absurd that if $$K\subset\mathbb{R^m}$$ is compact and $$f: K\longrightarrow \mathbb{R}$$ is continuous on $$K$$ then $$f$$ is uniformly continuous in $$K$$.

I know the proof by useing balls but I'm haveing a little trouble doing it by reduction to the absurd.

I'm trying to use the definition with sequences:

$$f$$ is not uniformly continuous in $$K$$ if there exists $$\epsilon_0> 0$$ such that for all $$n \in\mathbb{N}$$ there exist $$x_n, y_n\in K$$ such that $$|x_n- y_n|<\frac{1}{n}\quad$$ but $$\quad|f (x_n)- f (y_n)| \geq \epsilon_0$$.

Any suggestions about the process and what $$x_n$$ and $$y_n$$ could be would be great!

• In inequality with functions you should have more or less $\geqslant \epsilon_0$. – zkutch Sep 1 '20 at 2:16
• @EvanWilliamChandra That can go as an answer below, it is that good an explanation. – Teresa Lisbon Sep 1 '20 at 2:48
• @Theresa Lisbon Thank you for your comment. I'll move my comment above to the answer section then. – Evan William Chandra Sep 1 '20 at 3:18

You know that $$a_{n}:= x_{n}-y_{n}\to0$$ as $$n\to0$$. Then, use compactness of $$K$$ to extract subsequence which converges in $$K$$ so that $$x_{n_{k}}\to x$$ and $$y_{n_{k}}\to y$$ as $$k\to\infty$$. Next, show that $$x=y$$ and use continuity of $$f$$ to see that $$\lim\limits_{k\to\infty} f(x_{n_{k}}) = f(x) = f(y) = \lim\limits_{k\to\infty} f(y_{n_{k}})$$
Finally, the rest of the argument is obvious from your contradiction assumption of $$f$$ being not uniformly continuous.
• +1... To a student I would say: Take an infinite $S\subset \Bbb N$ such that $(x_n)_{n\in S}\to x.$ And take an infinite $T\subset S$ such that $(y_n)_{n\in T}\;$...(which is a subsequence of $(y_n)_{n\in S})$... converges to $y.$ And I would emphasize that $x,y \in K$ as $K$ must be closed. – DanielWainfleet Sep 1 '20 at 6:05