Solution (source code)

= Solution

The <Martingale convergence theorem> states that a discrete-time martingale $(X_n)$ with <uniform integrability> has an integrable random variable $X_\infty$ such that
$$
X_n\longrightarrow X_\infty
$$
almost surely and in $L^1$. Moreover, the martingale is closed by its limit:
$$
X_n=\mathbb E[X_\infty\mid\mathcal F_n].
$$