= Solution
Write $Y=\mathbb E[X\mid\mathcal G]$. The <conditional expectation> is an $L^2$ contraction by the <conditional Jensen inequality>, so $X,Y$ are square-integrable. The defining integral identity for <conditional expectation>, first with bounded <measurable> truncations of $Y$ and then with their $L^2$ limit, gives
$$
\mathbb E[XY]=\mathbb E[Y\mathbb E[X\mid\mathcal G]]=\mathbb E[Y^2].
$$
For clarity, if $Y^{(K)}=\max(-K,\min(Y,K))$, then $\mathbb E[XY^{(K)}]=\mathbb E[YY^{(K)}]$, and the <Cauchy-Schwarz inequality> permits the limit $K\to\infty$. Expanding the square now proves the <equality case for conditional second moments>:
$$
\mathbb E[(X-Y)^2]=\mathbb E[X^2]-\mathbb E[Y^2]=0.
$$
A nonnegative <random variable> of zero <expected value> vanishes <almost surely>. Therefore $\boxed{X=Y\text{ almost surely}.}$
Back to article page