Countably generated $\sigma$-algebra implies separability of $L^p$ spaces Let $\Sigma = \sigma(\mathcal C)$ be the $\sigma$-algebra generated by the countable collection of sets $\mathcal C \subset \mathcal{P}(X)$. How can I prove that if $\mu$ is a $\sigma$-finite measure on $(X,\Sigma)$ then $L^p(X)$ is separable for $1 \le p < \infty$?
I know that simple functions are dense in $L^p(X)$, so I would like to find a countable subset of the set of simple functions that is dense in them. Could you help me please?

Before going into a formal proof, here is the idea. The space is $\sigma$-finite, so we can "break" it into countably many spaces of finite measure. Up to some technical considerations, we are reduced to the case $X$ of finite measure. An algebra generated by a countable class is countable and we can approximate elements of finite measure by those of a generating algebra.
Let $(A_n,n\geqslant 1)$ be a partition of $X$ into measurable sets of finite measure. 


*

*We show that $(A_n,A_n\cap \Sigma,\mu_{\mid A_n\cap \Sigma})$ is separable. Consider $f\in L^p(A_n)$ and fix $\varepsilon>0$. There is $f'=\sum_{j=1}^J a_j\chi_{B_j}$ simple simple such that $\int_{A_n}|f-f'|^p\mathrm d\mu\lt\varepsilon^p$. Define $\mathcal A_n$ the algebra generated by sets of the form $A_n\cap C,C\in\mathcal C$. Then $\mathcal A_n$ is countable. Approximate $B_j$ by $B'_j$, an element of $\mathcal A_n$, that is, such that $\mu(B'_j\Delta B_j)\lt \frac 1{J(|a_j|^p+1)}\varepsilon$. Defining $f'':=\sum_{j=1}^Ja_j\chi_{B'_j}$, we get $\lVert f-f''\rVert^p\lt 2\varepsilon$. 

*Define $D_n$ as the set of linear combinations  with rational coefficients of characteristic functions of elements of $\mathcal A_n$. Since $\mathcal{A}_n$ is countable, so is $D_n$. Finally, define 
$$D:=\bigcup_{N\geqslant 1}\left\{\sum_{i=1}^Nd_i,d_i\in D_i\right\}.$$
Then $D$ is countable and dense in $L^p(X)$.
