Solution (source code)

= Solution

Define
$$
\Delta A_t=U_{t-1}-\mathbb E[U_t\mid\mathcal F_{t-1}],
\qquad
\Delta M_t=U_t-\mathbb E[U_t\mid\mathcal F_{t-1}]
$$
for $t\geq1$, with $A_0=M_0=0$. The supermartingale property makes $\Delta A_t\geq0$, and it is $\mathcal F_{t-1}$-measurable, so $A$ is previsible and nondecreasing. The increments of $M$ have conditional mean zero, so $M$ is a martingale. Finally,
$$
\Delta U_t=\Delta M_t-\Delta A_t,
$$
and summation gives the <Doob decomposition in discrete time>
$$
U_t=U_0+M_t-A_t.
$$