Modulus of Continuity Let $\rho(t)$ be a function on the set $\mathbb{R}^+$ of nonnegative real numbers such that:


*

*$\rho$ is nondecreasing (and continuous - thanks for the correction)

*$\rho(t) = 0$ if and only if $t = 0$


Let $X$ be a metric space and let $f$ be a real valued function on $X$.  Say that $f$ has modulus of continuity $\rho$ if $|f(x) - f(y)| \leq \rho(d(x,y))$ for every $x$ and $y$ in $X$.  For example, a function is Lipschitz if and only if it has modulus of continuity $Ct$ for some positive real number $C$.  Observe that a function with modulus of continuity $\rho$ is necessarily continuous.
Question: If $X$ is a compact metric space without isolated points, is it true that the set of all functions with modulus of continuity $\rho$ is nowhere dense (meaning its closure contains no open set) in $C(X)$ equipped with the supremum norm?
I am a TA in a class in which it was claimed that the answer is yes, but I don't completely believe the proof given and I can't seem to find a correct argument except in special cases.  For example, one can show that the set of all Lipschitz functions on $[0,1]$ with Lipschitz constant $C$ is nowhere dense in $C[0,1]$ using the existence of piecewise linear functions of arbitrarily small norm whose linear pieces all have slope larger than $C$ (or smaller than -C).  So the idea for general $X$ should be to construct continuous functions of arbitrarily small norm with arbitrarily rapid oscillation, but I don't see how to do this.
Thanks!
 A: Let $C^\rho(X,x_0)$ be the set of continuous functions $X\to \mathbb R$ with modulus of continuity $\rho$ at $x_0$.
Observation (1): $C^\rho(X,x_0)$ is closed in $C(X)$. If $f$ is in the closure, then:
$$|f(x_0)-f(x)|\leq|f(x_0)-g(x_0)| + |g(x_0)-g(x)| + |g(x)-f(x)|\leq \rho(d(x_0,x)) + 2\sup_{z\in X} |f(z)-g(z)|$$
Where $g\in C^\rho(X,x_0)$  But we can make $\sup_{z\in X} |f(z)-g(z)|$ be arbitrarily small since $f$ is in the closure, so $|f(x_0)-f(x)|\leq \rho(d(x_0,x))$.
Observation (2): If $f,g\in C^\rho(X,x_0)$, then $f-g\in C^{2\rho}(X,x_0)$. This is easy to see.
So, if, for every $\epsilon>0$, we can find an $h\in C(X)$ such that $|h(x)|<\epsilon$ for all $x\in X$ and $h \notin C^{2\rho}(X,x_0)$, then you are done, because for any $f\in C^\rho(X,x_0)$, $f+h\notin C^\rho(X,x_0)$, and therefore $C^\rho(X,x_0)$ is nowhere dense in $C(X)$.  
Given $\epsilon>0$, we pick an $x_1\neq x_0$ so that $4\rho(d(x_0,x_1))<\epsilon$.  You can find such $x_1$ since $x_0$ is not an isolated point and $\rho(t)\to 0$ as $t\to 0$.  Define $\delta=d(x_0,x_1)>0$.
Define $\phi(t)=\frac{\epsilon}{2}(1-\frac{t}{\delta})$ if $t\leq \delta$ and $\phi(t)=0$ if $t>\delta$.  Then $h(x)=\phi(d(x_0,x))$ has the property that $|h(x)|<\epsilon$, $h(x_0)=\frac{\epsilon}2$, and $h(x_1)=0$.  So $|h(x_0)-h(x_1)|=\frac{\epsilon}2>2\rho(d(x_0,x_1))$.  So $h(x)\notin C^{2\rho}(X,x_0)$
A: *

*How to construct greatly oscillating functions with small uniform norms :


well in this case you only need a quick oscillation "at one point", together with arbitrary small norm.
Choose 2 points $a$ and $b$ in $X$ with $d(a,b)< \epsilon$. It is possible since $X$ has no isolated points. By Urysohn's lemma there is a continuous function $h : X \rightarrow [0,1]$ such that $h(a)=1$ and $h(b)=0$. Now let $g$ be the continuous function on $X$ defined by $g(x)=\alpha h(x)$, and $f$ such that $f$ admits $\rho$ as a modulus. For $\alpha$ arbitrarily small, $f+g$ belongs to $B(f,\alpha)$ but for $\epsilon$ small enough it will not admit $\rho$ as a continuity modulus.
