Theorem: Space of Somewhere Differentiable Continuous Functions on Closed Interval is Meager in Space of Continuous Functions on Closed Interval/Lemma 2

:for each $\tuple {n, m} \in \N^2$, $A_{n, m}$ is nowhere dense in $\struct {\map \CC I, d}$.

Proof:
=== Lemma 2.1 ===
{{:Space of Somewhere Differentiable Continuous Functions on Closed Interval is Meager in Space of Continuous Functions on Closed Interval/Lemma 2/Lemma 2.1}}{{qed|lemma}}
Fix $\tuple {n, m} \in \N^2$. 
By Lemma 2.1, $A_{n, m}$ is closed in $\struct {\map \CC I, d}$.
Therefore by the second definition of nowhere dense, we aim to show that: 
:$A_{n, m}$ contains no non-empty open sets of $\struct {\map \CC I, d}$.
From Set is Open iff Union of Open Balls:
:the open sets of $\struct {\map \CC I, d}$ are precisely the unions of the open balls of $\struct {\map \CC I, d}$.
Therefore, it suffices to show that:
:$A_{n, m}$ contains no non-empty open balls of $\struct {\map \CC I, d}$.
Let $f \in \map \CC I$ and $\epsilon > 0$.
Consider the open ball $\map {B_\epsilon} f$.
We aim to show that:
:there exists $g \in \map {B_\epsilon} f$ such that $g \not\in A_{n, m}$.
This ensures that: 
:$\map {B_\epsilon} f$ is not contained in $A_{n, m}$.
From Space of Piecewise Linear Functions on Closed Interval is Dense in Space of Continuous Functions on Closed Interval:
:there exists a continuous piecewise linear function $p: I \to \R$ such that $\map d {f, p} < \dfrac \epsilon 2$.
From Piecewise Linear Function is Differentiable except on Finitely Many Points:
:$p$ is differentiable on $I$ except at finitely many points $\set {c_1, c_2, \ldots, c_n}$.
Further:
:the derivative of $p$ takes finitely many values.
Therefore:
:there exists a real number $M > 0$ such that $\size {\map {p'} x} < M$
for each $x$ such that $p$ is differentiable.
Let $k \in \R$ be such that:
:$k > \dfrac {2 \paren {M + n} } \epsilon$
Let $\phi: I \to \R$ be a piecewise linear function such that: 
:$\map \phi x = \begin {cases} k x - n & : \dfrac n k \le x \le \dfrac {n + 1} k, n \text { is an even integer} \\ -k x + \paren {1 + n} & : \dfrac n k \le x \le \dfrac {n + 1} k, n \text { is an odd integer} \end {cases}$
then:
:$\size {\map \phi x} \le 1$ and $\size {\map {\phi'} x} = k$ for each $x$ for which $p$ and $\phi$ are differentiable.
Now, define $g: I \to \R$ to have: 
:$\map g x = \map p x + \dfrac \epsilon 2 \map \phi x$
for each $x \in I$.
We then have: 
{{begin-eqn}}
{{eqn | l = \norm {g - p}_\infty
      | r = \frac \epsilon 2 \norm \phi_\infty
}}
{{eqn | r = \frac \epsilon 2 \sup_{x \mathop \in I} \size {\map \phi x}
      | c = {{Defof|Supremum Norm}}
}}
{{eqn | o = \le
      | r = \frac \epsilon 2
      | c = since $\size {\map \phi x} \le 1$
}}
{{end-eqn}}
We therefore have: 
{{begin-eqn}}
{{eqn | l = \norm {g - f}_\infty
      | o = \le
      | r = \norm {g - p}_\infty + \norm {p - f}_\infty
      | c = Supremum Norm is Norm
}}
{{eqn | o = <
      | r = \epsilon
}}
{{end-eqn}}
So $g \in \map {B_\epsilon} f$. 
We now show that $g \not \in A_{n, m}$. 
Let $x \in I$ be a point at which $\phi$ and $p$ are both differentiable.
Then $g$ is differentiable at $x$, with:
:$\size {\map {g'} x} = \size {\map {p'} x + \dfrac \epsilon 2 \map {\phi'} x}$
Since $\size {\map {p'} x} < M$ and $k > \dfrac {2 \paren {M + n} } \epsilon$, we have: 
{{begin-eqn}}
{{eqn | l = \size {\map {p'} x + \frac \epsilon 2 \map {\phi'} x}
      | o = \ge
      | r = \size {\size {\map {p'} x} - \frac \epsilon 2 \size {\map {\phi'} x} }
}}
{{eqn | r = \size {\size {\map {p'} x} - \frac {k \epsilon} 2}
}}
{{eqn | o = >
      | r = \size {\size M - \size {M + n} }
}}
{{eqn	| r = n
}}
{{end-eqn}}
From the definition of the derivative, there exists some real $\delta > 0$ such that: 
:$\size {\dfrac {\map g t - \map g x} {t - x} } > n$
for all $t$ such that $0 < \size {t - x} < \delta$. 
In particular, we cannot have: 
:$\size {\dfrac {\map g t - \map g x} {t - x} } \le n$
for all $t$ such that $0 < \size {t - x} < \dfrac 1 m$. 
Now, let $x \in I$ be a point for which one of $\phi$ or $p$ are not differentiable.
Recall that there are only finitely such $x$.
Since the set: 
:$\set {t \in I: 0 < \size {t - x} < \dfrac 1 m}$
is not finite, it contains an element $t^*$ such that $\phi$ or $p$ are differentiable, for which we have: 
:$\size {\dfrac {\map g {t^*} - \map g x} {t^* - x} } > n$
So, for any $x \in I$ there exists $t$ with $0 < \size {t - x} < \dfrac 1 m$ such that: 
:$\size {\dfrac {\map g t - \map g x} {t - x} } > n$
We conclude that $g \not \in A_{n, m}$.
{{qed}}
Category:Space of Somewhere Differentiable Continuous Functions on Closed Interval is Meager in Space of Continuous Functions on Closed Interval
4z5koo1cxcyzxg2dkfh4taoo7hfd87t