Let $X\subset R$ be non-empty. $f :\Bbb{R}\to\Bbb{R}$ is defined by $$f(p)=\inf_{x\in X}\left|x-p\right|$$ for every $p\in\Bbb{R}$. How do I show that $f$ is continuous?
I tried using the reverse triangle inequality and the inequality $\inf\left|x-p\right|\leq\left|\inf (x-p)\right|$ to argue with $\epsilon-\delta$'s but it doesn't work.
Hint: You should be able to prove the inequality $|f(p)-f(q)|\le|p-q|$. Due to the symmetry, it is enough to show $f(p)-f(q)\le|p-q|$, or equivalently $f(p)\le f(q)+|p-q|$.