How to prove the Lebesgue density theorem using martingales? The Lebesgue density theorem says that for almost every $x \in A \subset [0,1]$ with $A$ Lebesgue measurable

$$\lim_{h \to 0^+} \frac{|A \cap (x-h, x+h) |}{2h}=1 \tag{1}.$$

Here, "almost every" is with respect to Lebesgue measure, which we denote by $|\cdot|$.
This looks an awful lot like martingale convergence and I thought I could prove (1) with martingale methods, but I need a little help concluding.
First, if $|A|=0$, then (1) is immediate, so it suffices to prove the result for $A$ in the Borel sigma-algebra $\mathscr{B}$ of $[0,1]$.
Switching to "probabilistic notation", let $(\Omega, \mathscr{B}, P)$ be Lebesgue measure on the Borel subsets of $[0,1]$. We need a filtration $(\mathcal{F}_n)$ that generates $\mathscr{B}$. We'll use the standard dyadic partitions, that is, each $\mathcal{F}_n$ is generated by the partition $\{[0, 1/2^n),[1/2^n, 2/2^n)...,[1 - 1/2^n , 1) \}$. Then, by martingale convergence for conditional probabilities, for almost every $x$

$$P(A \mid \mathcal{F}_n)(x) \to \mathbf{1}_A(x) \tag{2}.$$

Let $F_n(x)$ be the cell of the partition generating $\mathcal{F}_n$ that contains $x$. By the properties of the conditional probability and (2), for almost every $x \in A$

$$\frac{P(A \cap F_n(x))}{P(F_n(x))} \to 1 \tag{3}.$$

This looks a lot like (1), but I'm having trouble concluding. The difficulty is that (1) considers every open interval centered at $x$, whereas (3) considers only dyadic intervals. Now, it seems likely that (1) follows rather quickly by some argument about approximating open intervals by dyadic ones, but I'm having trouble saying this in a precise way. Any help on this point would be appreciated.
 A: (Gerald Edgar has provided references to a generalisation of the Martingale Convergence Theorem from totally ordered filtrations to directed sets. The Lesbegue density property follows from a "Vitali property" of the filtration given by finite partitions of $[0,1]$. I'm just using the ordinary Martingale Convergence Theorem.)
There is a trick due to Morayne and Solecki: Morayne, Michał; Solecki, Sławomir, Martingale proof of the existence of Lebesgue points, Real Anal. Exch. 15(1989/90), No.1, 401-406 (1990). ZBL0701.26009. 
Available on JSTOR: https://www.jstor.org/stable/44152020

The fact that this paper exists suggests that it's not a completely obvious application. The idea is to use your martingale, then another Doob martingale defined similarly but with the filtration shifted right by $1/3=\sum_{k\geq 1}1/4^k$. 
Assume $A\subseteq [1/3,1)$. Using your notation, define
$$\mathcal F'_n = \{[p+1/3,q+1/3)|[p,q)\in\mathcal F_n\}.$$
And define $F'_n(x)$ to be the cell in $\mathcal F'_n$ containing $x$.
Note that $F'_n(x)$ is $F_n(x)$ shifted by one of the four numbers $\pm 2^{-n}(1/3), \pm 2^{-n}(2/3)$. This implies that either:


*

*$x-2^{-n}/6$ and $x+2^{-n}/6$ are in $F_n(x)$, or

*$x+2^{-n}/6$ falls outside $F_n(x)$, so $x-2^{-n}/6$ and $x+2^{-n}/6$ are in $F'_n(x)$, or

*$x-2^{-n}/6$ falls outside $F_n(x)$, so again $x-2^{-n}/6$ and $x+2^{-n}/6$ are in $F'_n(x)$.


In any case $(x-2^{-n}/6, x+2^{-n}/6)$ is contained in $F_n(x)$ or $F'_n(x)$. For a.e. $x$ we know that both martingales converge to $1_A(x)$. If I've got the constants right, this means that for fixed $(x,\epsilon)$ we can pick $N$ such that for $n>N$ we have both
$$\frac{P(A \cap F_n(x))}{P(F_n(x))} > 1-\epsilon/12
\textrm{ and }
\frac{P(A \cap F'_n(x))}{P(F'_n(x))} > 1-\epsilon/12.$$
which implies
$$\frac{|A \cap (x-h, x+h) |}{2h}\geq 1-\epsilon.$$
for $h<2^{-N}$.
