To show that the function $f(x) = \inf \{d(x,x_n) : n \in \Bbb N \}$ is uniformly continuous on X. Let $(x_n)$ be a sequence in a metric space $(X,d)$. 
Show that the function $f(x) = \inf \{d(x,x_n) : n \in \Bbb N \}$ is uniformly continuous on X. 
I have started the proof in this way... Let $a,b \in X$, now $$d(f(a), f(b))= d(\inf \{d(a,x_n) : n \in \Bbb N \} , \inf \{d(b,x_n) : n \in \Bbb N \}) \\ \le d( d(a ,x_i) , d(b,x_i))$$ for some particular $i$. How can I proceed further?
 A: Your inequality does not make sense, mainly because $d(a,x_i)$ and $d(b,x_i)$ are not elements of $X$. To show that $f$ is uniformly continuous on $X$, it suffices to show $|f(x) - f(y)| \le d(x,y)$ for all $x,y\in X$. Fix $x,y \in X$. Given $\epsilon > 0$, there exists $n\in \Bbb N$ such that $d(y,x_n) < f(y) + \epsilon$. By the triangle inequality, $$f(x) \le d(x,x_n) \le d(x,y) + d(y,x_n) < d(x,y) + f(y) + \epsilon.$$ Thus $f(x) - f(y) \le d(x,y) + \epsilon$. By a similar argument, $f(y) - f(x) \le d(x,y) + \epsilon$. Hence $|f(x) - f(y)| \le d(x,y) + \epsilon$. Since $\epsilon$ was arbitrary, $|f(x) - f(y)| \le d(x,y)$. 
A: Choose $x,y \in X$. Then $d(y,x_n) \le d(y,x)+d(x,x_n)$ and so
$f(y) \le d(y,x)+d(x,x_n)$ for all $n$ and so $f(y) \le d(y,x)+f(x)$.
Reversing the roles of $x,y$ and combining gives
$|f(x)-f(y)| \le d(x,y)$, from which uniform continuity follows.
A: If the metric on $\mathbb{R}$ is the euclidean metric, then we have, $$\begin{align}d_\mathbb{R}(f(a), f(b))&= d_\mathbb{R}(\inf \{d_X(a,x_n) : n \in \Bbb N \} , \inf \{d_X(b,x_n) : n \in \Bbb N \}) \\& \le d_\mathbb{R}( d_X(a ,x_i) , d_X(b,x_i))\\&=|d_X(a ,x_i) - d_X(b,x_i)|\\&\le|d_X(a ,b)|\\&=d_X(a ,b)\\\implies d_\mathbb{R}(f(a), f(b))&\le 1\cdot d_X(a ,b)\end{align}$$
Hence $f$ is Lipschitz continuous. But every Lipschitz continuous map is uniformly continuous, therefore $f$ is uniformly continuous.

Triangle inequality for the metric $d_X$ gives
$d_X(a ,x_i) \le d_X(a,b)+d_X(b,x_i)\implies d_X(a ,x_i) - d_X(b,x_i)\le d_X(a,b)$
