If $X$ is some $\mathcal F$-measurable random variable, and we have two sigma algebras $\mathcal A$ and $\mathcal B$ that satisfy $\mathcal A \subset \mathcal F$ and $\mathcal B \subset \mathcal F$, and that $\int_A X dP = 0$ for all $A\in \mathcal A$ and for all $B\in \mathcal B$, it it true that $\int_D X d P = 0$ for all $D\in \sigma[\mathcal A \cup \mathcal B]$?
This kind of reminded me of Caratheodory's Extension Theorem extending a pre-measure on some collection of sets to an actual measure on the $\sigma$-algebra generated by that collection. I was thinking we could make some measure $\mu(D)$ defined by these integrals, that would extend to be $0$ on the $\sigma$-field. However, I don't think $\mu=0$ would have any impact on the original integral being $0$, right?
This is something that came up when I was trying to prove that $\int_D (X-Y) d P = 0$ for all $D \in \mathcal F(X-Y) := (X-Y)^{-1}(\mathcal B)$ if we are given that $\int_D (X-Y) d P = 0$ for all $D \in \mathcal F(X) \cup \mathcal F(Y)$. Intuitively this seems true, and I've tried to come up with counterexamples with no avail. So, I conjectured the above question. More generally, is it true if the integrals are 0 on all sets in $\cal A_1, \cal A_2, \ldots, \cal A_n$, it's also zero on the $\sigma$-algebra containing these sub-$\sigma$-fields?