Let $(X,d_X)$ be a metric space and $\Omega\subset X$ be dense. Let $(Y,d_Y)$ be a complete metric space and $f:\Omega\rightarrow X$ such that $d_Y(f(x_1),f(x_2))=d_X(x_1,x_2)$.
Why do we get a map $g: X\to Y$ sucht that $d_Y(g(x_1),g(x_2))=d_X(x_1,x_2)$ and $g(x)=f(x)$ for any $x\in\Omega$?
I've tried to consider sequences $x_n\rightarrow x$ and $y_n\rightarrow y$. Can we get $d_X(x_n,y_n)\rightarrow d_X(x,y)$ and how does it proof my question above?
Here's a construction of $g$.
If $x\in X$, let $g(x)=f(x)$.
If $x\in X\setminus \Omega$, consider $x_n\in \Omega^\mathbb N$ such that $x_n\to x$. Since $d_Y(f(x_n),f(x_m))=d_X(x_n,x_m)$ and $(x_n)$ is Cauchy, the sequence $f(x_n)$ is Cauchy as well, hence convergent to some $l\in Y$.
Now consider some other $y_n\in \Omega^\mathbb N$ such that $y_n\to x$. From the same previous argument, $f(y_n)$ converges to some $l'\in Y$.
In order to properly define $g$, we need to prove that $l=l'$. Consider the sequence $z_n$ such that $z_{2n}=x_n$ and $z_{2n+1}=y_n$. It's easy to prove that $z_n$ converges to $x$, hence $f(z_n)$ converges to some $l''\in Y$. Note that $f(z_{2n})$ converges to $l$ and $f(z_{2n+1})$ converges to $l'$. Hence $l=l'=l''$. We can therefore define $g(x)=\lim_n f(x_n)$.
Now use the continuity of $d_Y$ to prove that $d_Y(g(x_1),g(x_2))=d_X(x_1,x_2)$/