I find the following link Gradient of squared distance to a convex set. But I don't understand how prove that the function is convex.
My attempt was use the $$\langle f^{\prime}(y)-f^{\prime}(x), y-x\rangle \geq 0$$ and try use that $\|,\|^{2}$ is convex but I don't know if when set $\|x-P_{D}(x)\|^{2}$ this property continue.
Thanks! in advance.