I am trying to write up a detailed proof for the following statement:
Let $F: \mathbb{R} \rightarrow \mathbb{R}$ be continuous. Then $$D^{+}(F)(x) := \limsup_{h \to 0^{+}} \frac{F(x+h) - F(x)}{h}$$ is measurable.
(Note: This question has been asked a few years ago here, but I would like to solicit feedback on my particular proof. I also have specific questions/concerns about this proof that were not addressed in the linked post. For these reasons, I feel this merited a separate post...)
My attempt:
To ease notation, let $\Delta_h F(x) := \frac{F(x + h) - F(x)}{h}$ for $h \neq 0$. By unravelling the definition of $\limsup\limits_{h \to 0^{+}}$, we have
\begin{align*}
D^{+}(F)(x) &= \limsup_{h \to 0^{+}} \Delta_h F(x) \\[5pt]
&= \lim_{\delta \to 0^{+}} \left( \sup\left\{\Delta_h F(x): h \in B_{\delta}(0) \cap (0,\infty) \setminus \{0\} \right\} \right) \\[5pt]
&= \lim_{\delta \to 0^{+}} \sup_{h \in (0,\delta)} \Delta_h F(x).
\end{align*}
I now claim (with some wariness--see my question below) that \begin{align*} \hspace{2cm} \lim_{\delta \to 0^{+}} \sup_{h \in (0,\delta)} \Delta_h F(x) = \lim_{\delta \to 0^{+}} \sup_{h \in (0,\delta) \cap \mathbb{Q}} \Delta_h F(x) \hspace{2cm} (\star) \end{align*}
Now for each $\delta > 0$, let $\{h_n^{\delta}\}_{n=1}^{\infty}$ be an enumeration of $(0,\delta) \cap \mathbb{Q}$. Then we have
$$ \sup_{h \in (0,\delta) \cap \mathbb{Q}} \Delta_h F(x) = \sup_{n \in \mathbb{N}} \Delta_{h_n^{\delta}} F(x)$$
for all $x \in \mathbb{R}$ and all $\delta > 0$. And since $F$ is continuous, the function $x \mapsto \Delta_{h_{n}^{\delta}} F(x) = \frac{F(x + h_n^{\delta}) - F(x)}{h_n^{\delta}}$ is clearly continuous for all $h_n^{\delta}$, and hence measurable. It follows that $G_{\delta}(x) := \sup_{n \in \mathbb{N}} {\Delta_{h_n^{\delta}}} F(x)$ is measurable because the supremum of a sequence of measurable functions is measurable. Now let $\{\delta_n\}_{n=1}^{\infty}$ be a sequence in $(0,\infty)$ such that $\delta_n \to 0$. We then have $$ D^{+}(F)(x) = \lim_{\delta \to 0^{+}} G_{\delta}(x) = \lim_{n \to \infty} G_{\delta_n}(x). $$
And so finally, $D^{+}(F)(x)$ is measurable because the pointwise limit of a sequence of measurable functions is measurable. $\quad \square$
My questions:
1.) Is my proof sound? Any issues, major or minor?
2.) Main question: Is $(\star)$ actually true? My concern with regards to $(\star)$ is: Do we know a priori if $\sup_{h \in (0,\delta)} \Delta_h F(x)$ is finite a.e.? If yes, how would we prove it? (More generally, does the definition of measurability even apply to functions which are $\pm \infty$ on a set of positive measure?)
In the case where $\sup_{h \in (0,\delta)} \Delta_h F(x)$ is assumed to be bounded on $(0,\delta)$ (for some $\delta > 0$), my argument for $(\star)$ is based on the following (more generalized) claim:
Claim: Let $(S,d)$ be a metric space and let $E$ be a dense subset of $S$. If $f: S \rightarrow \mathbb{R}$ is continuous, then $$ \sup_{x \in S} f(x) = \sup_{x \in E} f(x).$$
Proof: Let $\alpha := \sup_{x \in S} f(x)$ and $\alpha' := \sup_{x \in E} f(x)$. Clearly, $\alpha' \leq \alpha$, so we just need to show the reverse inequality. Fix $\epsilon > 0$. Then there is some $x_0 \in S$ such that $f(x_0) > \alpha - \frac{\epsilon}{2}$. Then since $f$ is continuous at $x_0$, there exists some $\delta > 0$ such that \begin{align*} x \in N_{\delta}(x_0) &\implies |f(x_0) - f(x)| < \frac{\epsilon}{2} \\[3pt] &\implies -\frac{\epsilon}{2} < f(x_0) - f(x) < \frac{\epsilon}{2} \\[3pt] &\implies f(x) > f(x_0) - \frac{\epsilon}{2} > \left(\alpha - \frac{\epsilon}{2}\right) - \frac{\epsilon}{2} = \alpha - \epsilon. \end{align*}
Then since $E$ is a dense subset of $S$, there exists some $x_1 \in E \cap N_{\delta}(x_0)$. Hence, $\alpha' \geq f(x_1) > \alpha - \epsilon$, i.e. $\alpha' > \alpha - \epsilon$. And since $\epsilon > 0$ was arbitrary, it follows that $\alpha' \geq \alpha. \quad \square$
Finally: Does this claim & proof look sound?
Some comments:
All presentations I know allow infinite values for the Dini derivatives. Thus, if we say a Dini derivative is measurable or is Baire 2 etc. it is with that understanding.
It is standard to discuss measurability for infinite valued functions with no requirement in general that they are a.e. finite. Of course many theorems work only for functions that are a.e. finite.
I am puzzled as to why the function is claimed to be BV? The only explanation for me is that your text wants measurable functions to be a.e. finite. In that case you need to know that BV functions are differentiable a.e. and hence the set of points where any of the Dini derivatives is infinite is measure zero. Seems to complicate things.
Compare your proof to a model proof below and then consider how you might have made yours simpler.
For comparison here is a proof from A.M. Bruckner, Differentiation of Real Functions, Chapter 4, page 41. This shows that the Dini derivatives of a continuous function are not only measurable, and Borel measurable, they are in the second Baire class. In fact this can be used to show that if $F$ is in Baire class $\alpha$ then the Dini derivatives are in Baire class $\alpha +2$.
Theorem 2.2 If $F$ is continuous on $[a,b]$ then each of the Dini derivatives is in Baire class 2.
Proof. For each positive integer $n$ let $$ F_n(x) = \sup_{t\in [a,b]} \left\{ \frac{F(t)-F(x)}{t-x}: x + 1/(n+1) < t < x+ 1/n\right\}.$$
Since $F$ is continuous, each function $F_n$ is also continuous. It is easy to verify that $D^{+}(F)(x) = \limsup_{n\to\infty} F_n(x)$. But an upper limit of continuous functions is in Baire class 2. QED
In Theorem 2.1 he proves that if $F$ is measurable the Dini derivatives are measurable, but the proof is not this simple.