We let $X_n$ and $Y_n$ be positive and integrable and adapted to $\mathcal{F}_n$, and assume that $$E(X_{n+1}|\mathcal{F}_n)\leq(1+Y_n)X_n$$ with $\sum Y_n<\infty$. I want to show that $X_n$ converges almost surely to a limit.
I think this can be done by finding a supermartingale that is related to this and to which I can apply theorem 5.2.9 in the book, that says that "if $Z_n$ is a supermartingale then as $n\to\infty$, $Z_n\to Z$ almost surely and $EZ\leq EZ_0$."
I am having trouble with choosing a supermartingale that will work here. Does it suffice to say that since $Y_n$ and $X_n$ are both positive, $$E(X_{n+1}|\mathcal{F}_n)\leq(1+Y_n)X_n \leq X_n + X_nY_n\leq X_n$$ so $X_n$ is a supermartingale?
Hints:
Define $$Z_n := \prod_{i=1}^n (1+Y_i).$$ Show that $(X_n/Z_{n-1})_{n \in \mathbb{N}}$ is a supermartingale w.r.t. the filtration $(\mathcal{F}_n)_{n \in \mathbb{N}}$.
Deduce from the (super)martingale convergence theorem that $X_n/Z_{n-1}$ converges almost surely.