If f is uniformly continuous on S and has a continuous extension on $\overline S$, $\tilde f$, then $\tilde f$ is continuous on $\overline S$. 
Suppose $f : S \to \mathbb{R}$ is a uniformly continuous function. Then show that $f$ has a continuous extension $\tilde f : \overline{S} \to \mathbb{R}$. Verify that $\tilde f$ is  continuous on $\overline S$. 

I am having trouble solving this problem, any hints would be greatly appreciated.
 A: I'm going to write a self-contained answer. So, if there are some facts that seem obvious to you, just ignore them. 
We want to define $\tilde{f}$ on $\bar{S}$ such that $\tilde{f}\mid_S=f$.  By definition, $\bar{S}$ consists of all points of $S$ together with all limit points of $S$. So, it makes sense to think about defining $\tilde{f}$ using limit like $\tilde{f}(x) = \lim_{n\to\infty}f(x_n)$ where $x_n \to x$ but we must define it in such a way that $\tilde{f}$ becomes well-defined. We can't define $\tilde{f}$ if the limit in our definition does not exist for some points in the domain or if what we have defined turns out to give different values for the same input value. To take care of the issue of existence, we need the following fact about uniformly continuous functions:

The image of a Cauchy sequence under a uniformly continuous function remains Cauchy.

Proof) To see why, remember that by definition, for all $\epsilon >0$, there exists some $\delta>0$ such that for any $x$ and $y$ in the domain $|x-y| <\delta \implies |f(x)-f(y)|<\epsilon$. Also, by definition, if $\{x_n\}$ is Cauchy, then $\exists M\in\mathbb{N}$ such that $\forall n,m \geq M: |x_n-x_m|<\delta$. Combining these two proves that $\forall \epsilon >0, \exists M\in\mathbb{N}: n,m \geq M  \implies |f(x_n)-f(x_m)|<\epsilon$. Hence, $\{f(x_n)\}$ is Cauchy. Done.
Now, for any $x \in \bar{S}$, take a sequence $\{x_n\}_{n=1}^{\infty}$ (could be a constant sequence) such that $\lim_{n\to\infty}x_n=x$. We know that $\{f(x_n)\}_{n=1}^{\infty}$ is Cauchy. Because $\mathbb{R}$ is complete, $\{f(x_n)\}_{n=1}^{\infty}$ is a real number and the existence issue has been resolved. Let's call this limit $\tilde{f}(x)$. In other words, we have defined that
$$\lim_{n\to\infty}f(x_n)=\tilde{f}(x)$$
If two sequences converge to $x$, i.e. $\{a_n\}$ and $\{b_n\}$ exist such that $\lim_{n\to\infty}a_n=\lim_{n\to\infty}b_n=x$, then writing down the definition of uniform continuity for $f$ and seeing that there exists $L\in\mathbb{N}$ such that $\forall n: n \geq L \implies |a_n-b_n|<\delta$ immediately imply that $\lim_{n\to\infty}f(a_n)=\lim_{n\to\infty}f(b_n)$ which proves that $\tilde{f}$ is indeed well-defined. 
To see that $\tilde{f}$ is an extension of $f$, note that for any $x \in S$, the constant sequence $x_n=x$ proves that $\forall x\in S: \tilde{f}(x)=\lim_{n\to\infty}f(x)=f(x)$.
Also, note that by construction $\tilde{f}$ is continuous because continuity is equivalent to exchanging the order of applying $\tilde{f}$ and $\lim$ and we have defined $\tilde{f}$ such that $\lim_{n\to\infty}\tilde{f}(x_n)=\tilde{f}(\lim_{n\to\infty}x_n)$. Q.E.D.
