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?