Question: Suppose $V$ is a normed space and $f:V \rightarrow \mathbb R$ defined as $f(x)=d(x,C)=\inf_{c \in C}||x-c||_V$ where $C$ is a convex subset of $V$. Prove $f$ is a convex function.
Attempt at a solution: (I would like to know if it is correct to say the first line equals the second line.)
For some $\lambda \in [0,1]$ we have $$f(\lambda x+(1-\lambda )y)=d(\lambda x+(1-\lambda )y,C)=\inf_{c \in C} ||\lambda x+(1-\lambda )y-c||_V=$$ $$\inf_{a, b \in C}||\lambda x+(1-\lambda )y-\lambda a-(1-\lambda )b||_V =$$ $$\inf_{a, b \in C}||\lambda x-\lambda a+(1-\lambda )y-(1-\lambda )b||_V $$ $$\leq \lambda \inf_{a\in C}||x-a||_V+(1-\lambda)\inf_{b \in C}||y-b||_V=\lambda f(x)+(1-\lambda )f(y)$$ So we can conclude $f$ is convex.