Uniform continuity of continuous functions on compact sets Assume that $f: \mathbb R \rightarrow \mathbb R$ is continuous function on the compact set $A$. 
Does for any $\varepsilon >0$ exist a $\delta >0$, such that 
$$
\lvert\, f(x)-f(y)\rvert<\varepsilon \,\,\,\,\,\,\textrm{for every}\,\,\,\, x,y\in A,\,\,
\text{with}\,\,\, 
\lvert x-y\rvert<\delta?
$$

First notice that we can assume that $f$ is identically zero on $A$ by subtracting off a continuous function $g$ extending the restriction of $f$ to $A$. Such a $g$ can be constructed using the distance function $d$ from $x\in\mathbb{R}$ to $A\subset \mathbb{R}$.
The question becomes to show that for every $\epsilon>0$ there exists a $\delta>0$ such that if $d(t,A)<\delta$ then $|f(t)|<\epsilon$. Suppose there were no such $\delta$.  Then one can construct a sequence $(t_n)$ with $d(t_n,A)\to 0$ as $n\to\infty$ while $|f(t_n)|\geq\epsilon$. The sequence is obviously bounded and therefore has a convergent subsequence $t_{n_k}\to x_0$.  Then $x_0\in A$ by compactness. It follows that $f$ is not continuous at $x_0$, contradiction.
