Does the set of inverse images of a generator of a sigma algebra generate the sigma algebra of inverse images of elements of that sigma algebra? Let $\Omega$ be a set, $(Y,B)$ be a measurable space, $f:\Omega \to Y$ and let $A=\{f^{-1}(b): b \in B\}$. If $\sigma(C)=B$, then is it necessary that $\sigma(D)=A$, where $D=\{f^{-1}(c):c\in C\}$?
The context of the problem:
I have a probability space $(\Omega,F,P)$. The sigma algebra $\sigma(X)$ generated by a random variable $X:\Omega\to \Bbb R$ (i.e. a Borel measurable function $\Omega\to \Bbb R$) is the set $\{X^{-1}(B): B \text{ is a Borel set}\}$. Two random variables $X,Y$ are called independent if $\sigma(X)$ and $\sigma(Y)$ are independent, where $S,S'\subset F$ are independent if $P(A\cap B)=P(A)P(B)$ for all $A\in S$ and $B\in S'$. 
I am trying to prove that two random variables $X,Y$ are independent if and only if for all $a,b\in \Bbb R$, $P(X\le a,Y\le b) = P(X\le a)P(Y\le b)$. I am stuck on the converse. The sets $\{X^{-1}((-\infty,a)): a\in \Bbb R\}$ and $\{Y^{-1}((-\infty,b)): b \in \Bbb R\}$ are $\pi$-systems. If we can prove that they are generators of $\sigma(X)$ and $\sigma (Y)$ (resp.), then we are done because of the following result:
If $S,S'\subset F$ are independent $\pi$-systems, then $\sigma(S)$ and $\sigma(S')$ are also independent.
Thanks for help.
 A: It is a standard excercise to prove the following:

Lemma: If $(\Omega,\mathcal{F})$ and $(\Omega',\mathcal{F}')$ are two measurable spaces and $f:\Omega \to \Omega'$ is a map, then the set
$$\mathcal{G}=\{G\subset \Omega':f^{-1}(G) \in \mathcal{F}\}$$
is a $\sigma$-algebra of $\Omega'$

In your case it's clear that $\sigma(D)\subset A$ since $A$ is a $\sigma$-algebra containing $D$.
For the converse suppose that $A'$ is any $\sigma$-algebra containing $D$. It's enought to show that $A\subset A'$. Now apply above lemma in the setting of $A'=\mathcal{F}$, noticing that $D\subset A'$ implies $C\subset \mathcal{G}$, so...
A: Specifically in your case, if $\mathcal{B}_{\mathbb{R}}$ is generated by $\mathcal{E}$, then $\sigma(X)$ is generated by $\mathcal{N}=\{X^{-1}(E):E\in\mathcal{E}\}$. To see this let $\mathcal{M}=\sigma(\mathcal{N})$. Then $\{E\subset \mathbb{R}:X^{-1}(E)\in \mathcal{M}\}$ is a $\sigma$-algebra containing $\mathcal{E}$. Hence, it contains $\mathcal{B}_{\mathbb{R}}$ and so $\sigma(X)\subseteq\mathcal{M}$ ($\because \sigma(X)$ is the smallest $\sigma$-algebra s.t. $X$ is measurable). On the other hand, any $\sigma$-algebra for which $X$ is measurable must contain the sets of the form $X^{-1}(E)$, where $E\in \mathcal{E}$. Thus, $\mathcal{M}$ is contained in any such $\sigma$-algebra which implies that $\sigma(X)=\mathcal{M}$.

For independence, however, you may use the "direct" definition, i.e. $X$ and $Y$ are independent iff $\forall A,B\in \mathcal{B}_{\mathbb{R}}$,
$$
\mathbb{P}\{X\in A,Y\in B\}=\mathbb{P}\{X\in A\}\mathbb{P}\{Y\in B\}.
$$
