TITLE: Is there an everywhere discontinuous increasing function?
QUESTION [16 upvotes]: Does there exist a function $f : \mathbb{R} \rightarrow \mathbb{R}$ that is strictly increasing and discontinuous everywhere?
My line of thought (possibly incorrect): I know there are increasing functions such as $f(x) = x$, and there are everywhere-discontinuous functions such as the Dirichlet function. I also know that when there is a discontinuity at a point $c$, there is a finite gap $\epsilon$ such that there are points $d$ arbitrarily close to $c$ such that $|f(d) - f(c)| > \epsilon$. This is where my thinking gets unclear - does it make sense to have a "gap" at every real number?

REPLY [13 votes]: Another way to see that it is impossible to have uncountably many of these "gaps" is to first consider the restriction of $f$ to a bounded interval $(a,b)$, where it is bounded.  If $\varepsilon>0$, the number of points in $(a,b)$ where there is a gap of size greater than $\varepsilon$ is finite, less than $\frac{1}{\varepsilon}(f(b)-f(a))$.  Taking countably many $\varepsilon$s going to zero allows you to conclude that there are only countably many discontinuities in $(a,b)$.  Taking countably many $(a,b)$s whose union is $\mathbb R$ allows you to finish.