Dimension of $L^2(E, \mathcal{E}, \mu)$ In my functional analysis course we showed (as a consequence of Stone-Weierstraß) that $L^2([0,1], \lambda)$ has countable (Hilbert space) dimension.
I wondered if we can deduce anything about the dimension of $L^2(E, \mathcal{E}, \mu)$ for a given measure space if we have some information about $(E, \mathcal{E}, \mu)$, such as ($\sigma$-)finiteness or $E$ being a compact space with $\mathcal{E} = \mathcal{B}(E)$ for example.
 A: It's not true that if $E$ is compact then $L^2(E)$ is separable, without additional assumptions. Assuming that $\mu$ is a finite regular Borel measure is not enough:
Let $G=\{1,-1\}$. Regard $G$ as a compact group in the obvious way. Now for some  large set $I$ let $E=G^I$. Formally $E$ is the set of all functions from $I$ to $G$; to avoid confusion with the functions in $L^2$ we will write the elements of $E$ as $x=(x_i)_{i\in I}$.
Now $E$ is a compact abelian group,  and so its Haar measure $\mu$ is finite; as usual we normalize the Haar measure so $\mu(E)=1$.
For each $j\in I$ define $f_j:E\to\mathbb C$ by $$f_j(x)=x_j.$$ Then $\{f_j:j\in I\}$ is an orthonormal subset of $L^2(\mu)$, of cardinality $|I|$. That is, cardinality as large as you like, just start with $I$ large enough.
Details on why the $f_j$ are orthonormal: First, it's clear that $||f_j||_2=1$, since $|f_j(x)|=1$ for all $x$.
For $j\in I$ let $E_j=\{x:x_j=1\}$, $F_j=\{x:x_j=-1\}$. Define $y\in E$ by $y_i=-1$ if $i=j$, $y_i=1$ if $i\ne j$. Then $F_j=yE_j=\{yx:x\in E_j\}$, so since $\mu$ is translation-invariant we have $\mu(E_j)=\mu(F_j)$; since $E_j$ and $F_j$ are disjoint with union $E$ it follows that $\mu(E_j)=\mu(F_j)=1/2$.
Now suppose that $j,k\in I$, $j\ne k$. Arguing as above shows that
$$\mu(E_j\cap E_k)=\mu(E_j\cap  F_k)=\mu(F_j\cap E_k)=\mu(F_j\cap F_k)=1/4,$$so $$\int_E f_jf_k=\mu(E_j\cap E_k)+\mu(F_j\cap  F_k)
-\mu(E_j\cap  F_k)-\mu(F_j\cap E_k)=0.$$
