$X$ nonnegative martingale, $X_{n}$ converges to $0$ almost surely, $ Y =\sup X_{n} $. Show that for all $x> 0$, $P(Y\ge x|F_{0})=\min(1,X_{0}/x)$\
I am following the solution provided in this link Prove $\mathbb{P}(\sup_{t \geq 0} M_t > x \mid \mathcal{F}_0)= 1 \wedge \frac{M_0}{x}$ for a martingale $(M_t)_{t \geq 0}$, where at some point they write:
$$M_{\tau_k} = \begin{cases} x 1_{\{\tau<k\}} + M_{k} 1_{\{\tau \geq k\}}, & M_0 \leq x, \\ M_0, & M_0>x \end{cases}$$
However, I cannot understand why the equality is fulfilled in the case where $M_{0}\le x$. It is the only incongruity in my reasoning, I would greatly appreciate some clue to understand equality. Thanks