Solution (source code)

= Solution

The <Martingale convergence theorem> gives an almost-sure limit $M_\infty$, because $|M_n|\leq1$. The <dominated convergence theorem> also gives $M_n\to M_\infty$ in $L^1$.

To identify the limit, take $A\in\bigcup_n\mathcal F_n$. For some $N$, $A\in\mathcal F_N$, and for every $n\geq N$,
$$
\mathbb E[M_n\mathbf1_A]=\mathbb E[Z\mathbf1_A].
$$
Passing to the $L^1$ limit preserves this equality. The sets for which $\mathbb E[M_\infty\mathbf1_A]=\mathbb E[Z\mathbf1_A]$ form a monotone class containing the algebra $\bigcup_n\mathcal F_n$, so the equality holds throughout $\mathcal F_\infty=\sigma(\bigcup_n\mathcal F_n)$. Since $M_\infty$ is $\mathcal F_\infty$-measurable, it is $\mathbb E[Z\mid\mathcal F_\infty]$. This proves the <conditional-expectation convergence along a filtration> both almost surely and in $L^1$.