To give some context, the following problem has been posed to me:
Let $X,\Sigma,\mu)$ be a measure space. We say that $A\in \Sigma$ is $\sigma$-finite if there exist $A_n\in \Sigma$ with $\mu(A_n)<\infty$ for all $n\in \mathbb{N}$ such that $A=\cup_{n\in\mathbb{N}}A_n$.
Let $f\in L^1(X,\Sigma,\mu)$. Show that there exists a $\sigma$-finite set $A\in\Sigma$ such that $f(x)=0$ for $x\in A^c$.
If we let $C_{00}(\mathbb{R})=\lbrace g:\mathbb{R}\rightarrow \mathbb{C}|$supp$(g)$ is compact$\rbrace$, then I have seen the result that for every $\epsilon>0$ and $f\in \mathcal{L}^1(\mathbb{R},\Sigma_m,m)$, where $m$ is the Lebesgue measure and $\Sigma_m$ is the corresponding $\sigma$-algebra, there exists a $g\in C_{00}(\mathbb{R})$ such that $$\int_{\mathbb{R}}|f-g|\mathrm{d}m<\epsilon$$
Where $\int_{\mathbb{R}}\mathrm{d}m$ is the Lebesgue integral, of course. I know the above theorem requires $f\in \mathcal{L}^1(\mathbb{R},\Sigma_m,m)$, but I cannot imagine there being a problem transitioning to the equivalence classes $L^1(\mathbb{R},\Sigma_m,m)$. So, my question is, does this theorem apply to general measure spaces as well, or is it specific to $(\mathbb{R},\Sigma_m,m)$? I have been looking through the proof that was presented to me and I see nothing special about the real numbers, or even the Lebesgue measure, in it.
And, if the theorem is applicable, I have been thinking about what to choose for my $A$. I assume it will make use of the fact that $f$ is measurable, since our $\sigma$-algebra is very general. But then there is the question of which sequence of sets to use as well...
The generalization of the definition of $C_{00}(\mathbb R)$ to a general measurable space may be difficult, since the notion of compact sets may not make sense. However, if we define $$C_{00}(X)=\left\{g\colon X\to \mathbb C \mid \mu\left(\left\{g\neq 0\right\}\right)<+\infty\right\},$$ then by definition of the Lebesgue integral, $C_{00}(X)$ is dense in $\mathcal L^1$.
For the original question, we may take $A_n:=\left\{\left|f\right|\gt 1/n\right\}$. Since $f$ integrable, $A_n$ has a finite measure and $\bigcup_{n\geqslant 1} A_n=\left\{f\neq 0\right\}$.