Stopped-walk martingale with almost sure but not L1 convergence (source code)

= Stopped-walk martingale with almost sure but not L1 convergence
{title2=$M_n=1-S_{n\wedge T_1}$}

For a <simple symmetric random walk>, the <infinite mean first passage of a simple symmetric random walk> gives a finite almost sure first passage $T_1$ to $1$. The <stopped martingale> $M_n=1-S_{n\wedge T_1}$ is nonnegative and eventually zero almost surely. Nevertheless $\mathbb EM_n=1$ for every $n$, so it has <almost sure convergence> but no <convergence in L1>. It is therefore not <uniformly integrable>. Before absorption the nearest-neighbour walk is at most zero, ensuring nonnegativity.