Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I read in a textbook, which had seemed to have other dubious errors, that one may construct a monotone function with discontinuities at every point in a countable set $C \subset [a,b]$ by enumerating the points as $c_1, c_2, \dots$ and defining $f(x) = \sum_{c_n < x}2^{-n}$. However, if seems that if we let $[a,b] = [0,1], C = \mathbb{Q} \cap [0,1]$, then $f(x)$ is constant $1$ everywhere except 0, an apparent counterexample.

So my question is: how does one construct a monotonic function which has discontinuities precisely on a countable set $C$? Further, are there any relatively easy-to-visualize constructions?

share|cite|improve this question
"then f(x) is constant 1 everywhere except 0" - I don't think this claim is correct. In fact, $f$ will be strictly smaller than 1 everywhere. – Srivatsan Oct 2 '11 at 19:14
What are the summation limits and index on the example? – Drew Christianson Oct 2 '11 at 19:15
I see. This depends on the enumeration. Great! Question answered. – JeremyKun Oct 2 '11 at 19:26
Since $\sum_{n=10}^\infty 2^{-n}$ is so small, you can see almost exactly what your function will look like if you plot it (with Matlab, say) using only the ten first rationals in your enumeration. – Samuel Oct 2 '11 at 19:38
up vote 16 down vote accepted

The construction is correct. I’ll use your example as an illustration. Let $\{q_n:n\in\omega\}$ be an enumeration of $\mathbb{Q}\cap [0,1]$, and let $f(x)=\sum\limits_{q_n<x}2^{-n}$ for $x\in [0,1]$.

First consider what happens at some $q_m$: $$\lim\limits_{x\to {q_m}^-}f(x) = \sum_{q_n<q_m}2^{-n}=f(q_m),$$ because as $x$ moves up towards $q_m$, $\{q_n:q_n<x\}$ includes more and more of the rationals less than $q_m$. Thus, $f$ is continuous from the left at $q_m$, but for every $x>q_m$ we have $$f(x)=\sum_{q_n<x}2^{-n} \ge \sum_{q_n\le q_m}2^{-n} = f(q_m)+2^{-m},$$ so $f$ jumps by at least $2^{-m}$ at $q_m$. In fact $$\lim_{x\to {q_m}^+}f(x) = f(q_m)+2^{-m},$$ and the jump is exactly $2^{-m}$.

At each irrational $a \in [0,1]$, however, $f$ is easily seen to be continuous: $$\lim_{x\to a^-}f(x) = \lim_{x\to a^+}f(x) = \sum_{q_n<x}2^{-n}=f(x).$$

share|cite|improve this answer
Yes. My confusion was in that the enumeration changes what the function looks like. – JeremyKun Oct 2 '11 at 19:44
@Bean: That it does, very definitely. So you get a bonus: since there are $2^\omega$ enumerations of a countably infinite set, you get $2^\omega$ examples for a given set of points of discontinuity for the price of one. :-) – Brian M. Scott Oct 2 '11 at 19:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.