TITLE: Prove that jump functions are measurable
QUESTION [7 upvotes]: 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)

REPLY [3 votes]: $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].$