Solution (source code)

= Solution

Assume (i), and let $\tau$ be a <stopping time>. The increments of the <stopped martingale in discrete time>[stopped process] satisfy
$$
M_{(n+1)\wedge\tau}-M_{n\wedge\tau}
=\mathbf1_{\{\tau>n\}}(M_{n+1}-M_n).
$$
Because $\{\tau>n\}\in\mathcal F_n$, taking <conditional expectation> given $\mathcal F_n$ makes the right-hand side zero. Integrability follows from
$$
M_{n\wedge\tau}=M_0+\sum_{k=1}^n\mathbf1_{\{\tau\geq k\}}(M_k-M_{k-1}),
$$
a finite sum of integrable random variables. Hence $M^\tau$ is a martingale, proving (ii).