Existence of Sigma algebra $\mathbb{G}$ such that $M = L^2(\Omega, \mathbb{G}, \mathbb{P})$ Let $(\Omega, \mathbb{F}, \mathbb{P})$ be a probability space and $M$ be a closed linear subspace of  $L^2(\Omega, \mathbb{F}, \mathbb{P})$. My question is :
Does there exists a sigma algebra $\mathbb{G} \subset \mathbb{F}$ such that $M = L^2(\Omega, \mathbb{G}, \mathbb{P})$ ?
My attempt: Define $G = \sigma\{X : X \in M\}$ then $ L^2(\Omega, \mathbb{G}, \mathbb{P})$ is a closed subspace and we have that $M \subset  L^2(\Omega, \mathbb{G}, \mathbb{P})$. But I´m having trouble proving that  $L^2(\Omega, \mathbb{G}, \mathbb{P}) \subset M$
I´m currently studying conditional Expectation, and I know that given a  sigma algebra $\mathbb{G} \subset \mathbb{F}$ and $X\in L^2(\Omega, \mathbb{G}, \mathbb{P})$ then $E[X | \mathbb{G}]$ is the orthogonal projection  of X to the closed linear subspace $ L^2(\Omega, \mathbb{G}, \mathbb{P})$ 
On the other hand given a closed subspace $M $ of  $L^2(\Omega, \mathbb{F}, \mathbb{P})$ and $X \in  L^2(\Omega, \mathbb{F}, \mathbb{P})$, by general theory of Hilbert Spaces there exists a unique $Z$ such that it is the orthogonal projection of $X$ to the closed subspace  $M$, that is $Z = P_M(X)$ and in some books $P_M(X)$ (for example in the book Time Series by Peter and Brockwell) is the definition of the conditional expectation of $E[X|M]$. 
The problem I have is that by general probability theory, conditional expectation is defined to be with respect to a sigma algebra $\mathbb{G} \subset \mathbb{F}$. So if we want that $E[X|M]$ concides with the probability definition then necessarily $M = L^2(\Omega, \mathbb{G}, \mathbb{P})$ for some sigma algebra $\mathbb{G} \subset \mathbb{F}$ and then we can define $E[X|M]$ as $E[X| \mathbb{G}]$
I would really appreciate any suggestion or comment with this problem.
Edit 1 : as triple_sec pointed out, there is a counterexample if $M$ does not have constant functions, So what if we allow $M$ to be a closed linear subspace that also contains the constant functions. Can we guarantee the existence of the sigma algebra $\mathbb{G}$ ? 
 A: The claim is not true, even if $M$ contains the constant functions. To see this, let $\Omega\equiv[0,1]$, let $\mathbb F$ be the Borel $\sigma$-algebra, and let $\mathbb P$ be the Lebesgue measure.
Let $M$ consist of (equivalence classes of) the affine functions, that is, functions of the form $x\mapsto a x+b$ for some $a,b,\in\mathbb R$. It is easy to see that $M$ is a linear subspace of $L^2(\Omega,\mathbb F,\mathbb P)$ (affine functions on the unit interval are square-integrable, and sums and constant multiples of affine functions are affine).
Now I am going to show that $M$ is closed. Let $f$ be in the closure of $M$, so that there exists a sequence $(f_n)_{n\in\mathbb N}$ in $M$ such that $$\lim_{n\to\infty}\left\{\int_0^1|f_n(x)-f(x)|^2\,\mathrm dx\right\}^{\frac{1}{2}}=0.$$ This implies that there exists a subsequence that converges to $f$ almost everywhere (see Exercise 6.9 in Folland, 1999, p. 187). For the sake of convenience, let $(f_n)_{n\in\mathbb N}$ denote this subsequence from now on. Note that for every $n\in\mathbb N$ $f_n$ is of the form $x\mapsto a_n x+b_n$ for some $a_n,b_n\in\mathbb R$. Take any $x_0,y_0\in[0,1]$ such that $x_0\neq y_0$ and $\lim_{n\to\infty}f_n(x_0)= f(x_0)$ and $\lim_{n\to\infty}f_n(y_0)=f(y_0)$. I leave it to you to derive that
\begin{align*}
\lim_{n\to\infty}a_n&=a\equiv\frac{f(x_0)-f(y_0)}{x_0-y_0},\\
\lim_{n\to\infty}b_n&=b\equiv f(x_0)-ax_0.
\end{align*}
This implies that at every $x\in[0,1]$ for which $\lim_{n\to\infty}f_n(x)=f(x)$, one has $f(x)=a x+b$. Hence, $f$ is affine almost everywhere—in other words, $f\in M$, showing that $M$ is closed.
Now, if the $\sigma$-algebra $\mathbb G\subseteq\mathbb F$ were to be such that $M=L^2(\Omega,\mathbb G,\mathbb P)$, then $\mathbb G=\mathbb F$, given that $M$ contains the identity function. But this is a contradiction, since $M$ cannot possibly be equal to $L^2(\Omega,\mathbb F,\mathbb P)$.
A: If $M = L^2(\Omega,\mathcal G,\mathbb P)$ with sigma-algebras $\mathcal G \subseteq \mathcal F$, then the conditional expectation
$$
f \mapsto \mathbb E(f | \mathcal G)
$$
is the orthogonal projection onto $M$.  To show that not all subspaces
are of the form $L^2(\Omega,\mathcal G,\mathbb P)$ it suffices to show not
all projections are of the form $\mathbb E(f | \mathcal G)$.
In particular, let $\Omega = [0,1]$, and $\mathcal F$ = Borel sets, and $\mathbb P$ = Lebesgue measure.  There are certainly many different closed subspaces that contain the element $f(x) = x$.  But the only sub-sigma-algebras $\mathcal G$ such that $\mathbb E(f | \mathcal G) = f$ a.s. are such that $\mathcal G/\text{null} = \mathcal F/\text{null}$ and then the projection is the identity.
