The distance function is continuous. Let $S\subset\Bbb R$ not empty, define $f:\Bbb R\rightarrow\Bbb R$ such that $f(x)=
\inf\{|x-s| ;s\in S\}$ 
then, prove that  $|f(x)-f(y)|\le|x-y| $ for any $x,y \in \Bbb R$

$|x - s| \le |x - y| + |y - s|$ for every $s \in S$.
Hence $f(x) \le |x - y| + f(y)$.
Similarly $f(y) \le |x - y| + f(x)$.
Hence $|f(x) - f(y)| \le |x - y|$.
