# Problem 13 chapter 4 from baby Rudin

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$.

Could the range space $\mathbb{R}^1$ be replaced by any metric space?

Proof: I solved the first part of problem but I am interested in a second part.

Let $f(x)=x, E=Y=\mathbb{Q}$ and $X=\mathbb{R}^1$. Note that $\mathbb{Q}$ is not complete with usual metric.

Let exists a continuous extension $g$ such that $g$ is continuous on real line and $g|_{\mathbb{Q}}=f$. Let $\alpha_n$ sequence of rational numbers such that $\alpha_n\to \sqrt{2}$. So $g$ is continuous then $\lim \limits_{n\to \infty}g(\alpha_n)=g(\sqrt{2})$ but LHS is equal to $\lim \limits_{n\to \infty}g(\alpha_n)=\lim \limits_{n\to \infty}f(\alpha_n)=\lim \limits_{n\to \infty}\alpha_n=\sqrt{2}$. So $g(\sqrt{2})=\sqrt{2}$ but $\sqrt{2}\notin \mathbb{Q}$.We get contradiction because $g:\mathbb{R}\to \mathbb{Q}.$

Is my example correct? Can anyone check this please?

• That looks good to me! – Moya Sep 27 '15 at 21:19
• That looks fine. – Babai Sep 28 '15 at 6:08