Set . Expanding the square gives
The function is one-strongly convex, so its Fenchel conjugate is differentiable with one-Lipschitz gradient. The displayed identity therefore proves that the Moreau envelope is differentiable even when is nonsmooth.
The function
is the Moreau envelope of the convex indicator , and is therefore convex. It is nonnegative and vanishes exactly on . Since , the minimum of over is zero, and every minimizer belongs to both and .
For a nonempty closed convex set , the squared-distance function is the Moreau envelope of its indicator functional of a constraint set. It is convex and differentiable with
and this gradient is one-Lipschitz.