Solution (source code)

= Solution

Work from time one; a finite initial prefix does not affect convergence. Fix a positive integer $a$, and use the <stopping time> $\tau_a$ and budget $A_n$ from part (b). Define
$$
Z_n^{(a)}=X_{n\wedge\tau_a}+a-U_{n\wedge\tau_a}.
$$
It is nonnegative. For each finite $n$, the stopped variable $X_{n\wedge\tau_a}$ is <integrable>: it is bounded by the finite sum $X_1+\cdots+X_n$, and the budget is bounded by $a$.

The stopped increment of $X$ is
$$
X_{(n+1)\wedge\tau_a}-X_{n\wedge\tau_a}
=\mathbf1_{\{\tau_a>n\}}(X_{n+1}-X_n).
$$
Taking <conditional expectations>, the assumed drift bound gives
$$
\mathbb E[X_{(n+1)\wedge\tau_a}\mid\mathcal F_n]
\leq X_{n\wedge\tau_a}+Y_n\mathbf1_{\{\tau_a>n\}}.
$$
The last term is bounded by $a$; no integrability assumption on the unlocalized $Y_n$ has been used. Its contribution is exactly cancelled by the budget decrement from part (b), giving
$$
\mathbb E[Z_{n+1}^{(a)}\mid\mathcal F_n]\leq Z_n^{(a)}.
$$
Thus $Z^{(a)}$ is an <integrable> nonnegative <supermartingale>. By the <almost sure supermartingale convergence theorem> it has a finite almost-sure limit. The bounded decreasing budget $A_n$ has a finite pathwise limit as well, so $X_{n\wedge\tau_a}=Z_n^{(a)}-A_n$ converges to a finite limit <almost surely>.

Take the intersection of these probability-one convergence events over all positive integers $a$. On the further probability-one event $\sum_{j\geq1}Y_j<\infty$, choose an integer $a$ strictly larger than that total. Then $\tau_a=\infty$, so the stopped sequence is the original one. Consequently
$$
\boxed{X_n\text{ converges almost surely to a finite limit}.}
$$
This proves <supermartingale convergence with summable adapted drift> under almost-sure summability alone; it does not require $\mathbb E\sum_jY_j<\infty$.