Let E be a normed space, and $U \subset E$.
Let $f : \begin{align} E & \to \mathbb{R}_+, \quad \\ x & \mapsto \inf \left\{ || x - u || \mid u \in U \right\} \end{align}$.
Is $f$ continuous over E? If so, how can I prove it? I tried the following, but it feels somehow weird, I think I made a mistake somewhere:
Let $e > 0$, and $x,y \in E, \quad ||x-y|| \leq e$.
$\forall u \in U, \quad ||x-u|| = ||x-y+y-u|| \leq e + ||y - u|| \ $
therefore $\ f(x) \leq \inf \left\{ e + || y - u || \right\} = e + f(y)$
And, symmetrically, $f(y) \leq e + f(x) \iff f(y) - e \leq f(x)\ $ therefore
$\ f(x) \in [f(y)-e, f(y) + e] \iff |f(x)-f(y)| \leq e \ $
which would prove $f$ is continuous... Did I make a mistake somewhere?
Thanks in advance! :)
Your proof looks good. Maybe as a remark, what you actually have shown is that $f$ is not only continuous, but actually Lipschitz continuous with constant $1$.
This is not terribly surprising, if you think about what $f$ denotes, namely the distance you have from the set $U$. (sometimes also written as $\operatorname{dist}(x,U)$ or $\operatorname{d}(x,U)$) If you move by some length $l$, then the distance between you and the set $U$ will at most increase or decrease by the same length $l$. In a way this is just the intuition behind the triangle inequality.