Continuity of the closure of a set I have a homework question that I just could not figure out.
Suppose that $f:A \rightarrow \mathbb{R}$ is a uniformly continuous real-valued function on a subset $A$ of a metric space $X$. Show that there is a continuous real-valued function $g:\overline{A} \rightarrow \mathbb{R}$ defined on the closure $\overline{A}$ of $A$ such that, for each $p \in A,  g(p) = f(p)$. Show that $g$ is unique.
My idea: I proved in an earlier problem that if $\{p_n\}$ is a Cauchy sequence in $A$, then $\{f(p_n)\}$ is a Cauchy sequence in $\mathbb{R}$. I want to use that for the $p \in A' \setminus A $ but I don't know where to go from there.
Thanks for the help.
 A: I’ll get you started. If $x\in\operatorname{cl}A$, there is a sequence $\langle a_n:n\in\Bbb N\rangle$ in $A$ converging to $x$. This sequence is Cauchy, so its image under $f$ is Cauchy; and since $\Bbb R$ is complete in the usual metric, $\langle f(a_n):n\in\Bbb N\rangle$ converges to some real number, $r$. Clearly one would like to set $g(x)=r$. In order to do this, however, one must show that $r$ is well-defined. Is it possible that if we’d chosen a different sequence in $A$ converging to $x$, this approach would have given us a different $r$? You need to show that it would not. Once you’ve done that, you need to verify that $g$ is continuous, and that $g\upharpoonright A=f$.
Finally, once all that’s done, you still have to show that $g$ is unique: if $h:\operatorname{cl}A\to\Bbb R$ is a continuous function such that $h\upharpoonright A=f$, then $h=g$. For this you’ll want to use the fact that $A$ is dense in $\operatorname{cl}A$.
A: Choose $a \in {\overline A}$.  then there is a sequence $a_n$ in $A$ so that $a_n\to a$.  Let $\epsilon > 0$.  Since $f$ is uniformly continuous on $A$, there is a $\delta > 0$ so that $d(a,b) < \delta\implies d(f(a),f(b)) < \epsilon$.  Since the sequence $a_n$ converges, it is Cauchy. Choose $N\in\mathbb{N}$ so that $n\ge N \implies d(a_n, a_m) < \epsilon.$  by uniform continuity, $d(f(a_m), f(a_n)) <\epsilon$ whenever $m, n \ge N$.  The sequence $f(a_n)$ is Cauchy and therefore converges. 
The real numbers are complete, so the sequence $f(a_n)$ converges to some real number.  Now you can do a uniqueness argument that only one such number is possible.  The uniformity of the continuity will allow you to argue this extension is continuous.  Finally, it is easy to see that if functions are continuous and agree on a dense subset of a metric space, they must agree everywhere.
A: Each $p\in A′\setminus A$ is a limit of elements $p_n\in A$. Now, use that as $(p_n)$ is a Cauchy sequence in A, then $(f(p_n))$ is a Cauchy sequence in $\Bbb R$. Define $$g(p)=\lim_{n\to\infty}f(p_n).$$
(Why $g$ is well-defined?)
