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}$

Let $M$ be a positive, continuous martingale that converges a.s. to zero as $t$
tends to infinity. I now want to prove that for every $x>0$
$$ P\left( \sup_{t \geq 0 } M_t > x \mid \mathcal{F}_0 \right) = 1 \wedge \frac{M_0}{x}. $$
My approach:
I thought that rewriting the conditional probability to an expectation would help so we obtain that we must prove:
$$ \mathbb{E} \left[ 1_{\sup_{t \geq 0 } M_t > x} \mid \mathcal{F}_0 \right] = 1 \wedge \frac{M_0}{x}.$$
A hint to me was given that I should consider stopping the process when it gets above $x$. Thus a stopping time that would do this is $\tau = \inf\{t\geq 0 : M_t>x\}$. But now I’m stuck as I want to apply optional sampling results but we have an indicator which complicates things. How could I proceed from this? Any help is appreciated!

Solutions Collecting From Web of "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}$"

For fixed $k \in \mathbb{N}$ define a bounded stopping time $\tau_k$ by

$$\tau_k := \inf\{t \geq 0; M_t > x \} \wedge k = \tau \wedge k.$$

Then, by the optional stopping theorem, we have

$$\mathbb{E}(M_{\tau_k} \mid \mathcal{F}_0) = M_0. \tag{1}$$

On the other hand, since $(M_t)_{t \geq 0}$ is a continuous martingale, we know that

$$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}. \tag{2}$$

Combining $(1)$ and $(2)$ yields

$$M_0 1_{\{M_0>x\}} + 1_{\{M_0 \leq x\}} x \mathbb{P}(\tau < k \mid \mathcal{F}_0) + \mathbb{E}(M_k 1_{\{\tau \geq k\}} \mid \mathcal{F}_0) = M_0.$$

Finally, the claim follows by letting $k \to \infty$. (For the second term use monotone convergence, for the third one dominated convergence and the fact that $M_k \to 0$ as $k \to \infty$.)