I am aware the the question has been posted here:
For any subset $S$ of $\mathbb{R}$, the distance function $d_s(x) = d(x,S)$ is continuous
However, I would like feedback on my work.
Prove that the $\mathbb{R} \to [0,+\infty), d_s(x) = d(x,S)$, is Lipschitz continuous, provided that $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\}$$
How I worked on it:
since Lipschitz continuous functions are by $|f(y) - f(x)| \leq K|y-x|$ where $K$ is a constant $\forall\, y \in S$ sufficiently near to $x$.
$d_s: \mathbb{R}\to [0,\infty) \implies d_s(x) = d(x,S)$
$|d_s(y)-d_s(x)| = |d(y,S) - d(x,S)|$
$\leq |y-x|$ by the property $|d(x,z)-d(y,z)| \leq d(x,y)$
$\leq 1\cdot|y-x|$
So $d_s(x)$ is Lipschitz continuous with $K= 1$.
$s\in S$
) not s$\in$ S (s$\in$ S
). – Em. Aug 17 '16 at 05:58