Let $X,Y,Z$ be integrable random variables on the same probability space.
If $X$ is independent of $Y$ conditionally on $Z$, i.e, $X|Z$ is independent of $Y|Z$, we know that for a measurable function $f$, we also have $f(X)|Z$ is independent of $f(Y)|Z$.
Under what extra conditions do we have $f(X)|f(Z)$ is independent of $f(Y)|f(Z)$ ?
I imagine that it holds if $f$ is injective since $\sigma(Z)=\sigma(f(Z))$ in that case. Is there a sufficient weaker condition that exploits the fact that we apply $f$ to all the random variables?
EDIT 4: Let $W$ be another integrable random variable on the same probability space. I am particularly interested in the case $E[W|X]$ is conditionally independent of $E[W|Y]$ given $E[W|Z]$. So $f$ would be the conditional expectation here. I am hoping whatever conditions we find on $f$ would translate into conditions on $W$ so that $E[W|X]$ is conditionally independent of $E[W|Y]$ given $E[W|Z]$ holds when $X$ is conditionally independent of $Y$ given $Z$.
See my other related questions: When is $\sigma(E[X|\mathcal F]) \subset \sigma(E[Y|\mathcal F])$? and A martingale and mesurability problem
EDIT 3: What follows is false (thanks to Nate's comments and to question Is "conditional independence" of $\sigma$-algebras implied by "set-wise conditional independence" of $\sigma$-algebras?) and is not worth reading. The reader can focus on the above.
EDIT 1: $X$ is independent of $Y$ conditionally on $Z$ iff for all $A \in \sigma(X), B\in \sigma(Y), C \in \sigma(Z)$, $P(A\cap B | C)= P(A|C) P(B|C)$. [NOTE: THIS IS FALSE, the LHS is actually stronger than the RHS, see https://math.stackexchange.com/questions/3410023/is-conditional-independence-of-sigma-algebras-implied-by-set-wise-conditio?noredirect=1&lq=1 ] And $f$ is mesurable, $\sigma(f(\cdot)) \subseteq \sigma(\cdot)$.
Hence, for all $A \in \sigma(f(X)), B\in \sigma(f(Y)), C \in \sigma(f(Z))$, $P(A\cap B | C)= P(A|C) P(B|C)$. So $f(X)|f(Z)$ is independent of $f(Y)|f(Z)$. Can someone confirm ?
EDIT 2: I think the above equivalence is wrong [Yes, it was, see the above link]. The correct one should be $X$ is independent of $Y$ conditionally on $Z$ iff for all $A \in \sigma(X), B\in \sigma(Y), \exists C \in \sigma(Z)$ such that $P(A\cap B | C)= P(A|C) P(B|C)$. [NOTE: THIS IS ALSO FALSE, see Nate's comment below]
So what needs to be shown is that if $A \in \sigma(f(X)), B\in \sigma(f(Y))$, there is a $C$ in $\sigma(f(Z))$ such that $P(A\cap B | C)= P(A|C) P(B|C)$.