Moreau envelope (source code)

= Moreau envelope
{c}
{title2=$M_tf$}
{wiki}

The Moreau envelope of a proper closed convex function is
$$
M_tf(x)=\min_u\left\{f(u)+\frac1{2t}\|u-x\|^2\right\}.
$$
It is differentiable even when $f$ is not, with $\nabla M_tf(x)=[x-\operatorname{prox}_{tf}(x)]/t$ and $1/t$-Lipschitz gradient.