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\) (see Exercise 5 for terminology). (Uniqueness
follows from Exercise 4.) Hint: For each \(p \in X\) and each positive integer
\(n\), let \(V_{n}(p)\) be the set of all \(q \in E\) with \(d(p, q)<1 / n .\) Use
Exercise 9 to show that the intersection of the closures of the sets
\(f\left(V_{1}(p)\right), f\left(V_{2}(p)\right), \ldots\), consists of a single
point, say \(g(p)\), of \(R^{1}\). Prove that the function \(g\) so defined on \(X\)
is the desired extension of \(f\).
Could the range space \(R^{1}\) be replaced by \(R^{k} ?\) By any compact metric
space? By any complete metric space? By any metric space?