Smooth convex approximation proof of the Tanaka formula (source code)

= Smooth convex approximation proof of the Tanaka formula
{title2=$f_n'\longrightarrow\mathbf1_{(0,\infty)}-\mathbf1_{(-\infty,0]}$}

Choose $f_n(0)=0$ and $f_n'(x)=\phi(nx)$, where $\phi$ is continuously differentiable, nondecreasing, equal to $-1$ on $(-\infty,0]$ and $1$ on $[1,\infty)$. Then $f_n''\geq0$ and $0\leq|x|-f_n(x)\leq2/n$. For $X=M+A$ with continuous adapted finite-variation $A$, the <Itô isometry> and <Doob L2 maximal inequality> give local uniform convergence in probability of the martingale integrals. Dominated convergence against the total-variation measure gives pathwise uniform convergence of the drift integrals. The nondecreasing corrections $\frac12\int f_n''(X)d[M]$ therefore converge locally uniformly in probability to $|X|-\int\operatorname{sgn}_-(X)dX$. A subsequence on one probability-one event shows that the limit is continuous and nondecreasing. Localization removes the deterministic bounds used in the argument.