Prove that jump functions are measurable This question comes from the exercises of Stein and Shakarchi's Real analysis Ex. 5.14.
Define 
$$
    j_n(x)= 
\begin{cases}
    0& \text{if } x< x_n\\
    \theta_n              & \text{if } x=x_n\\
    1  &\text{if } x>x_n
\end{cases}
$$
where $\{x_n\}$ is a sequence of real number and $0\le\theta_n\le 1$.
Further define 
$$J(x)=\sum^{\infty}_{n=1}\alpha_nj_n(x)$$
where $\alpha_n>0$ and $\sum\alpha_n$ converges.
Prove that for any $\epsilon$, the set of $x$ satisfying 
$$\limsup_{h\to0}\frac{J(x+h)-J(x)}{h}>\epsilon$$
is measurable.

So far what I can prove is that the sum in $J(x)$ can converge absolutely. And I know the limit of measurable functions is measurable. However, Since $J$ is not continuous, I cannot assume $h\to0$ as $\frac1n;n\to\infty$, then I cannot figure out whether the above set is measurable.

Edit: There is a hint in the book: consider $$F^N_{k,m}(x)=\sup_{1/k\le|h|\le1/m}\left|\frac{J_N(x+h)-J_N(x)}{h}\right|$$
where $J_N$ is the $N^{\text{th}}$ partial sum of $J$
Show that $F^N_{k,m}$ is measurable (which I couldn't tell why) and so does
 $$\lim_{m\to\infty}\lim_{k\to\infty}\lim_{N\to\infty}F^N_{k,m}(x)$$
(Which I also cannot relate it to the original set because I am confused of the multiple limit and supremum)
 A: For brevity, write
$$\Delta(x,h) := \frac{J(x+h)-J(x)}{h} \qquad \text{and} \qquad \Delta_n(x,h) := \frac{J_n(x+h)-J_n(x)}{h} $$

Step 1: By definition of limsup, we have
$$\begin{align*} \limsup_{h \to 0} \Delta(x,h) > \epsilon &\iff \forall m \in \mathbb{N} \, \exists h \in \left[- \frac{1}{m}, \frac{1}{m} \right] \backslash \{0\}: \Delta(x,h) > \epsilon \\ &\iff \forall m \in \mathbb{N} \, \exists k \geq m \, \exists h \in \left[- \frac{1}{m}, \frac{1}{m} \right] \backslash \left(- \frac{1}{k}, \frac{1}{k} \right): \Delta(x,h)>\epsilon \\ &\iff  \forall m \in \mathbb{N} \, \exists k \geq m: \sup_{\frac{1}{k} \leq |h| \leq \frac{1}{m}} \Delta(x,h)>\epsilon. \end{align*}$$
This shows that
$$\{x; \limsup_{h \to 0} \Delta(x,h)>\epsilon\} = \bigcap_{m \in \mathbb{N}} \bigcup_{k \geq m} \bigg\{x; \sup_{\frac{1}{k} \leq |h| \leq \frac{1}{m}} \Delta(x,h)>\epsilon \bigg\}.$$
Consequently, it suffices to prove that for each fixed $k,m \in \mathbb{N}$ and $\epsilon>0$ the set
$$A := A_{k,m,\epsilon} := \bigg\{x; \sup_{\frac{1}{k} \leq |h| \leq \frac{1}{m}} \Delta(x,h)>\epsilon \bigg\} \tag{1}$$
is measurable.

Step 2: We claim that $$A = \bigcup_{\ell \in \mathbb{N}} \bigcup_{N \in \mathbb{N}} \bigcap_{n \geq N} \bigg\{x; \sup_{\frac{1}{k} \leq |h| \leq \frac{1}{m}} \Delta_n(x,h)> \epsilon + \frac{1}{\ell} \bigg\}. \tag{2}$$
For brevity of notation, we set $$I := I_{k,m} := \left[- \frac{1}{m}, \frac{1}{m} \right] \backslash \left(- \frac{1}{k}, \frac{1}{k} \right).$$
Proof: Let $x \in A$, then $\sup_{\frac{1}{k} \leq |h| \leq \frac{1}{m}} \Delta(x,h)>\epsilon$. By the definition of $\sup$, we can find $h \in I$ such that $\Delta(x,h)>\epsilon$. In particular, there exists $l \in \mathbb{N}$ such that $\Delta(x,h) > \epsilon + \frac{2}{\ell}$. As $\Delta(x,h) = \lim_{n \to \infty} \Delta_n(x,h)$, we have $\Delta_n(x,h) \geq \epsilon+ \frac{1}{\ell}$ for all $n$ sufficiently large. This proves "$\subseteq$".
Now let $x$ be an element of the right-hand side of $(2)$. Then there exist $\ell ,N \in \mathbb{N}$ such that $$\sup_{\frac{1}{k} \leq |h| \leq \frac{1}{m}} \Delta_n(x,h)> \epsilon + \frac{1}{\ell}$$ for all $n \geq N$. By the definition of $\sup$, we can find $h(n) \in I$ such that $$\Delta_n(x,h(n))> \epsilon + \frac{1}{\ell}. \tag{3}$$ Since $I$ is compact, there exists a convergent subsequence $h_n \to h \in I$. Choose $n=n(x) \geq N$ sufficiently large such that $$|J_n(x)-J(x)| \leq \frac{1}{2k \ell}.$$ This implies $$\frac{|J_n(x)-J(x)|}{h} \leq \frac{1}{2\ell}$$ for all $h \in I$; hence in particular for $h=h_n$. Combining this with $(3)$, we get
$$\begin{align*} \frac{J_n(x+h_n)-J(x)}{h_n} &= \frac{J_n(x+h_n)-J_n(x)}{h_n} + \frac{J_n(x)-J(x)}{h_n}\\ &\geq \epsilon + \frac{1}{\ell} - \frac{1}{2\ell} = \epsilon + \frac{1}{2\ell} > \epsilon. \end{align*} \tag{4}$$
Finally, we note that $J_n(y) \leq J(y)$ implies
$$\epsilon \stackrel{(4)}{<} \frac{J_n(x+h_n)-J(x)}{h_n}  \leq \frac{J(x+h_n)-J(x)}{h_n} = \Delta(x,h_n).$$
Consequently, $$\sup_{\frac{1}{k} \leq |h| \leq \frac{1}{m}} \Delta(x,h) \geq \Delta(x,h_n) > \epsilon,$$ i.e. $x \in A$.

Step 3: Recall that we actually want to show that $A$ defined in $(1)$ is measurable. By the second part, it suffices to show that sets of the form $$ B := B_{N,n,k,m,\epsilon} := \left\{x; \sup_{\frac{1}{k} \leq |h| \leq \frac{1}{m}} \Delta_n(x,h)> \epsilon  \right\}$$ are measurable.
To show this, we use the following elementary result:

Lemma: Let $f: (a,b) \to \mathbb{R}$ be of the form $f = \frac{f_1}{f_2}$ where $f_1$ is increasing and $f_2 \neq 0$ continuous. Then $$\limsup_{\mathbb{Q} \ni q \downarrow x} f(q) \geq f(x)$$ for any $x \in (a,b)$.

Since the mapping $h \mapsto J_n(x+h)-J_n(x)$ is increasing, we may apply the previous result to obtain $$\sup_{\frac{1}{k} \leq |h| \leq \frac{1}{m}} \Delta_n(x,h) = \sup_{(\mathbb{Q} \cap I) \cup \{\frac{1}{m}\}} \Delta_n(x,h) \tag{5}$$ where $I$ is defined as in step 2. (The inequality "$\geq$" holds in any case, the lemma above gives "$\leq$".) Since $\Delta_n(\cdot,h)$ is measurable, this proves that the left-hand side of $(5)$ is measurable and so is $B$.
A: $J$ is a non-decreasing function, so for any fixed $h\neq 0$ if $q_n\to h$ with $|q_n|\geq |h|$, then
$$\lim_n {J(x+q_n)-J(x)\over q_n} \geq {J(x+h)-J(x)\over h}\geq 0.$$
(Note that the absolute value bars are not necessary.)
Hence for  $m\geq 1$  we have 
$$\sup_{q \in\mathbb{Q},\, 0<|q|<1/m}{J(x+q)-J(x)\over q}=
 \sup_{0<|h|<1/m} {J(x+h)-J(x)\over h},\tag1$$
where $\mathbb{Q}$ means the rational numbers. 
Since $\mathbb{Q}$ is a countable set, equation (1) shows that 
$$\Psi_{m}(x):= \sup_{0<|h|<1/m}{J(x+h)-J(x)\over h}$$
is a measurable map into $[0,\infty].$
Therefore
$$\limsup_{h\to0}{J(x+h)-J(x)\over h}
=\inf_{m\geq 1} 
\Psi_{m}(x)$$
is also measurable into $[0,\infty].$ 
