In his book "Real and Complex Analysis", chapter "Elementary Hilbert Space Theory", Walter Rudin introduces the following Lemma to prove Bessel's inequality:
Given a complete metric space $X$, if $f:X \longrightarrow Y$ is a continuous function defining an isometry on a dense subset $X_0\subseteq X$, and if $f(X_0)$ is dense in $Y$, than $f$ is an isometry on $X$ and $f$ is surjective.
The proof details why $f$ is surjective, but only states that $f$ being an isometry is an immediate consequence of $f$ being continuous and $X_0$ being dense in $X$.
Why is that so? I do not see the immediate consequence.
Let $D$ be the continuous map as you defined it. And consider the map $\hat{D}$ defined on the same space as $D$, with $\hat{D}(x_1,x_2)=0 ; \forall x_1,x_2$.
$D$ and $\hat{D}$ agree on the subspace $X_0\times X_0$, and therefore they are equal on $X\times X$(a proof is given for example here: http://math.stackexchange.com/questions/202325/continuous-functions-between-metric-spaces-are-equal-if-they-are-equal-on-a-dens).
It follows that $d_Y(f(x_1),f(x_2))-d_X(x_1,x_2)=0$ for all $x_1,x_2$, which proves that $f$ is an isometry on $X$.
Does this seem correct?
– Kuifje Sep 23 '15 at 13:29