Bayes formula on a general $\sigma$-algebra I want to prove the following Bayes formula:
Let $\Omega$ be a sample space, $\mathbb A$ a $\sigma$-algebra over $\Omega$ and $\mathbb B$ $\sigma$-algebra of $\mathbb A$. For $A\in\mathbb A$ and $B\in\mathbb B$ show that: 
$$\mathbb P(B|A)=\frac{\int_B{\mathbb P(A|\mathbb B)d\mathbb P}}{\int{\mathbb P(A|\mathbb B)d\mathbb P}}$$
I don't know where to start from, cause I was used on working with the conditional expectation given a $\sigma$-algebra generated by a partition of $\Omega$ but now it's diffrent, the $\sigma$-algebra here is in general. If you have any idea ot hint I'll be grateful! Thank you for your time.
 A: Recall that $\mathbb{P}(A|\mathbb{B}) = \mathbb{E}[1_{A} | \mathbb{B}]$ and that $\int_B X d\mathbb{P}$ is just $\mathbb{E}[X1_B]$. Rearranging your statement, it says
$$\mathbb{P}[B| A] = \frac{\mathbb{E}[\mathbb{E}[1_A | \mathbb{B}]1_B]}{\mathbb{E}[\mathbb{E}[1_A|\mathbb{B}]]}.$$
Since $\mathbb{E}[\mathbb{E}[1_A|\mathbb{B}]]=\mathbb{E}[1_A] = \mathbb{P}(A)$ we better consider only the case $\mathbb{P}(A)>0$. If $\mathbb{P}(A) = 0$ then the left side is undefined, and both the numerator and denominator on the right are $0$. 
Now 
$$
\frac{\mathbb{E}[\mathbb{E}[1_A | \mathbb{B}]1_B]}{\mathbb{E}[\mathbb{E}[1_A|\mathbb{B}]]}
=\frac{\mathbb{E}[\mathbb{E}[1_A1_B | \mathbb{B}]]}{\mathbb{P}(A)}
=\frac{\mathbb{E}[1_{A\cap B} ]}{\mathbb{P}(A)}
=\frac{\mathbb{P}(A\cap B)}{\mathbb{P}(A)}
= \mathbb{P}(B|A)
$$
Now the right hand side is the usual elementary definition of $\mathbb{P}(B|A)$. Note that this is not the same as the measure theoretic $\mathbb{P}(B|\sigma(A)) =1_B$, where here we used that $B \in \mathbb{B}$ implies $B \in \mathbb{A}$.
