closed measurable rectangles generates $\mathscr{B}(\mathbb{R}^2) ? $ Given the following proposition : X,Y random variables are indipendent $\iff$ $\forall \hspace{0.1cm} f,g \in C_b(\mathbb{R})$ it holds that $\mathbb{E}[f(X)g(Y)] = \mathbb{E}[f(X)]\mathbb{E}[g(Y)]$
I think the proof of $[\Rightarrow]$ is using the Fubini-Tonelli theorem properly.
Conversely I'm not sure how to conclude from the followin : Let's take $f_n,g_n \in C_b(\mathbb{R})$ such that $f_n \uparrow I_C,g_n \uparrow I_C'$ pointwise, where $C,C'$ are closed in $\mathbb{R}$, it follows that using monotone convergence
$$\mathbb{P}(X \in C, Y \in C') = \mathbb{E}[I_C I_C'] = \mathbb{E}[\lim\limits_{n \to +\infty}f_n(X)g_n(Y)]$$ $$ = \lim\limits_{n \to +\infty} \mathbb{E}[f_n(X)g_n(Y)] = \lim\limits_{n \to +\infty} \mathbb{E}[f_n(X)] \mathbb{E}[g_n(Y)] = \mathbb{P}(X \in C)\mathbb{P}(Y \in C')$$
Then I'd like to conclude for a criterion of coincidence of measures, but I'm not sure since I'm supposed to affirm that the closed measurable rectangles, i.e. $A \times B : A \in \mathscr{B}(\mathbb{R}), B \in \mathscr{B}(\mathbb{R})$ with $A,B$ closed in $\mathbb{R}$, generate $\mathscr{B}(\mathbb{R}^2)$. Is this true ? If so, there is a nice way to prove it ?
 A: I'll focus on the question if the closed measurable rectangles generate the Borel algebra on $\mathbb{R}^2$. I.e. I will show that
$$\mathcal{C}:=\sigma(\{A \times B\mid A , B \text{ closed subsets of $\mathbb{R}$}\})= \mathcal{B}(\mathbb{R}^2).$$
Note first that if $A$ and $B$ are closed subsets of $\mathbb{R}$, then $A \times B$ is a closed subset of $\mathbb{R}^2$. In particular, $A \times B \in \mathcal{B}(\mathbb{R}^2)$. Hence, $\mathcal{B}(\mathbb{R}^2)$ is a $\sigma$-algebra containing all rectangles of closed sets, so by minimality of $\mathcal{C}$ we get $\mathcal{C}\subseteq \mathcal{B}(\mathbb{R}^2)$.
Conversely, note that every open set in $\mathbb{R}^2$ is the countable union of sets of the form $]a,b[\times ]c,d[$ (these are called open cubes). Any union can be made countable for example by using a density argument. Next, note that $]a,b[ \times ]c,d[$ is in $\mathcal{C}$, since it is the closed cube $[a,b] \times [c,d]$ in which the sides are removed (one can explicitely describe the sides as a finite union of sets of the form $A \times B$ where either $A$ or $B$ is a singelton). It follows that every open set is in $\mathcal{C}$ and thus $\mathcal{B}(\mathbb{R}^2)\subseteq \mathcal{C}$.
