# Can we show that $1_A\text E[X\mid\mathcal F]=1_AY\Leftrightarrow\forall F\in\mathcal F:\text E[1_A1_FX]=\text E[1_A1_FY]?$

Let

• $$(\Omega,\mathcal A,\operatorname P)$$ be a probability space
• $$\mathcal F\subseteq\mathcal A$$ be a $$\sigma$$-algebra on $$\Omega$$
• $$X\in\mathcal L^1(\operatorname P)$$
• $$A\in\mathcal A$$
• $$Y:\Omega\to\mathbb R$$ be $$\mathcal A$$-measurable with $$\operatorname E\left[1_A|Y|\right]<\infty$$

Are we able to show that $$1_A\operatorname E\left[X\mid\mathcal F\right]=1_AY\text{ almost surely}\Leftrightarrow\forall F\in\mathcal F:\operatorname E\left[1_A1_FX\right]=\operatorname E\left[1_A1_FY\right]\tag1?$$

I'm especially unsure whether we need to impose any stronger measurability assumption on $$Y$$ and how $$(1)$$ is related to $$\operatorname E\left[\left.X\right|_A\mid\left.\mathcal F\right|_A\right]=\left.Y\right|_A\;\left.\operatorname P\right|_A\text{-almost surely}\Leftrightarrow\left.Y\right|_A=\left.\operatorname E\left[X\mid\mathcal F\right]\right|_A\;\left.\operatorname P\right|_A\text{-almost surely}\tag2.$$

In order to prove "$$\Rightarrow$$" in $$(1)$$ we obviously need to use that, by definition, $$\forall F\in\mathcal F:\operatorname E\left[1_FX\right]=\operatorname E\left[1_A\operatorname E\left[X\mid\mathcal F\right]\right]$$ (it would be clear, if $$A\in\mathcal F$$; do we need this?). And for "$$\Leftarrow$$" we somehow to argue with measure uniqueness. But I struggle to fill out the details in both directions.

In general, (1) fails: let $$\mathcal F$$ be the $$\sigma$$-algebra containing $$\emptyset$$ and $$\Omega$$. Then (1) reads $$1_A\operatorname E\left[X \right]=1_AY\text{ almost surely}\Leftrightarrow \operatorname E\left[1_A X\right]=\operatorname E\left[1_A Y\right],$$ which is not true if $$A=\Omega$$, $$X$$ and $$Y$$ have the same expectation but $$Y$$ is not almost surely constant.