Let's say we have two random variables $Z \in \mathcal{Z}$ and $X \in \mathcal{X}$ with joint density $p_{Z,X}(z,x)$ with respect to a base measure. The density is assumed to factor as $$ p_{Z,X}(z,x) = p_Z(z) p_{X|Z}(x|z),$$ where $p_Z$ is the marginal density of $Z$ and $p_{X|Z}$ the conditional density of $X|Z$. Let us also denote $p_X$ the density of $X$.
Now, let's say we are interested in computing the distribution of $X | X \in A$ , where $A \subset \mathcal{X}$. There are two ways of computing its density that may both sound reasonable: $$ p_1(x) = \int_{Z} p_Z(z | X \in A) p_{X|Z}(x|z, X \in A) dz$$ and $$ p_2(x) = \int_{Z} p_Z(z ) p_{X|Z}(x|z, X \in A) dz$$
Are they equivalent ? Is there a counter-example that shows they are not?
On the one hand, $p_1$ seems more correct but it may not be necessary to filter out twice the points that are not in $A$.