Doob-like equality with conditional expectation Suppose $X_t$ is a positive, continuous martingale w.r.t. a filtration $\mathcal{F}_t$ such that $X_t \to 0$ a.s. when $t \to \infty$. Given $X^* = \sup_{t \in \mathbb{R}^+} X_t$, I want to prove that, for a given $x \in \mathbb{R}^+$
\begin{equation*}
\mathbb{P}(X* \geq x \mid \mathcal{F}_0) = 1 \land \frac{X_0}{x}
\end{equation*}
Where $a \land b = \min{(a,b)}$
This is very similar to the Doob martingale inequality, and, to get rid of the conditional expectation, I have tried to work with the sequence $I_{B} X_n$ with $B \in \mathcal{F}_0$ and prove it like Rosenthal;s A First Look at Rigorous Probability Theory proof of Doob's inequality (Theorem 14.3.1):
Let $A_k = \{ X_k \geq x , X_i < x \;, \; \forall \; 0< i <j\}$. Note that $A_i \cap A_j = \emptyset$ . So
$$ A = \bigcup_{k=0}^\infty A_k = \{ X* \geq x\}$$
Then
\begin{split}
x \; \mathbb{P}(A\mid B) &= x \sum_{k=0}^\infty \mathbb{E}[{I_A I_B}] \\
&=  \sum_{k=0}^\infty \mathbb{E}[x {I_A I_B}] \\
\end{split}
But I keep stuck there. ¿Is this the right path?
 A: Disclaimer: This is only an incomplete answer.
If $x\leq X_0$ the result is immediate. Now, let $x>X_0\geq 0$ and $\tau_x:=\inf\left\{n\in\mathbb{N}: X_n\geq x\right\}$. For all $k\geq 0$, the stopped process $\left(X_{n\land k \land \tau_x}\right)_{n\geq 0}$ is a bounded martingale, so the optional stopping theorem implies
$$\forall k,n\in\mathbb{N} : \quad \mathbb{E}X_{n\land k\land \tau_x}=\mathbb{E}X_0=X_0$$
Applying the dominated convergence theorem:
$$\lim_{n\uparrow\infty}\mathbb{E}X_{n\land k\land\tau_x}=\mathbb{E}\lim_{n\uparrow\infty}X_{n\land k\land\tau_x}=\mathbb{E}\left[\mathbf{1}_{\left\{\tau_x>k\right\}}X_k\right]+\mathbb{E}\left[\mathbf{1}_{\left\{\tau_x\leq k\right\}}X_{\tau_x}\right]$$
Letting $k\uparrow\infty$ we have by a combination of the monotone convergence theorem and the dominated convergence theorem
$$\mathbb{E}\left[\mathbf{1}_{\left\{\tau_x<\infty\right\}}X_{\tau_x}\right]=X_0$$
This shows that $\mathbb{P}(X^\star\geq x)\leq X_0/x$. For the other inequality, I think that we would need some continuity argument...
