existence of certain continuous function $\overline{f}$ 
Let $(X,d_X)$ and $(Y, d_Y)$ be complete metric spaces (so $X$ and $Y$ are nonempty). Let $A\subseteq X$ be nonempty. A function $f : A\to Y$ is uniformly continuous if given $\epsilon > 0,\exists \delta > 0$ so that $d_Y(f(x), f(y)) < \epsilon$ whenever $d_X(x,y) < \delta$ for $x,y \in A.$ Show that if $f : A \to Y$ is uniformly continuous then there is a unique continuous function $\overline{f} : \overline{A} \to Y$ so that $\overline{f}\vert_A = f$ (here $\overline{A} $ is the closure of $A$, or intersection of all closed sets containing $A$). Moreover, $\overline{f}$ is uniformly continuous.

I think I can show that $\overline{f}$, if it exists, must be unique. Suppose $g_1, g_2 : \overline{A}\to Y$ are such that $g_i\vert_A = f$ for $i=1,2.$ Then for all $x \in \overline{A}, \exists (x_n)\subset A, x_n \to x$ so $g_1(x_n)\to g_1(x)$ and $g_2(x_n)\to g_2(x).$ But $g_1(x_n) = g_2(x_n) = f(x_n)$ for all $n$ and so by the uniqueness of limits $g(x) = f(x).$

However, I'm not sure how to show the existence of $\overline{f}.$

I think I can show that if $\overline{f}$ exists, it is uniformly continuous by taking advantage of the continuity of $f,$ the definition of every element in $\overline{A}$ as the limit of a sequence in $A,$ and the uniform continuity of $\overline{f}.$
 A: Hint:
Define $$\overline{f}(x)=f(x) \text{ if } x\in A$$ and
$$\overline{f}(x) = \lim_{x_n\rightarrow x} f(x_n)$$ (with $(x_n)\in A$ is an arbitrary sequence converging to $x$) if $x \not \in A$.
You should be able to finish from this point on.
A: You need $Y$ to be a complete metric space.
Take $x\in \overline A$ and a sequence $(x_n)\subset A:x_n\to x$, now lets prove that $f(x_n)$ converges in $Y$, take $\varepsilon>0$ and $\delta>0$ from the uniform continuity, since $x_n$ is convergent there is an $n_0$ such that for every $m,n>n_0$ $d_X(x_n,x_m)<\delta$ (every convergent sequence is a Cauchy sequence), so $d_Y(f(x_n),f(x_m))<\varepsilon$, which implies that $f(x_n)$ is convergent because of completeness.
Now take two sequences $(x_n),(y_n)\subset A$ such that $x_n\to x$ and $y_n\to x$, now lets prove that $\lim_n f(x_n)=\lim_n f(y_n)$. Since both $(x_n)$ and $(y_n)$ converges to $x$ for every $\varepsilon>0$ there is an $n_0$ such that $n>n_0$ implies $d_X(x_n,x)<\delta/2$, $d_X(y_n,x)<\delta/2$ so $d_X(x_n,y_n)<\delta$ and $d_Y(f(x_n),f(y_n))<\varepsilon$ so clearly $\lim f(x_n)=\lim f(y_n)$.
So you can define $\overline f:\overline A\to Y/\overline f(x)=\lim f(x_n)$ for any $(x_n)\subset A$ such that $x_n\to x$. Clearly $\overline f|_A=f$.
To prove that $\overline f$ is uniformly continuous (hence continuous) take $\varepsilon>0$, $\delta_0>0$ such that $d_Y(f(x),f(y))<\varepsilon/2$ when $d_X(x,y)<3\delta_0$ and $x,y\in \overline A$ such that $d_X(x,y)<\delta_0$ then by definition of $\overline f$ there exists $\delta_1,\delta_2>0$ such that if $x'\in A: d_X(x,x')<\delta_1$ then $d_Y(\overline f(x),\overline f(x'))<\varepsilon/4$ and $y'\in A:d_X(y,y')<\delta_2$ then $d(\overline f(y),\overline f(y'))<\varepsilon/4$ now take $x'.y'\in A$ such that $d_X(x,x'),d_X(y,y')<\min\{\delta_0,\delta_1,\delta_2\}=\delta$, so $d_X(x',y')\leq d_X(x,x')+d_X(x,y)+d_X(y,y')<3\delta\leq3\delta_0$ hence $d_Y(\overline f(x'),\overline f(y'))<\varepsilon/2$ and
$$d_Y(\overline f(x),\overline f(y))\leq d_Y(\overline f(x),\overline f(x'))+d_Y(\overline f(x'),\overline f(y'))+d_Y(\overline f(y),\overline f(y'))<\varepsilon$$
We conclude that $d_Y(\overline f(x),\overline f(y))<\varepsilon$ when $d_X(x,y)<\delta$.
