# Completion of a metric space

I got a doubt with the next exercise.

Let $(X,d)$ be a metric space. Denote $\mathcal{B}(X,\mathbb{R})$ the subset of all bounded functions from $X$ into $\mathbb{R}$. Let $a \in X$. Show that the function $$\varphi:x \to f_x$$ from $X$ into $\mathcal{B}(X,\mathbb{R})$, where $f_x(y)=d(x,y)-d(a,y)$ is an isometry from $X$ onto a sub-space of $\mathcal{B}(X,\mathbb{R})$ . Deduce that exists $\hat{X}$ complete metric space such that $X$ is isometric to a dense sub-space of $\hat{X}$.

I could show that $\varphi$ is a isometry, taking as its codomain the image of $\varphi$. With this, I supposed that the $\hat{X}$ that I'm looking for is $\mathcal{B}(X,\mathbb{R})$, and the dense sub-space would be $\varphi(X)$. Am I doing right? If that the case, How show that $\varphi(X)$ is dense in $\mathcal{B}(X,\mathbb{R})$ ?

• What's $a$ in the definition of $f_x(y)$? – Asaf Karagila Jul 29 '13 at 2:21
• Thanks, I've edited the question. It's an element of $X$. – Juan Pablo Jul 29 '13 at 2:24
• Sure, the dense subspace will be $\phi(X)$. But not in $B(X,\mathbb{R})$. In $\overline{\phi(X)}$, closed subset of $B(X,\mathbb{R})$. Since you showed $\phi$ is isometric, all that remains is to show that $B(X,\mathbb{R})$ is complete with the sup norm. Then $\overline{\phi(X)}$ will be complete as a closed subset of a complete space. – Julien Jul 29 '13 at 2:29
HINT: Let $d=\varphi[X]$. Then as you say, $\varphi$ is an isometry of $X$ onto $D$. There is no reason at all to suppose that $D$ is dense in $\mathscr{B}(X,\Bbb R)$.
As a fairly extreme example, suppose that $X=\{p\}$ is the one-point metric space. Then $\mathscr{B}(X,\Bbb R)$ contains a function $g_r(p)=r$ for each $r\in\Bbb R$ and is homeomorphic to $\Bbb R$, but $D$ contains only the $0$ function and is plainly not dense in $\mathscr{B}(X,\Bbb R)$.
However, $D$ is dense in $\operatorname{cl}_{\mathscr{B}(X,\Bbb R)}D$. Let $\hat X=\operatorname{cl}_{\mathscr{B}(X,\Bbb R)}D$, and show that $\hat X$ is complete in the metric that it inherits from $\mathscr{B}(X,\Bbb R)$. One of the theorems listed here is useful.