I would like to know if my proof of ex 4.13 is correct. Thanks!
Exercise 4.13 in Rudin asks: Let $E$ be a dense subset of a metric space $X$, and let $f$ be a uniformly continuous real function defined on $E$. Prove that $f$ has a continuous extension from $E$ to $X$.
My proof:
Suppose $p \in X \setminus E$. Then there is a sequence $\{p_n\} \to p$ in $E$, because $p$ must be a limit point of $E$. Since $f$ is uniformly continuous on $E$, we have for each $\epsilon > 0$ the existence of a $\delta > 0$ such that $$d(p_n, p_m) < \delta \implies d(f(p_n), f(p_m))<\epsilon$$ However, since $\{p_n\}$ converges, it is also Cauchy so that there is some $N$ such that $$n, m \geq N \implies d(p_n, p_m) < \delta \implies d(f(p_n), f(p_m))<\epsilon$$ This statement implies that $\{f(p_n)\}$ is Cauchy. Now since $f$ is real-valued, cauchy sequences converge and thus $\{f(p_n)\}$ converges. Now just define $$g(p) = f(p) \text{ if } p \in E$$ $$g(p) = \lim_{n\to\infty} f(p_n) \text{ for } p \notin E, \{p_n\} \to p \text{ in } E$$
This is the desired continuous extension.($p_n$ is an arbitrary sequence in $E$ that tends to $p$)