Solution (source code)

= Solution

For a bounded <stopping time> $T\leq N$, write
$$
\widehat M_T=\widehat M_0+\sum_{n=1}^N1_{\{T\geq n\}}(\widehat M_n-\widehat M_{n-1}).
$$
The indicator is measurable at time $n-1$. Taking conditional expectations term by term and using the <supermartingale> inequality gives $\mathbb E\widehat M_T\leq\mathbb E\widehat M_0$. The same calculation gives equality for the <martingale> $M$. Since their initial values agree, $\mathbb E M_T\geq\mathbb E\widehat M_T$.