# Continuous and dense embeddings and the density of sets in Hilbert space

Suppose $H$ is a Hilbert space of functions $f:\Omega\to \mathbb{R}^n$ with $\Omega\subset \mathbb{R}^n$ open, bounded and with Lipschitz boundary (take for example $H=H_0^1(\Omega)^n$) and suppose $B$ is a Banach space that is continuously and densely embedded in $H$. Let $g\geq 0$ and continuous, is the set $$C(B,g):=\{f\in B: |f(x)|_{\mathbb{R}^n}\leq g(x) \text{ a.e. } x\in \Omega\}$$ dense in $$C(H,g):=\{f\in H: |f(x)|_{\mathbb{R}^n}\leq g(x) \text{ a.e. } x\in \Omega\}?$$

-
At this level of generality, I would not expect this to be true. You may have in mind the case where B is a space of "nice" functions. But if this is not somehow assumed, is it even clear that C(B,g) has nontrivial elements? –  Michael Renardy Aug 29 '13 at 22:52
For some specific examples the result holds, but I wanted to know if the continuous and dense embedding implied the density of $C(B,g)$, @Michael. I imagine that if $C(B,g)$ contains only 0, the same would happen to $C(H,g)$. Thanks. –  Nonliapunov Aug 30 '13 at 7:07

Here is a counterexample. Take some strictly positive function $w\colon [0,1] \to R$ which is in $L^2$ and has a dense set of singularities, for example $$w(x) = \sum_{q \ge 1}\sum_{p=1}^q {1\over q^4 |x-p/q|^{1/4}}$$ Then I choose $B$ to be the space of all functions of the form $f = Fw$ with $F$ continuous and $\|f\| = \sup |f(x)/w(x)|$. In this case, $C(B,g) = \{0\}$, which is not dense in $C(H,g)$ if you take for example $H = L^2([0,1])$. The fact that $B$ is dense in $H$ is an exercise for the reader ;-)