TITLE: $C_c(X)$ dense in $L_1(X)$
QUESTION [14 upvotes]: I did the following homework, can you tell me if my answer is correct?
Prove that for any $\sigma$-compact, locally compact Hausdorff space $\Omega$ equipped with a Radon measure $\mu$ the set of continuous functions with compact support $C_c(\Omega)$ is dense in the set of Lebesgue-integrable functions $L_1(\Omega, \mu)$. Remember that any point of a locally compact space has a neighbourhood basis consisting of compact sets. A topological space is $\sigma$-compact if it allows a countable cover of compact sets.
a) We may assume that $f \in L_1(\Omega)$ is non-negative. Why? Prove that for any $\varepsilon > 0$ there exists a function $s \in L_1$ of finite support such that
$\|f−s \|_1 <\varepsilon$. You may use the fact that for any measurable, non-negative function $f$ there exists a monotonely increasing sequence of simple functions $\{s_n\}$ that approximate $f$ pointwise. 
Answer a.1: Because $f = f^+ - f^-$ where $f^+ , f^- \geq 0$ and so one only needs the integral on non-negative functions.
Answer a.2: To prove that one uses that for any non-negative $f$ there exists $s_n$ such that $$\forall \varepsilon > 0 \exists n_0 : n > n_0 \implies |f(x) - s_n(x) | < \frac{\varepsilon}{\mu(\Omega)} \forall x \in \Omega$$ where $s_n \leq s_{n+1}$ and $\displaystyle s_n(x) = \sum_{i=1}^N \alpha_i \chi_{Y_{i,n}}(x)$ and $Y_n := \cup Y_{i,n}$. Here I think I need to assume $\mu(\Omega) < \infty$ but maybe that follows from what is given in the question.
Then $$\| s_n(x) - f(x) \|_1 = \int_\Omega |s_n(x) - f(x)| d \mu < \varepsilon $$
Now one has a measurable function with finite (and therefore compact) support. Next one wants to make that into a continuous function.
b) Recall the Theorem of Lusin and Tietze’s Extension Theorem:

Theorem (Lusin’s Theorem). Let $\Omega$ and $\mu$ as above and $f\colon\Omega\to\mathbb R$ a $\mu$-measurable function with finite support $E$. Then for any $\delta > 0$ there exists a closed set $K\subset E$ such that $μ(E\setminus K) < \delta$ and $f$ is continuous on $K$.
Theorem (Tietze’s Extension Theorem for LCH spaces). If $\Omega$ is a locally compact Hausdorff space and $K \subset \Omega$ compact then any $f \in C(K, \mathbb R)$ can be extended to a function on $C_c(\Omega,\mathbb  R)$ with supremums norm bounded by $\| f \|_\infty$.

Combine these theorems to show that $C_c(\Omega)$ is dense in $L_1$. You may need that $\mu$ is Radon.
Answer b:
From a) one has a measurable function $s_n$ with finite support $Y_n$. To make it into a continuous function one can set it to be $0$ on $Y_n \setminus K$ where $K$ is a closed set such that $μ(Y_n \setminus K) < \delta$ for some $\delta$. Let's call this modified function $\tilde{s_n}$. Then $$ \lim_{n \to \infty} \| \tilde{s_n}(x) - f(x)\|_1 =  \lim_{n \to \infty} \int_{Y_n \setminus K} |s_n(x) - f(x)| d\mu = \lim_{n \to \infty} \int_{Y_n} |s_n(x) - f(x)| d\mu = 0$$
Many thanks for your help!

REPLY [3 votes]: I fancied typing up the answer myself. As I'll leave commenter's answer accepted I don't think anyone should be bothered by this.
a) For $\varepsilon > 0$ and $f \in L^1$ we want to find an $s$ such that $\| s - f \|_{L^1} < \varepsilon$ where $\mu (\operatorname{supp}{s}) < \infty $.
We may assume that $f \geq 0$ because if we can approximate non-negative functions then we can approximate all functions in $L^1$. To see this let $f \in L^1$. Then $f = f^+ - f^-$ and we can find $s^+$ and $s^-$ such that $\| f^+ - s^+\| < \frac{\varepsilon}{2}$ and $\| f^- - s^- \| < \frac{\varepsilon}{2}$ and hence $\| f - (s^+ - s^-) \| \leq \|f^+ - s^+\| + \| f^- - s^- \| < \varepsilon$.
If $f$ is non-negative we know that there is a sequence of step functions $s_n$ such that $s_n \to f$ pointwise and $0 \leq s_n \leq s_{n+1}$. We need to show that $s_n$ also converges to $f$ in norm, i.e. $\| f - s_n \|_{L^1} \to 0$. For this we observe that $|f(x) - s_n(x)| \leq |f(x)|$ and $f$ is integrable hence we can apply the Lebesgue dominated convergence theorem:
$$ \lim_{n \to \infty} \| f - s_n \|_{L^1} = \lim_{n \to \infty} \int_\Omega |f(x) - s_n(x)| d\mu = \int_\Omega \lim_{n \to \infty} |f(x) - s_n(x)| d\mu = 0$$
To finish part a) we need to argue that $s_n$ have finite support. But this is clear: $\int_\Omega s_n d \mu = \sum_{i=1}^N \alpha_i \mu(Y_i) < \infty$ implies that $\mu(Y_i) < \infty$ because $s_n \in L^1$ and $s_n \geq 0$ hence $\mu (Y_i) < \infty$ for all $i$ and therefore $\mu(\operatorname{supp}{s_n}) = \mu (\bigcup Y_i) \leq  \sum_{i=1}^N \mu(Y_i) < \infty$.

b) Now for $\varepsilon > 0$ we want to use $s \in L^1$ with finite support and $\| s - f\|_{L^1} < \frac{\varepsilon}{2}$ to construct an $\tilde{s}$ with compact support and $\| \tilde{s} - f\|_{L^1} < \varepsilon$.
First we use that $\mu$ is Radon (and therefore inner regular) to get a compact set $K_\delta \subseteq \operatorname{supp}{s}$ with $\mu(\operatorname{supp}{s} \setminus K_\delta) < \delta$ for all $\delta > 0$. 
Then because $\mu(K_\delta) < \infty$ we can apply Lusin's theorem to get a closed set $C_{\delta^\prime}$ with $f$ continuous on $C_{\delta^\prime}$ and $\mu(K_\delta \setminus C_\delta^\prime) < \delta^\prime$ for all $\delta^\prime > 0$. A closed subset of a compact set is compact and so $C_{\delta^\prime}$ is compact.
Now we use outer regularity of $\mu$ to get an open set $O_\tau$ such that $\mu(O_\tau \setminus \operatorname{supp}{s}) < \tau$ for all $\tau > 0$. 
And we'll use the following version of Tietze's extension theorem:

Theorem (Tietze’s Extension Theorem for LCH spaces). Let $\Omega$ be locally compact, let $K \subset \Omega$ be compact and let $f: K \to \mathbb{R}$ be continuous. For every open set $U \supset K$ there exists a continuous function $g:\Omega \to \mathbb{R}$ with $\operatorname{supp}{g} \subset U$ and  $\operatorname{supp}{g}$ compact such that $g|_K=f$.

Then we can apply this version of Tietze's theorem to extend $s|_{C_{\delta^\prime}}$ to a continuous and bounded function $\tilde{s} : \Omega \to \mathbb{R}$ which is $0$ outside $O_\tau$.
Then
$$ \| \tilde{s} - f \|_{L^1} \leq \int_\Omega |\tilde{s} - s| d \mu + \int_\Omega | f - s| d \mu < \| s \|_\infty 2 (\delta + \delta^\prime + \tau) + \frac{\varepsilon}{2}$$
Where the second last term is doubled because an error might occur on each side of the support.