conditional expectation given a sigma algebra (implication proof)

40 Views Asked by At

Why is this implication true?

$\forall B \in \mathcal G$ $EX1_B=EY1_B \implies Y=E[X\mid\mathcal G]$
where $\mathcal G$ is a sigma algebra?