extending an isometry to the completion I wanted to ask, I am given an isometry $f:X_1\longrightarrow X_2$ ($X_1, X_2$ are metric spaces). Both $X_1, X_2$ are dense in $\overline{X_1}, \overline{X_2}$ respectively. And $\overline{X_1}, \overline{X_2}$ are complete metric spaces. How can I extend $f$ both its domain and image to their corresponding completions and that the extension will still be an isometry? I can guess we extend it with limits of Cauchy sequences in the completion, but I cannot show the extension is still an isometry. Thanks for the help.

Let $\bar f:\bar X_1 \to \bar X_2$ constructed with limits of Cauchy sequences.
It remains to show that $\bar f$ is an isometry. 
Let $a,b\in \bar X_1$ be given. Then there there are sequences $(a_k), (b_k)$ in $X_1$ converging to $a$ and $b$, respectively.
Moreover, it holds
$$
\bar f(a) = \lim_{k\to\infty} f(a_k), \quad \bar f(b) = \lim_{k\to\infty} f(b_k).
$$
Let $d_i$ be the metric of $X_i$ and $\bar X_i$. Then we have
$$
d_2(\bar f(a),\bar f(b)) = d_2( \lim_{k\to\infty}f(a_k), \lim_{k\to\infty}f(b_k))
= \lim_{k\to\infty} d_2(f(a_k),f(b_k))
= \lim_{k\to\infty} d_1(a_k,b_k) = d_1(\lim_{k\to\infty}a_k,\lim_{k\to\infty}b_k) = d_1(a,b).
$$
Where we used continuity of the metric, and the isometry property of $f$.
