Let
- $(\Omega,\mathcal A,\operatorname P)$ be a probability space
- $(\mathcal F_t)_{t\ge0}$ be a filtration of $\mathcal A$
- $\tau_n:\Omega\to[0,\infty]$ be an $\mathcal F$-stopping time with $$\tau_n\le\tau_{n+1}\tag1$$ for all $n\in\mathbb N_0$ and $$\tau_n\xrightarrow{n\to\infty}\infty\tag2$$
- $X_n:\Omega\to\mathbb R$ be $\mathcal F_{\tau_{n-1}}$-measurable for all $n\in\mathbb N$
Note that $$N_t:=\inf\left\{n\in\mathbb N_0:\tau_n\ge t\right\}\;\;\;\text{for }t\ge0$$ takes values in $[0,\infty)$ and hence $$\Phi_t:=\sum_{n\in\mathbb N}1_{\left\{\:\tau_{n-1}\:<\:t\:\right\}}X_n=\sum_{n=1}^{N_t}X_n\;\;\;\text{for all }t\ge0\tag3$$ is well-defined. Let $W:\Omega\times[0,\infty)\to\mathbb R$ be a stochastic process on $(\Omega,\mathcal A,\operatorname P)$ and$^1$ $$(\Phi\cdot W)_t:=\sum_{n\in\mathbb N}X_n\left(W_t-W^{\tau_{n-1}}_t\right)=\sum_{n=1}^{N_t}X_n\left(W_t-W_{\tau_{n-1}}\right)\;\;\;\text{for }t\ge0\;.\tag4$$
I want to show that if $|\Phi|\le 1$ and $W$ is a continuous square-integrable $\mathcal F$-martingale with $W_0=0$, then $\Phi\cdot W$ is a square-integrable $\mathcal F$-martingale too and $$\operatorname E\left[\left|\left(\Phi\cdot W\right)_t\right|^2\right]\le\operatorname E\left[\left|W_t\right|^2\right]\;.\tag5$$ How can we do that?
$^1$ As usual, $$W^{\tau_{n-1}}_t:=W_{\tau_{n-1}\:\wedge\:t}\;.$$
The fact that $\Phi \cdot W$ is a square-integrable martingale is a standard property of the stochastic integral, since $\Phi$ is adapted and square-integrable. See for instance section 3.2B in Karatzas and Shreve.
For the desired estimate, let $\langle W \rangle_t$ be the quadratic variation of $W$. The Itô isometry in this setting says that for any adapted square-integrable process $\Psi$ we have $E[(\Psi \cdot W)_t^2] = E \int_0^t \Psi_s^2\,d\langle W \rangle_s$ (see K&S (3.2.23) with $X=Y=\Psi$, $s=0$). Applying this with $\Psi = \Phi$ and $\Psi = 1$ we have $$E[(\Phi \cdot W)_t^2] = E \int_0^t \Phi^2 \,d\langle W \rangle_t \le E \int_0^t 1 \,d\langle W \rangle_t = E[W_t^2]$$ where the inequality in the middle follows since $|\Phi| \le 1$ and the quadratic variation is an increasing process of bounded variation, so integrating with respect to it preserves ordering. (If you like, it's a Stieltjes integral, or a Lebesgue integral with respect to a positive measure.)