# A generalization about the density of $\mathcal C_c(X, E)$ in $\mathcal L_p (X, \mu, E)$ when $E$ is a Banach space

Let $$X$$ be a metric space, $$\mu$$ a $$\sigma$$-finite non-negative Borel measure on $$X$$, and $$(E, |\cdot|)$$ a Banach space. Let $$\mathcal L_p := \mathcal L_p (X, \mu, E)$$ and $$\|\cdot\|_{\mathcal L_p}$$ be its semi-norm. Here we use Bochner integral. Let $$\mathcal C_c :=\mathcal C_c(X, E)$$ be the space of all $$E$$-valued continuous functions on $$X$$ with compact supports. It is well-known that

Theorem If $$X$$ is locally compact separable, then $$\mathcal C_c$$ is dense in $$\big (\mathcal L_p, \|\cdot\|_{\mathcal L_p} \big)$$ for all $$p \in [1, \infty)$$.

I would like to ask if above result can be further strengthened, i.e.,

Let $$X$$ be locally compact separable. For each $$f \in \mathcal L_p$$ with $$p \in [1, \infty)$$ and $$\varepsilon>0$$, there is $$g \in \mathcal C_c$$ such that $$\color{red}{|g| \le |f|} \quad \mu\text{-a.e.} \quad \quad \text{and} \quad \quad \| f-g \|_{\mathcal L_p} < \varepsilon.$$

This result, if true, generalizes this lemma which itself generalizes another lemma.

Thank you so much for your elaboration!

• You want to approximate everything in $\mathcal{L}_p$ with something in $\mathcal{C}_c$. Isn't it enough to approximate every simple function in $\mathcal{L}_p$? And then isn't it enough to approximate every function of the form $\chi_A\cdot b$ for $A \subseteq X$ finite measure and $b \in E$? Which we already know is true. Nov 10, 2022 at 17:06
• @NikWeaver Ah you missed the condition $|g| \le |f|$... Nov 10, 2022 at 17:11
• Oh. But with that condition isn't it already false in the scalar case? Nov 10, 2022 at 21:03
• Yeah, the fat Cantor set's the counterexample. Nov 11, 2022 at 21:17
• It is correct.. Nov 11, 2022 at 22:27

Below is a counter-example taken from this thread. It works even when $$\mathcal C_c$$ is replaced by $$\mathcal C$$, the space of all continuous functions from $$X$$ from $$E$$.
Let $$X:=[0, 1]$$, $$E:=\mathbb R$$, and $$\mu$$ the Lebesgue measure on $$[0, 1]$$. Let $$C$$ be the fat Cantor set. Then $$C$$ is closed and $$\mu(C) =\frac{1}{2}$$. Let $$f :=1_C$$. Then $$\| f \|_{\mathcal L_1} = \frac{1}{2}$$.
Let $$g \in \mathcal C$$ such that $$|g| \le |f|$$ $$\mu$$-a.e. This implies there is a $$\mu$$-null subset $$N$$ of $$X$$ such that $$|g| \le |f|$$ on $$X \setminus N$$. Assume $$g (a) \neq 0$$ for some $$a \in X$$. By continuity of $$g$$, there is an open interval $$I$$ of $$X$$ such that $$g\neq0$$ on $$I$$. Then $$f>0$$ on $$I \setminus N$$. So $$(I \setminus N) \subset C$$ and thus $$I \subset (C \cup N)$$.
Notice that $$I \setminus C$$ is non-empty and open, so there is a non-empty open interval $$J$$ such that $$J \subset I$$ and $$J \cap C = \emptyset$$. As such, $$J \subset N$$ and thus $$\lambda (N)>0$$. This is a contradiction. As such, $$g =0$$ everywhere. Hence any $$g \in \mathcal C$$ can not approximate $$f$$ from below.