Order density of smooth functions among continuous functions? Let $\mathcal{C}^0([a,b],\mathbb{R})$ be the space of all continuous functions $f:[a,b]\rightarrow\mathbb{R}$ and $\mathcal{C}^\infty([a,b],\mathbb{R})$ the subspace of all smooth functions. Define $f\leq g:\Leftrightarrow(\forall x: f(x)\leq g(x))$ and $f\ll g:\Leftrightarrow(\forall x: f(x)< g(x))$. Is the following true:
$$\forall f,h\in\mathcal{C}^0([a,b],\mathbb{R}) \;\exists g\in\mathcal{C}^\infty([a,b],\mathbb{R}): f\ll h\Rightarrow f\leq g\leq h,$$
i.e. between any two continuous functions $f\ll h:[a,b]\rightarrow\mathbb{R}$, there exists a smooth function $g$?
Does this yield that $(\mathcal{C}^r([a,b],\mathbb{R}),\leq)$ is not a lattice, for any $r\in\mathbb{N}$ (I'd like to construct a function $g$ between $|x|$ and supposed $x\vee-x$).
I haven't found this result anywhere in my calculus books, so I'd appreciate any references.
 A: Yes, since smooth functions are dense in $C^0([a,b])$ with the supremum norm. Since $[a,b]$ is compact, $\inf (h-f)$ is acheived somewhere in $[a,b]$ so must be positive. Thus any smooth function $g$ sufficiently near $\frac{f+h}{2}$ will suffice.
Indeed $(C^r([a,b],\mathbb R),\leq)$ is not a lattice for $r\in\mathbb N$, although I'm not sure if the fact you asked about is useful. For convenience of notation let $[a,b]=[-1,1]$. Take any function $f\in C^r([-1,1],\mathbb R)$ such that $f\geq x$ and $f\geq -x$, i.e. $f\geq |x|$. Since $f-|x|$ is continuous and nonnegative, we have either $f=|x|$ which is impossible as $|x|\notin C^r([-1,1],\mathbb R)$, or we have some interval $I$ and some $\epsilon>0$ such that $f-|x|\geq \epsilon$ on $I$. Let $g$ be a bump function on $[-1,1]$ with support $I$ and maximum value $\epsilon$. Then $f-g\in C^r([a,b],\mathbb R)$ and $f\geq f-g\geq |x|$, hence $f$ is not the least upper bound of $x$ and $-x$. Since $f$ was arbitrary, we conclude no least upper bound exists, so $C^r([a,b],\mathbb R)$ is not a lattice.
Edit: The impediment to applying the fact you asked about is that, while it would furnish a smooth function on $I$ between $f-|x|$ and $0$, such a function need not be $0$ on its endpoints and even if it is, it is not necessarily the case that extending it to $[-1,1]$ by setting it to $0$ outside $I$ would give a $C^r$ function.
