Set of somewhere locally monotone functions is meagre I want to show that the family of somewhere locally monotone functions is meagre in $(C[0,1], \|\cdot\|_\infty)$.
Let $\delta \in (0,1]$ and consider the set
$$S^+_\delta=\left\{f\in C[0,1]: \mbox{there are $a<b$ in [0,1] such that $b-a=\delta$ and $f$ is non-decreasing on $[a,b]$}\right\}$$
Similarly,
$$S^-_\delta=\left\{f\in C[0,1]: \mbox{there are $a<b$ in [0,1] such that $b-a=\delta$ and $f$ is non-increasing on $[a,b]$}\right\}$$
So, for $n \in \mathbb{N}$, $\mathcal{S}:=\{S^+_{1/n} \cup S^-_{1/n}\}$ is a collection of sets on which $f$ is somewhere locally monotone.
Now what remains is to show that each set in $\mathcal{S}$ is closed and nowhere dense - that is, each such set has empty interior. I think it is closed because any sequence of functions in $S\in \mathcal{S}$ is a subsequence of a sequence in $(C[0,1], \|\cdot\|_\infty)$, so it must converge to a somewhere locally monotone function (this is not so rigorous, however). The most difficulty I'm experiencing here is with attempting to prove that $S\in \mathcal{S}$ is nowhere dense. Once this fact is established, it will follow that the family of somewhere locally monotone functions is meagre in $(C[0,1], \|\cdot\|_\infty)$.
I would appreciate some help.
 A: For each rational numbers $0\le  p<q\le 1$ put $S^+_{p,q}=\{f\in C[0,1]: f$ is non-decreasing on $[p,q]\}.$ A set $S^-_{p,q}$ is defined similarly, but with the word “non-increasing” instead of “non-decreasing”. If $f\in C[0,1]\setminus S^+_{p,q}$ then there exist rational numbers  $p\le  p’<q’\le q$ such that $f(p’)>f(q’)$. Put $\varepsilon=(f(p’)- f(q’))/2$. Clearly, if $g\in C[0,1]$ and $ \|g-f\|_\infty<\varepsilon $ then $g\in C[0,1]\setminus S^+_{p,q}$. That is, the set  $g\in C[0,1]\setminus S^+_{p,q}$ is open, so the set $S^+_{p,q}$ is closed. Similarly we can show that the set $S^-_{p,q}$ is closed. Assume that the set $S^+_{p,q}$ is dense in some non-empty open set. Then there exists a function $f\in S^+_{p,q}$ and a number $\varepsilon>0$ such that if $g\in C[0,1]$ and $ \|g-f\|_\infty<\varepsilon$ then $g\in  S^+_{p,q}$. Put $r=(p+q)/2$. Since a function $f$ is continuuous at a point $r$, there exists $0<\delta\le (q-p)/2$ such that $|f(s)-f(r)|<\varepsilon/2$ provided $|s-r|<\delta$. Define a function $g$ on $[0,1]$ as follows. Put $g(t)=f(t)$, if $|t-r|\ge \delta$, $g(r)=f(r-\delta)-\varepsilon/2$ and then extend $g$ linearly on segments $[r-\delta,r]$ and  $[r, r+\delta]$. It is easy to check that the function $g$ is continuous and  $\|g-f\|_\infty\le\varepsilon$, but $g\not\in S^+_{p,q}$. The obtained contradiction shows that the set $S^+_{p,q}$ is nowhere dense in $C[0,1]$. Similarly we can show that the set $S^-_{p,q}$ is nowhere dense in $C[0,1]$. At last, since the family of somewhere locally monotone functions of $C[0,1]$ is a union of all sets $S^+_{p,q}$ and $S^-_{p,q}$, it is meager.
