Solution (source code)

= Solution

The <martingale> property gives $\mathbb E[X_n\mid\mathcal F_m]=X_m$. Both $X_m$ and $X_n$ are <square-integrable>, so their product is integrable by the <Cauchy-Schwarz inequality>. Using the $\mathcal F_m$-measurability of $X_m$ in <conditional expectation> gives
$$
\mathbb E[X_nX_m]=\mathbb E\!\left[X_m\mathbb E[X_n\mid\mathcal F_m]\right]=\mathbb E[X_m^2].
$$
The pull-out step for the possibly unbounded $X_m$ can be justified by first truncating it, then passing to the limit in the <L2 norm> and using the <Cauchy-Schwarz inequality>. Expanding the square now yields
$$
\boxed{\mathbb E[(X_n-X_m)^2]=\mathbb E[X_n^2]-\mathbb E[X_m^2]\qquad(m\leq n).}
$$
The left side is nonnegative. Thus $a_n=\mathbb E[X_n^2]$ is nondecreasing and bounded above by $M$, and so $a_n\to a\leq M$. For $m\leq n$,
$$
\|X_n-X_m\|_2^2=a_n-a_m\leq a-a_m\longrightarrow0.
$$
By symmetry of the <norm> difference this proves that $(X_n)$ is a <Cauchy sequence> in the <L2 space>. The completeness established in part (a) gives an $X_\infty\in L^2$ with
$$
\boxed{X_n\longrightarrow X_\infty\text{ in }L^2.}
$$
This is the <L2-bounded martingale convergence theorem>, derived from <martingale-difference orthogonality> and completeness. The same sequence also converges <almost surely> by part (b), since $\mathbb E|X_n|\leq\sqrt M$; uniqueness of a limit in <probability> identifies that limit with this $X_\infty$.