Definition.
$\mathcal{F}_{\tau}=\{F\subset \Omega:\; \forall n \in N \cup \{\infty\},\; F\cap(\tau\leq n)\in \mathcal{F}_{n}$} is a sigma-algebra.
Definition.
$\forall \omega \in \Omega:\; M_{n}^{\tau}(\omega) \;=\; M_{\min(\tau(\omega), n)}(\omega).$
Question.
Prove that this collection of functions is also a martingale with respect to the given filtration.
(First try to prove that the following is true: $\,M_{n}^{\tau} \;=\; M_{n-1}^{\tau}+1_{\tau \le n}(M_{n}-M_{n-1}).\,$)
My Attempt.
First of all, I am not able to prove that $M_{n}^{\tau}=M_{n-1}^{\tau}+1_{\tau \le n}(M_{n}-M_{n-1})$. It would be great if someone could help me with that!
Secondly, if I assume that the hinted expression for $M_{n}^{\tau}$ is correct, I continued as follows:
We want to show that $E(M_{n}^{\tau}\mid \mathcal{F}_{n-1})=M_{n-1}^{\tau}$.
By assumption (now)
$$E(M_{n}^{\tau}\mid \mathcal{F}_{n-1}) \\=\, E\left(M_{n-1}^{\tau}+1_{\tau \leq n}(M_{n}-M_{n-1})\mid \mathcal{F}_{n-1}\right) \\=\, M_{n-1}^{\tau}+E\big(1_{\tau \leq n}(M_{n}-M_{n-1})\mid \mathcal{F}_{n-1}\big) \\=^{?}\, M_{n-1}^{\tau}.$$
Can someone help me to continue and complete this proof?
The hint is to prove the identity $M_{n}^{\tau}=M_{n-1}^{\tau}+1_{\tau \geqslant n}(M_{n}-M_{n-1})$ (check this when $\tau\geqslant n$ and when $\tau\leqslant n-1$), not that $M_{n}^{\tau}=M_{n-1}^{\tau}+1_{\tau \leqslant n}(M_{n}-M_{n-1})$.
Then, following your path, one is left with showing that $E(1_{\tau \geqslant n}(M_{n}-M_{n-1})|\mathcal F_{n-1})=0$. But this is clear because $1_{\tau \geqslant n}=1-1_{\tau \leqslant n-1}$ and $M_{n-1}$ are $\mathcal F_{n-1}$-measurable while $E(M_{n}|\mathcal F_{n-1})=M_{n-1}$.