I'm trying to show that $L_2(\Omega, \sigma(X), \mathbb R)$ is equal to $\Lambda$ which is the set containing all random variables in $L_2(\Omega, \mathcal F, \mathbb R)$ that can be written as $f(X)$ for some Borel function $f:\mathbb R \to \mathbb R$. In doing so, I need to show, given $Y \in L_2(\Omega, \sigma(X), \mathbb R)$, there is a Borel function $f:\mathbb R \to \mathbb R$ such that $Y = f(X)$.
I'm stuck at proving the $f$ I construct is measurable. Could you elaborate on how to do so?
Let
$(\Omega, \mathcal F, \mathbb P)$ be a probability space.
$L_2(\Omega, \mathcal F, \mathbb R)$ the Lebesgue space of square-integrable random variables from $(\Omega, \mathcal F, \mathbb P)$ to $(\mathbb R, \mathcal B(\mathbb R))$.
$X \in L_2(\Omega, \mathcal F, \mathbb R)$.
$\Lambda \subseteq L_2(\Omega, \mathcal F, \mathbb R)$ containing all random variables in $L_2(\Omega, \mathcal F, \mathbb R)$ that can be written as $f(X)$ for some Borel function $f:\mathbb R \to \mathbb R$.
Then $$\Lambda = L_2(\Omega, \sigma(X), \mathbb R).$$
My attempt:
It's clear that $\Lambda \subseteq L_2(\Omega, \sigma(X), \mathbb R)$. Let $Y \in L_2(\Omega, \sigma(X), \mathbb R)$. Then we want to prove there is a Borel function $f:\mathbb R \to \mathbb R$ such that $Y = f(X)$.
For $y_1, y_2 \in \mathbb R$ such that $y_1 \neq y_2$, let $A_1 =Y^{-1} (y_1)$ and $A_2 =Y^{-1} (y_2)$. Then $A_1 \cap A_2 = \emptyset$. Because $Y$ is $\sigma(X)$-measurable, then there are Borel sets $B_1, B_2$ such that $A_1 = X^{-1}(B_1)$ and $A_2 = X^{-1} (B_2)$. It follows that $X^{-1}(B_1) \cap X^{-1}(B_2) = X^{-1}(B_1 \cap B_2) =\emptyset$. This means $X(\omega) \notin B_1 \cap B_2$ for all $\omega \in \Omega$. Thus $X(A_1) \subseteq B_1 \setminus (B_1 \cap B_2)$ and $X(A_2) \subseteq B_2 \setminus (B_1 \cap B_2)$. Hence $X(A_1) \cap X(A_2) = \emptyset$. As such, $Y(\omega_1) \neq Y(\omega_2)$ implies $X(\omega_1) \neq X(\omega_2)$.
Now we define the required $f$ by $f(x) = Y(\omega)$ if there is some $\omega \in \Omega$ such that $x = X(\omega)$ and $f(x) = 0$ otherwise. This construction is valid due to above justification. Let's prove that $f$ is Borel.