I originally posted this question on math.stackexchange (<https://math.stackexchange.com/questions/83182/modulus-of-continuity-take-2>), but it's been a few days and I haven't received any correct answers.


Let $\rho: \mathbb{R}^+ \to \mathbb{R}^+$ be a continuous nondecreasing function such that $\rho(t) = 0$ if and only of $t = 0$. If you can answer my question in the special case $\rho(t) = Ct$ where $C$ is a constant then it will probably be possible to adapt your construction to the general case.


Say that a function $f: X \to \mathbb{R}$ on a metric space has *modulus of continuity $\rho$* at a point $x\_0 \in X$ if $|f(x) - f(x\_0)| \leq \rho(d(x,x\_0))$ for every $x \in X$. For example, a function has modulus of continuity $Ct$ at $x\_0$ if and only if it is Lipschitz with Lipschitz constant $C$ at $x\_0$. 


**Question** If $X$ is a compact metric space without isolated points, is it true that the set $S$ of all continuous functions on $X$ which have modulus of continuity $\rho$ at some point of $X$ is nowhere dense in $C(X)$ equipped with the supremum norm?


Note that the "some point" that I am referring to is not fixed and may depend on the function. The complement of $S$ is the set of all functions which do not have modulus of continuity $\rho$ at any point.


To prove that the answer is affirmative for a given $X$ one must be able to construct functions of arbitrarily small norm which oscillate arbitrarily rapidly. For example, if $\rho(t) = Ct$ and $X = [0,1]$ then one can use a piecewise linear function such that the slope of each linear piece is larger than $C$ in absolute value. However, I don't see how to generalize this idea to an arbitrary compact metric space without isolated points.



Modulus of Continuity
All right, I don't think that anything I'll say below will be new to Paul. However it'll address Vaughn's concerns (to the extent he expressed them in the comments by the moment of this writing).


Of course, the ultimate purpose is to show that for a given modulus of continuity $\rho$, the set $U$ of continuous functions $f$ that have that modulus of continuity at at least one point $x$ in the sense that there exists $\delta>0$ (depending on $x$) such that $|f(x)-f(y)|\le\rho(d(x,y))$ for all $y$ satisfying $d(x,y)\le \delta$ is small. 


However, there is no chance to show that it is nowhere dense because you can take any function and flatten it a bit near any value $v$ it takes, i.e., to consider $g(x)=\min(f(x)+\varepsilon,v)+\max(f(x)-\varepsilon,v)-v$. This function will be constant near the point where $f=v$ and differ from $f$ by at most $\varepsilon$. So, every open set contains a "bad" function.


The right words to use instead of "nowhere dense" are "of the first category". Note that if $f$ has modulus of continuity $\rho$ at some point locally, then it has modulus of continuity $A\rho$ at the same point globally for some large integer constant $A$. Now fix $A$ and consider the set $F\_A$ of functions $f$ such that there exists a point $x\in X$ at which $f$ has global modulus of continuity $A\rho$. Note that the union of $F\_A$ contains $U$.


Note that each $F\_A$ is closed: if $f\_n\in F\_A$ converge to $f$ uniformly and $x\_n\in X$ are the corresponding bad points, then any accumulation point $x$ of the sequence $x\_n$ is bad for $f$.


It remains to show that $F\_A$ contains no open set. Let $f$ be any function in $C(X)$. Let $\lambda>0$. Choose $\delta>0$ so small that $|f(x)-f(y)|\le\lambda$ whenever $d(x,y)\le 4\delta$ and $A\rho(2\delta)<\lambda$ as well. Now run the construction in my remark only denote the resulting function $g$ and put $g=0$ on $A$ and $g=4\lambda$ on $B$.


Consider $h=f+g$. On one hand, it differs from $f$ by $4\lambda$ or less. On the other hand, for each point $x\in X$, the ball of radius $2\delta$ centered at $x$ contains a point $a\in A$ and a point $b\in B$. If $h$ had global modulus of continuity at $x$, we would have $|h(a)-h(b)|\le 2A\rho(2\delta))<2\lambda$. On the other hand, this difference is at least $4\lambda-|f(a)-f(b)|\ge 3\lambda$. Thus, every open ball in $C(X)$ intersects the complement of $F\_A$.


