Let $f(x) : \mathbb{R}^n \rightarrow \mathbb{R}$ be a convex and differentiable function, and let $P$ be a point in $\mathbb{R}^n$.
Define a function $g(m): R \rightarrow R$ to be the distance between point $P$ and the sub-level set $ K_m = \{ x \in \mathbb{R}^n \mid f(x) \le m\}$, i.e., $g(m) = d(P, K_m)$. Is the function $g$ a continuous function? If not, is there any restriction on $f$ that will make $g$ continuous? Thanks!
HINT: the function $g$ is convex.
Indeed, we have
$$\lambda_1 K_{m_1} + \lambda_2 K_{m_2} \subset K_{\lambda_1 m_1 + \lambda_2 m_2}$$ since $f$ is convex, and
$$d(P, \lambda_1 K_{m_1} + \lambda_2 K_{m_2}) \le \lambda_1 d( P, K_{m_1}) + \lambda_2 d(P, K_{m_2} ) $$ since $Q\mapsto d(P, Q)$ is convex.