Sign criterion for best L1 approximation (source code)

= Sign criterion for best L1 approximation
{title2=$\operatorname{sign}(f-p_*)\perp U$}

For real functions, let $r=f-p_*$ and put $\operatorname{sign}(0)=0$. If $\int v\,\operatorname{sign}(r)=0$ for every $v\in U$, then $p_*$ is a <best approximation in a normed space> using the $L^1$ norm. The proof is the pointwise inequality $|r-v|\geq|r|-v\operatorname{sign}(r)$, followed by integration. This is a sufficient criterion even if the residual vanishes on a positive-measure set; a general necessary criterion may choose any subgradient in $[-1,1]$ on that zero set.