Suppose $Z$ is a random variable on a probability space $(\Omega, F, P)$.
$M(Z)$ is the subspace of $L^2$ consisting of all random variables in $L^2$ which can be written in the form $\phi(Z)$ for some Borel function $\phi : R \rightarrow R$.
I am trying to prove that $M(Z)$ is a closed subspace but I do not know the right approach.
I write down the definition of closed subspace that I think is correct: A closed subspace $M$ of a Hilbert space $H$ is a subspace of $H$ s.t. any converging sequence $x_n$ of elements of $M$ converges in norm to some $x \in M$, i.e., $||x_n - x || \rightarrow 0$ as $n \rightarrow \infty$.
I am having troubles understanding fully what do we mean when we say "all random variables that can be written in the form."
So how would I prove that $M(Z)$ is a closed subspace?
The space $M(Z)$ consists of all random variables $Y$ such that there exists a Borel-measurable function $\phi\colon\mathbf R\to\mathbf R$ such that the equality $Y=\phi(Z)$ holds, and $Y$ belongs to $\mathbb L^2$.
Let $(Y_n)_{n\geqslant 1}$ is a convergence sequence in $L^2$ of elements of $M(Z)$ to some $Y$. For each $n$, we may write $Y_n=\phi_n(Z)$ where $\phi_n\colon\mathbf R\to\mathbf R$ is Borel-measurable. We extract a subsequence of $(Y_n)_{n\geqslant 1}$ which converges almost everywhere to $Y$, which is denoted by $(Y_{n_j} )_{j\geqslant 1}$. Then $Y=\lim_{j\to \infty}\phi_{n_j}(Z)$, hence the sequence $(\phi_{n_j})$ converges on (almost every) point of $Z(\Omega)$. We define $\phi(x)=\lim_{j\to \infty}\phi_{n_j}(x)$ if $x\in Z(\Omega)$ and $\phi(x)=0$ otherwise to get $Y=\phi(Z)$.