Solution (source code)

= Solution

The process $M$ is adapted and integrable. Since $A_{n+1}$ is $\mathcal F_n$-measurable,
$$
\begin{aligned}
\mathbb E[M_{n+1}\mid\mathcal F_n]
&=\mathbb E[V_{n+1}\mid\mathcal F_n]+A_{n+1}\\
&=\mathbb E[V_{n+1}\mid\mathcal F_n]+A_n
+V_n-\mathbb E[V_{n+1}\mid\mathcal F_n]\\
&=V_n+A_n=M_n.
\end{aligned}
$$
\b[Thus $M$ is a martingale. This is the finite-horizon Doob decomposition $V=M-A$.]