Q:

Is a function of two independent variables still independent?

Let a sigma-algebra $\mathcal{F}$ be given, and two random variables $X,Y$ independent of $\mathcal{F}$.
Is it possible to conclude that for any measurable function $f$, then $f(X,Y)$ is still independent of $\mathcal{F}$?
Since $\sigma(f(X,Y)) \subset \sigma\left(\sigma(X)\cup\sigma(Y)\right)$, I have tried to show that, $\sigma\left(\sigma(X)\cup\sigma(Y)\right)$ is independent of $\mathcal{F}$, but with no success. It seems I need also a condition on the intersection algebra $\sigma(X)\cap\sigma(Y)$.
Thanks!

A:

If $(X,Y)$ is independent of $\mathcal F$, then $f(X,Y)$ is independent of $\mathcal F$. On the other hand, if one assumes only that $X$ is independent of $\mathcal F$ and that $Y$ is independent of $\mathcal F$, then indeed $f(X,Y)$ and $\mathcal F$ may not be independent.
Counterexample: $X$ and $Y$ i.i.d. Bernoulli random variables with weights $\frac12$ on $+1$ and on $-1$, and $\mathcal F=\sigma(XY)$. Then $X$ is independent of $\mathcal F$ and $Y$ is independent of $\mathcal F$ but, obviously,  $XY$ is not independent of $\mathcal F$.

