I'm trying to understand an alternative proof of the idea that if $E$ is a dense subset of a metric space $X$, and $f\colon E\to\mathbb{R}$ is uniformly continuous, then $f$ has a uniform continuous extension to $X$.
I think I know how to do this using Cauchy sequences, but there is this suggested alternative. For each $p\in X$, let $V_n(p)$ be the set of $q\in E$ such that $d(p,q)<\frac{1}{n}$. Then prove that the intersections of the closures $ A=\bigcap_{n=1}^\infty\overline{f(V_n(p))} $ consists of a single point, $g(p)$, and so $g$ is the desired continuous extension of $f$. Why is this intersection a single point, and why is $g$ continuous?
This is what I did so far. Since $f$ is uniformly continuous, for given $\epsilon>0$, there is $\delta>0$ such that $\text{diam }f(V)<\epsilon$ whenever $\text{diam }V<\delta$. Since $V_n(p)$ has diameter at most $\frac{2}{n}$, taking $n>2/\delta$ would imply $ \text{diam }f(V_n(p))=\text{diam }\overline{f(V_n(p))}<\epsilon $ So I think $\lim_{n\to\infty}\text{diam }\overline{f(V_n(p))}=0$, which would imply $A$ consists of at most one point. I noticed that the closures form a descending sequence of closed sets, but I couldn't tell if they are bounded since $X$ is an arbitrary metric space, in order to conclude that the intersection is nonempty, and hence a single point.
Lastly, why is $g$ continuous at points $p\in X\setminus E$? I was trying to think of an argument with sequences converging to $p$ since $p$ is a limit point of $E$, but got stumping on how to show $g$ is actually continuous. Thanks.