Theorem 1.2. For any $f ā L^1$ and any $ε>0$ there is a $g$ in $C_c(ā^n)$ such that $ā«|f-g|dm<ε$.
Since $L^1$ functions can be approximated in $L^1$ by integrable simple functions, it suffices to prove the theorem when $f$ is a simple function.
Next, since an integrable simple function is a linear combination of functions of the form $Ļ_E$, where $E$ is a measurable set of finite measure, it suffices to prove the theorem when $f=Ļ_E$. Therefore, Theorem 1.2 will be proved by establishing
Proposition 1.4. Let $E$ be a measurable subset of $ā^n$ with finite measure. Then for any $ε>0$ there is a $g ā C_c(ā^n)$ with $ā«|Ļ_E-g| d m<ε$.
Proof. By regularity properties of Lebesgue measure there is a compact set $K$ and an open set $U$ such that $K ā E ā U$ and $m(UāK)<ε$. By Lemma 1.3, there is a $g ā C_c(ā^n)$ such that $0 ⤠g ⤠1$ everywhere, $g=1$ on $K$, and $g$ vanishes outside of $U$. It follows that $|g-Ļ_E|$ vanishes outside of $UāK$, and that $|g-Ļ_E| ⤠1$ on $UāK$. Therefore $ā«|g-Ļ_E| d m=ā«_{UāK}|g-Ļ_E| d m ⤠m(UāK)<ε$. ā
In this section, we'll prove the version of Urysohn's Lemma that we used in the proof of Theorem 1.2. We'll work in a locally compact metric space $(X, d)$. We'll use the notation $B_r(x)$ for the open ball in $X$ with center $x$ and radius $r$.
Lemma 2.1. Let $x_0 ā X$ and $r>0$. There is $a Ļ ā C_c(X)$ with
1. $0 ⤠Ļ(x) ⤠1$ for every $x ā X$;
2. $Ļ(x)=1$ for every $x ā B_r(x_0)$;
3. The support of $Ļ$ is a subset of $B_{2 r}(x_0)$.
Proof. Let $Ļ$ be the continuous function on $ā$ defined by $Ļ(t)=1$ for $0 ⤠t ⤠r$, $Ļ(t)=1-\frac{2}{r}(t-r)$ for $r\frac{3 r}{2}$. Let $Ļ(x)=Ļ(d(x, x_0))$.
Proof of Lemma 1.3. Cover $K$ by finitely many balls $B_j=B_{r_j}(x_j)$ such that $\overline{B_{2 r_j}(x_j)}$ is a compact subset of $U$. Let $Ļ_j$ be the function obtained from Lemma 2.1 with $x_0=x_j$ and $r=r_j$. Let $Ļ=\sum Ļ_j$. Then
1. $Ļ$ is continuous on $X$;
2. The support of $Ļ$ is a compact subset of $U$;
3. $Ļ ā„ 0$ everywhere, and $Ļ ā„ 1$ on $K$.
Let $Ļ=\min \{Ļ, 1\}$. Then $Ļ$ has all the required properties. ā