Solution (source code)

= Solution

Put $Z_n=\mathbb E[X_\infty\mid\mathcal F_n]$. It is a <conditional-expectation martingale>. We justify why its limit is $X_\infty$, rather than just quoting convergence to an unspecified random variable.

First the family is <uniformly integrable>. For $A=\{Z_n>K\}\in\mathcal F_n$, nonnegativity and the <conditional expectation> identity give
$$
\begin{aligned}
\mathbb E[Z_n\mathbf1_A]
&=\mathbb E[X_\infty\mathbf1_A]\\
&\leq\mathbb E[X_\infty\mathbf1_{\{X_\infty>K/2\}}]+\frac K2\mathbb P(A)
\leq\mathbb E[X_\infty\mathbf1_{\{X_\infty>K/2\}}]+\frac12\mathbb E[Z_n\mathbf1_A].
\end{aligned}
$$
Thus its tail <expectations> are at most twice the integrable tail of $X_\infty$, uniformly in $n$. The <uniformly integrable martingale convergence theorem> gives a limit $Z$ almost surely and in $L^1$. For any $A\in\mathcal F_m$ and $n\geq m$,
$$
\mathbb E[Z_n\mathbf1_A]=\mathbb E[X_\infty\mathbf1_A].
$$
Pass to the $L^1$ limit and extend from $\mathcal A$ to all Borel sets by the <Monotone class theorem>. The equality of these integrals forces $Z=X_\infty$ almost surely. Combining this with the preceding convergence of $X_n$ proves
$$
\boxed{Y_n=X_n-Z_n\longrightarrow0\quad\lambda\text{-almost surely}.}
$$