I have never studied any measure theory, so apologise in advance, if my question is easy:


Let $X$ be a measure space. How can I decide whether $L^2(X)$ is separable?


In reality, I am interested in Borel sets on a locally compact space $X$. I can also assume that the support of the measure is $X$, if it helps...


I cannot even decide at the moment for which locally compact groups $G$ with Haar measure, $L^2(G)$ is separable...



When is $L^2(X)$ separable? 
Without loss of generality we can assume that the support of the measure equals $X$
(i.e., the measure is faithful),
because we can always pass to the subspace defined by the support of the measure.


The space $^2(X)$ is independent of the choice of a faithful measure and depends only
on the underlying [enhanced measurable space](/questions/20740/is-there-an-introduction-to-probability-theory-from-a-structuralist-categorical-p/20820#20820) of $X$, i.e., measurable and negligible subsets of $X$.


There is a complete classification of measurable spaces up to isomorphism.
Every measurable space canonically splits as a disjoint union of its
ergodic subspaces, i.e., measurable spaces that do not admit measures
invariant under all automorphisms.


Ergodic measurable spaces in their turn can be characterized using
two cardinal invariants $(m,n)$, where either $m=0$ or both $m≥ℵ\_0$ and $n≥ℵ\_0$.
The measurable space represented by $(m,n)$ is the disjoint
union of $n$ copies of $2^m$, where $2=\{0,1\}$ is a measurable
space consisting of two atoms and $2^m$ denotes the product of $m$ copies of 2.
The case $m=0$ gives atomic measurable spaces (disjoint unions of points),
whereas $m=ℵ\_0$ gives disjoint unions of real lines (alias standard Borel spaces).


Thus isomorphism classes of measurable spaces are in bijection
with functions M: Card'→Card, where Card denotes the class of cardinals
and Card' denotes the subclass of Card consisting of infinite cardinals and 0.
Additionally, if $m>0$, then $M(m)$ must belong to Card'.


The Banach space $^p(X)$ ($1≤p<∞$) is separable if and only if
$M(0)$ and $M(ℵ\_0)$ are at most countable and $M(m)=0$ for other $m$.


Thus there are two families of measurable spaces whose $^p$-spaces are separable:


1. Finite or countable disjoint unions of points;
2. The disjoint union of the above and the standard Borel space.


Equivalent reformulations of the above condition assuming $M(m)=0$ for $m>ℵ\_0$:


1. $^p(X)$ is separable if and only if $X$ admits a faithful finite measure.
2. $^p(X)$ is separable if and only if $X$ admits a faithful $σ$-finite measure.
3. $^p(X)$ is separable if and only if every (semifinite) measure on $X$ is $σ$-finite.


The underlying measurable space of a locally compact group $G$ satisfies the above conditions if and only if $G$ is second countable as a topological space.


The underlying measurable space of a paracompact Hausdorff smooth manifold $M$
satisfies the above conditions if and only if $M$ is second countable, i.e.,
the number of its connected components is finite or countable.


More information on this subject can be found in this answer:
[Is there an introduction to probability theory from a structuralist/categorical perspective?](https://mathoverflow.net/questions/20740/is-there-an-introduction-to-probability-theory-from-a-structuralist-categorical-p/20820#20820)


Bruckner, Bruckner, and Thomson discuss separability of $^p$-spaces in Section 13.4 of their textbook Real Analysis:
<http://classicalrealanalysis.info/documents/BBT-AlllChapters-Landscape.pdf>


