Mutual conditional expectation rigidity in L2 (source code)

= Mutual conditional expectation rigidity in L2
{title2=$\mathbb E[A\mid\mathcal H]=B,\ \mathbb E[B\mid\mathcal G]=A\Longrightarrow A=B\text{ a.s.}$}

Let $A,B$ belong to <L2 space>, and suppose $B=\mathbb E[A\mid\mathcal H]$ and $A=\mathbb E[B\mid\mathcal G]$ <almost surely>, for two possibly nonnested <sigma-algebras>. Then $A=B$ <almost surely>. No <independence> or inclusion between the <sigma-algebras> is required.

The identities supply $\mathcal H$-<measurable> and $\mathcal G$-<measurable> versions of $B$ and $A$. The <measurable-factor rule for conditional expectation> and <Cauchy-Schwarz inequality> give
$$
\mathbb E[AB]=\mathbb E[B^2]=\mathbb E[A^2].
$$
Expanding the square shows $\mathbb E[(A-B)^2]=0$, and hence the required <almost sure equality>. Equivalently, each <conditional expectation> is an <orthogonal projection> in <L2 space>, and the two projection identities force equality in the <equality case for conditional second moments>.

Equality after applying a <function> need not identify its original input. For instance, on four equally likely outcomes let $X$ take $-2,-1,1,2$ and set $Y=-X$. Their squares are the same nonconstant <random variable>, even though $X$ and $Y$ differ everywhere. Injectivity of the <function> would rule out this loss of information.