Dyadic density martingale (source code)

= Dyadic density martingale
{title2=$X_n=\sum_{D\in\mathcal D_n}\mu(D)\lambda(D)^{-1}\mathbf1_D$}

For a finite positive <measure> on $[0,1)$, average its mass over each half-open <dyadic interval>. The resulting nonnegative <martingale> has constant <expectation> $\mu([0,1))$: a parent interval's mass is the sum of its children's masses. Its almost-sure limit is integrable but the <martingale> need not be <uniformly integrable>. The limit recovers the density of the absolutely continuous component in the <Lebesgue decomposition theorem>.