I consider the set $ I = \left\{ 0,…, N\right\}$ and $X$ a sub martingale on this set. I would like to prove the following inequality for $\lambda>0$
$$ \lambda\mathbb{P}(max(X_0,… X_N)\geq\lambda)\leq\mathbb{E}(X_N 1(max(X_0,…,X_N)\geq\lambda)) $$
My attempt is the following, we introduce the stopping time $\tau=\sup\left\{ n : X_n(\omega)\geq\lambda\right\}$
Then we notice that
$$ \lambda 1(max(X_0,…,X_N)\geq\lambda)\leq X_{\tau} 1(max(X_0,…,X_N)\geq\lambda)\leq\mathbb{E}(X_N | \mathcal{F}_{\tau}) 1(max(X_0,…,X_N)\geq\lambda) $$
To being able to conclude we need to prove that $\left\{max(X_0,…,X_N)\geq\lambda\right\}$ is in $\mathcal{F}_{\tau}$. For a fixed $t$ we get
$$ \left\{\omega : max(X_0,…,X_N)\geq\lambda\right\}\cap\left\{\omega : \tau(\omega)\leq t\right\} = \left\{\omega : \exists n\in [0, N], X_n(\omega) \geq\lambda\right\}\cap\left\{\omega : \tau(\omega)\leq t\right\} = \left\{\omega : \exists n\in [0, t], X_n(\omega) \geq\lambda\right\}\cap\left\{\omega : \tau(\omega)\leq t\right\} = \cup_{n\leq t}\left\{\omega : X_n(\omega) \geq\lambda\right\}\in\mathcal{F}_{t} $$
Thus by taking the expectation we get
$$ \lambda \mathbb{P}(max(X_0,…,X_N)\geq\lambda)\leq \mathbb{E}( X_N 1 (max(X_0,…,X_N)\geq\lambda)) $$
Is this seems correct please ? And also, is there a way to extend this on a martingale defined on all integer or even in $[0,\infty)$ ?
Thank you a lot