I've proved the continuity of the distance function $d:X \times X\rightarrow \mathbb{R}$ in metric space $(X, d)$. Now I've to work on this:
Let $S \subseteq X$ be a dense set and $\{x_n\}$ a sequence included in $X$. Prove that if there exists $x \in X$ such that $\lim\limits_{n \to \infty} d(x_n, s) = d(x, s)$ for all $s \in S$, then $\lim \limits_{n \to \infty} x_n = x$.
My proof: We want to prove that $\lim \limits_{n \to \infty} d(x_n, x) = 0$. Since $S$ is dense, let $\{s_m \}$ be a sequence in $S$ such that $s_m \to x$.
$ \begin{align} \lim_{n \to \infty} d(x_n, x) &= \lim_{n \to \infty} d \left(x_n, \lim_{m \to \infty} s_m \right) \\ &= \lim_{n \to \infty} \ \lim_{m \to \infty} d(x_n, s_m) \\ &= \lim_{m \to \infty} \ \lim_{n \to \infty} \ d(x_n, s_m) & & (d \text{ is continuous)} \\ &= \lim_{m \to \infty} \ d(x, s_m) && \text{(by hypothesis)}\\ &= d(x, x) = 0. \end{align} $
Do you think this proof is correct? It is heavily bases in the fact that $d$ is continuous.
I'll really appreciate any advice.
Thanks!