# Conditional Independence and product of random variables

I am stuck at the following situation:

Let random variables $$Y, X, W_1, W_2$$. I know that $$W_1$$ and $$W_2$$ are each independent from $$Y$$ conditional on $$X$$:

$$p\left(Y\mid \{X,W_1\}\right) = p\left(Y\mid X\right),\;\;\; p\left(Y\mid \{X,W_2\}\right) = p\left(Y\mid X\right) \tag{1}$$

Now consider the product random variable $$Z = W_1W_2$$. I have to determine whether I can say that

$$p\left(Y\mid \{X,Z\}\right) = p\left(Y\mid X\right) \tag{2}$$

i.e. that $$Z$$ is also independent from $$Y$$ conditional on $$X$$ given only the previous property, or whether I need more conditions to hold. Informally it appears that $$(2)$$ holds too, but with conditional probability, intuition is often misleading, and I have failed in all my attempts to arrive at $$(2)$$ starting from or using $$(1)$$.

Any ideas?

In general if random variables $$Y$$ and $$W$$ are independent, then (for any function $$f$$), $$Y$$ and $$f(W)$$ are independent as well. You should think about why this is true if you are not certain.
If you are able to prove the above, then you can then prove the more general claim that if $$Y$$ and $$W$$ are conditionally independent given $$X$$, then $$Y$$ and $$f(W)$$ are also conditionally independent given $$X$$. The proof will be the same as whatever you have above, except every probability you consider is conditional on $$X$$.
One last point: it might be easier to use the $$p(Y,W_1 \mid X) = p(Y \mid X) p(W_1 \mid X)$$ definition of conditional independence instead of $$p(Y \mid X,W_1) = p(Y \mid X)$$ definition, although they are equivalent.