Solution (source code)

= Solution

For an elementary <previsible process> $H=\sum_{j=0}^{r-1}H_j\mathbf1_{(t_j,t_{j+1}]}$, with bounded $\mathcal F_{t_j}$-measurable coefficients, define
$$
(H\cdot M)_t=\sum_j H_j\big(M_{t\wedge t_{j+1}}-M_{t\wedge t_j}\big).
$$
The <Itô isometry> is
$$
\boxed{\mathbb E\big[(H\cdot M)_t^2\big]=\mathbb E\int_0^t H_s^2\,d[M]_s.}
$$
More generally the squared $L^2$ distance between the integrals of $H$ and $K$ is the integral of $(H-K)^2$ on the right. The integral is a zero-starting continuous square-integrable <martingale>.

Elementary <predictable processes> are dense in $L^2(M)$. Given $H$ in this space, choose elementary $H_n$ converging in its norm and define the <Itô integral> by the $L^2$ limit of $H_n\cdot M$. The isometry proves that this is independent of the approximating sequence and remains valid for the limit. The <Doob L2 maximal inequality> bounds the expected squared path supremum of the difference by four times its terminal second moment; hence the convergence also gives a continuous <martingale> version, with <uniform convergence on compacts in probability>.

For a <continuous local martingale> $M$ and <locally bounded process> $H$ that is <previsible>, choose increasing <stopping times> $\tau_n\uparrow\infty$ such that $M^{\tau_n}$ is L2-bounded, $|H|\le K_n$ up to $\tau_n$, and $\tau_n\le n$. This can be done by combining localizers with first exits of $M$ from bounded intervals and the local bounds of $H$. Then $H\mathbf1_{[0,\tau_n]}$ is in the integrand space for $M^{\tau_n}$. Define the integral on each stopped interval by the preceding construction. The stopping property of elementary integrals, extended by the isometry, makes these definitions agree on overlaps. Pasting gives
$$
\boxed{H\cdot M\text{ as a continuous local martingale, defined consistently on all }[0,\tau_n].}
$$
This is a localization construction; global square integrability of the resulting process is not asserted.