Solution (source code)

= Solution

For a <proper convex function> $E$ on a real <Hilbert space>, its <subdifferential> at $y$ is
$$
\partial E(y)=\{p:E(x)\geq E(y)+\langle p,x-y\rangle\text{ for every }x\}.
$$
In a <Banach space>, interpret the pairing with an element of the <dual space>. For a chosen <subgradient> $p\in\partial E(y)$, the <Bregman distance> is
$$
\boxed{D_E^p(x,y)=E(x)-E(y)-\langle p,x-y\rangle\geq0.}
$$
If also $q\in\partial E(x)$, its <symmetric Bregman distance> is
$$
\boxed{D_E^p(x,y)+D_E^q(y,x)=\langle q-p,x-y\rangle.}
$$
The <subgradient inequality> proves nonnegativity. These quantities depend on the chosen <subgradients> and generally are not <metrics>: they need not distinguish different points or obey the <triangle inequality>.