It might be this question was asked before, but I still want to request an answer in measure-theoretic framework.
Let's define a probability space $\{\Omega, \mathcal{F}, \mathbb{P}\}$ and $\sigma$-algebra $\mathcal{G} \subset \mathcal{F}$. Random variables $X$ and $Y$ are independent on $\mathcal{G}$. Is random variable $Z = f(X,Y)$ independent of $\mathcal{G}$ too? If so, how to prove it. What are the constraints on $f$? What does it mean $f$ is a measurable function (two variables are here)?