Let $S \subset \mathbb R$ be any set, and define for any $x \in \mathbb R$ the distance between $x$ and the set $S$ by $d(x,S) = \inf\{|x-s| : s \in S\}$.
Prove that the function $d_s: \mathbb R \to [0,+\infty)$ given by $d_s(x) = d(x,S)$, is Lipschitz continuous.
Prove that if $S$ is compact then for every $x$ in $\mathbb R$, there is $s$ in $S$ such that $|x-s| = d(x,S).$