Let $X$ be a smooth manifold (where, throughout, “smooth” means “$C^\infty$”). Consider the following statement:
For all $f\colon X\to\mathbb{R}$ continuous there exists $g\colon X\to\mathbb{R}$ smooth such that both of the following hold:
$\forall \varepsilon>0.\; \exists \delta>0.\; \forall x\in X.\; (|f(x)|<\delta \Rightarrow |g(x)|<\varepsilon)$
$\forall \varepsilon>0.\; \exists \delta>0.\; \forall x\in X.\; (|g(x)|<\delta \Rightarrow |f(x)|<\varepsilon)$
Question: Is this statement true? If so, what is a proof? Is it a standard fact? If so, what is a reference?
Comments:
The statement is of the form $\forall f. \exists g. \forall \varepsilon$. This is not an error. (I state this explicitly, because everyone I asked initially seems to want to read it as $\forall f. \forall \varepsilon. \exists g$ instead.)
With a slight abuse of notation/terminology, we might rephrase the question as: “for every continuous $f$, there exists $g$ smooth such that both $g\to 0$ when $f\to 0$ and conversely”. This explains the title of this question and I hope helps to make it seem more natural.
For the significance of the conditions on $g$, see this answer (note that we can assume w.l.o.g. that $f$ is bounded, and we can demand w.l.o.g. that $g$ is: then they say $Z(\tilde f) \subseteq Z(\tilde g)$ and $Z(\tilde f) \supseteq Z(\tilde g)$ respectively, where $\tilde f,\tilde g$ are the continuous extensions of $f,g$ to the Stone-Čech compactification $\beta X$ of $X$).
Two special cases of the above statement are worth noting (and are indeed proven as follows):
If $X$ is compact, then the conditions on $g$ simply state that $g$ vanishes exactly when $f$ does (viꝫ. $Z(g) = Z(f)$), i.e., the statement is that every zero-set the zero-set of a smooth function. This is indeed the case: see here and here (I don't know a printed reference even for this particular case, so if you know one, please suggest).
If $f$ does not vanish, then the statement can be proved as follows: we can assume w.l.o.g. that $f>0$ (by considering the clopen sets $\{f>0\}$ and $\{f<0\}$ separately). By a standard approximation theorem (Hirsch, Differential Geometry (1976, Springer GTM 33), chapter 2, theorem 2.2 on page 44), there exists a smooth function $v$ such that $|u-v|<1$ on $X$, where $u := \log f$: then $0 < C_1 f < g < C_2 f$ for some constants $0<C_1<C_2$ (viꝫ. $\frac{1}{e}$ and $e$), which implies the required conditions.
My initial motivation for asking is that a positive answer implies a positive answer to the PS in this answer (in short: that the maximal ideals of the ring of bounded smooth functions on $X$ are in bijective correspondence with those of the ring of bounded continuous functions, by the map which simply takes an ideal of the latter to its intersection with the former ring). But I think the question has independent interest.