Differentiability of value of convex optimization problem Setup:
Consider the problem
$$
V(y) \quad = \quad \min_{x \in \mathbb R^N} f(x) \quad \text{s.t.} \quad g(x+y) \leq 0
$$
where $f$ and $g$ are convex functions and $y \in \mathbb R^N$ is a parameter taken as given. Assume that this problem admits a (potentially non-unique) solution for all $y \in \mathbb R^N$.
Question:
Under what conditions is $V(y)$ twice continuously differentiable in $y$?
 A: A friend suggested a solution, which I will sketch below. It relies on some rank conditions that are hard to interpret, but it is better than nothing.
(1) If either $f$ or $g$ is strictly convex, then (as I have already assumed a solution exists) there exists a unique solution $x(y)$.
(2) If $f$ and $g$ are continuously differentiable and one imposes assumptions so that the constraint binds, then this solution and its associated Lagrange multiplier (which exists by convexity) are $N+1$ unknowns solving a system of $N+1$ equations (first order condition plus constraint). If $f$ and $g$ are twice continuously differentiable and some rank conditions hold, one can apply the implicit function theorem to argue that $x(y)$ is continuously differentiable.
(3) Theorem 3 of Milgrom & Segal (2002) is an envelope theorem implying that---under some conditions implied by those assumed in (2)---$V(y)$ is differentiable and $V_y(y) = -f_x(x(y))$. (Here it helps to rewrite the problem as suggested by Ilya's comment.) Since $f(x)$ and $x(y)$ are both continuously differentiable, so is $V_y(y)$. So $V(y)$ is twice continuously differentiable.
