function over independent random variables this is my first post here in math.stackexchange. I have this problem and really no good idea:

$ X_1 ,...,X_n :\Omega \rightarrow \mathbb{R} $ are independent random variables, $m \in \{1,...,n-1\}$ and $f: \mathbb{R}^m \rightarrow \mathbb{R}, g: \mathbb{R}^{(n-m)} \rightarrow \mathbb{R}$. Show that $f(X_1,...,X_m)$ and $g(X_{m+1},...,X_n)$ are independent. 

for understanding: f and g are meant as random variables themselves, defined as following: $f(X_1,...,X_m)(\omega)=f((X_1(\omega),...,X_m(\omega)))$

Thank you for your help, 

EDIT: corrected it, thanks:)
For Borel sets $E$ and $F$ in $\mathbb R^{m}$ and $\mathbb R^{n-m}$ respectively consider the property $$P((X_1,X_2,...,X_m)^{-1}(E) \cap (X_{m+1},X_{m+2},...,X_n)^{-1}(F))=P((X_1,X_2,...,X_m)^{-1}(E) P(X_{m+1},X_{m+2},...,X_n)^{-1}(F)$$

First take $F$ to be a measurable rectanagle $F_{m+1}\times F_{m+2}\times ... \times F_n$ where $F_i$'s are Borel sets in $\mathbb R$. Verify that the collection of all Borel sets $E$ in $\mathbb R^{m}$ for which above equation holds is a monotone class containing finite unions of measurable rectangles. [This is where independence is used].  Use monotone class theorem to conclude that the equation holds for all Borel sets $E$ in $\mathbb R^{m}$. Now repeat the argument for $F$: consider the collection of all $F$ for which the equation holds and apply monotone class theorem again. We have proved that $P(U^{-1}(E)\cap V^{-1}(F)=P(U^{-1}(A))P(V^{-1}(B))$ for all Borel sets  $A$ and $B$ in $\mathbb R$ where $U=f(X_1,X_2,...,x_m)$ and $V=g(X_{M+1},X_{m+1},..,X_n)$. [I have used the fact $f^{-1}(A)$ and $g^{-1}(B)$ are Borel sets in $\mathbb R^{m}$ and $\mathbb R^{n-m}$ respectively].
For Borel sets $E$ and $F$ in $\mathbb R^{m}$ and $\mathbb R^{n-m}$ respectively consider the property $$P((X_1,X_2,...,X_m)^{-1}(E) \cap (X_{m+1},X_{m+2},...,X_n)^{-1}(F))=P((X_1,X_2,...,X_m)^{-1}(E) P(X_{m+1},X_{m+2},...,X_n)^{-1}(F)$$

First take $F$ to be a measurable rectanagle $F_{m+1}\times F_{m+2}\times ... \times F_n$ where $F_i$'s are Borel sets in $\mathbb R$. Verify that the collection of all Borel sets $E$ in $\mathbb R^{m}$ for which above equation holds is a monotone class containing finite unions of measurable rectangles. [This is where independence is used].  Use monotone class theorem to conclude that the equation holds for all Borel sets $E$ in $\mathbb R^{m}$. Now repeat the argument for $F$: consider the collection of all $F$ for which the equation holds and apply monotone class theorem again. We have proved that $P(U^{-1}(E)\cap V^{-1}(F)=P(U^{-1}(A))P(V^{-1}(B))$ for all Borel sets  $A$ and $B$ in $\mathbb R$ where $U=f(X_1,X_2,...,x_m)$ and $V=g(X_{M+1},X_{m+1},..,X_n)$. [I have used the fact $f^{-1}(A)$ and $g^{-1}(B)$ are Borel sets in $\mathbb R^{m}$ and $\mathbb R^{n-m}$ respectively].