I would like to prove the following:

Let $g$ be a monotone increasing function on $[0,1]$. Then the set of points where $g$ is not continuous is at most countable.

My attempt:

Let $g(x^-)~,g(x^+)$ denote the left and right hand limits of $g$ respectively. Let $A$ be the set of points where $g$ is not continuous. Then for any $x\in A$, there is a rational, say, $f(x)$ such that $g(x^-)\lt f(x)\lt g(x^+)$. For $x_1\lt x_2$, we have that $g(x_1^+)\leq g(x_2^-)$. Thus $f(x_1)\neq f(x_2)$ if $x_1\neq x_2$. This shows an injection between $A$ and a subset of the rationals. Since the rationals are countable, $A$ is countable, being a subset of a countable set.

Is my work okay? Are there better/cleaner ways of approaching it?

  • 25,533
  • 7
  • 83
  • 140
  • 1,271
  • 2
  • 9
  • 6
  • Related posts: [56831](http://math.stackexchange.com/questions/56831/) and [14458](http://math.stackexchange.com/questions/14458/). – Srivatsan Nov 23 '11 at 07:15
  • 5
    This is the standard proof. It looks fine to me, except that I'd call $f$ an injection "of $A$ into the rationals", rather than "between $A$ and a subset of the rationals". – Robert Israel Nov 23 '11 at 07:19
  • 1
    @RobertIsrael: Thanks. Point well noted. – AKM Nov 23 '11 at 13:50
  • @Srivatsan: Thanks for the links – AKM Nov 23 '11 at 13:50
  • 1
    you have writen g(x+) –  Apr 05 '12 at 04:42
  • Isn't the Cantor function a counterexample to this?! https://en.wikipedia.org/wiki/Cantor_function It is always increasing on $[0,1]$ and it has uncountably many discontinuities! – Zim Jul 02 '20 at 21:37
  • @Zim The cantor function doesn't have any discontinuities. Check the article you linked. – Michael Zamora Sep 04 '20 at 13:35
  • @user516079 Ok cool, thanks for pointing that out! – Zim Sep 04 '20 at 13:47
  • Hi, is it possible for you to extend the attempt and explain why $g(x^+_1)\leq g(x_2^-)$? I encountered the same problems but I was confused. I know $g(x_1)\leq g(x_2)$ but why it is also true for the limiting points? – JoZ Oct 18 '20 at 23:25

4 Answers4


This looks beautiful to me: or, more truthfully, it looks like exactly what I would write.

If anything else can be asked of this argument, maybe it is a justification that monotone functions have discontinuities as you have described. I happen to have recently written this up in lecture notes for a "Spivak calculus" course: see $\S 3$ here. Although the fact is quite well known, many texts do not treat it explicitly. I think this may be a mistake: in the the same section of my notes, I explain how this can be used to give a quick proof of the Continuous Inverse Function Theorem.

Martin Sleziak
  • 50,316
  • 18
  • 169
  • 342
Pete L. Clark
  • 93,404
  • 10
  • 203
  • 348
  • Where did we use that $f$ is defined on $[0,1]$? Would the argument work if $f$ is defined on $\mathbb{R}$? Thank you. – Leo Feb 23 '14 at 07:56
  • 3
    The argument would work for functions defined on any interval in $\mathbb{R}$. – Pete L. Clark Feb 23 '14 at 17:04
  • 1
    the link is doesn't exist anymore. – Bhaskar Vashishth Aug 12 '15 at 20:22
  • I don't understand how can we define $f(x)\in \Bbb{Q}$, to define the injection $\phi$ we said that for any $x\in A\mapsto q$ where $q$ is a rationnel between right limit and left, but how can we define $q$ 'formally'? – JeSuis Sep 07 '16 at 18:46
  • @JeSuis: Given a bijection $\mathbb{Z}^+ \rightarrow \mathbb{Q}$, you could choose the $x_n$ lying in the interval so as to minimize $n$. But, honestly, I think it would be better if you were happy not making such a definitive choice: it does not matter for the argument, so why worry about it? – Pete L. Clark Sep 07 '16 at 18:59
  • I was just tormented on how can I write the injective map formally, thanks. – JeSuis Sep 07 '16 at 19:37
  • Isn't the cantor function a counterexample here? It's increasing on $[0,1]$ and has uncoutnably many discontinuities! Do y'all mean strictly increasing here?https://en.wikipedia.org/wiki/Cantor_function – Zim Jul 02 '20 at 21:39
  • @Zim: you are confusing discontinuities with points of nondifferentiability. The Cantor function is continuous everywhere. There is another theorem (of Lebesgue, I believe) that an increasing function is differentiable *almost everywhere* and as you point out, the exceptional set may be uncountable. – Pete L. Clark Jul 10 '20 at 22:32
  • @PeteL.Clark Cool, thanks for the clarification! – Zim Jul 10 '20 at 23:20

Just for slight variation, another proof.

Assume $f:[a,b]\to \mathbb R$ is monotonically increasing and let $D$ be its set of discontinuities. For every $x\in D$ let $c_x=\lim_{t\to x+}f(t)-\lim_{t\to x-}f(t)$ (since $f$ is monotone the one-sided limits exist (and are finite)). As $x$ was a point of discontinuity it follows that $c_x>0$. Now, let $S$ be the sum of all $c_x$. More formally, consider the set $T$ of all finite sums of elements of the form $c_x$, and let $S$ be its supremum.

Now, for every finite sum $s=c_{x_1}+ \cdots +c_{x_n}$ (we may assume the points $x_i$ appear in their natural order in $[a,b]$) using monotonicity of $f$ it follows that the total variation of $f$, that is $f(b)-f(a)$, is not less than the sum $s$ (intuitively, because that sum is the sum of total variations at points along the way from $a$ to $b$). In symbols: $s\le f(b)-f(a)$. It follows that the supremum also satisfies $S\le f(b)-f(a)$. But a sum of infinitely many positive elements can be bounded only if there are countably many elements. Thus, $D$ is countable.

Ittay Weiss
  • 76,165
  • 7
  • 131
  • 224
  • "But a sum of infinitely many positive elements can be bounded only if there are countably many elements"- why? Can you give a rigorous proof? –  Sep 06 '15 at 12:51
  • 2
    @user170039 for every $n>1$ there can be only finitely many elements $s$ satisfying $s>1/n$. – Ittay Weiss Sep 06 '15 at 22:41
  • But what if for each $n$ there are $n+1$ elements in $[\frac{1}{n+1}, \frac{1}{n}]$. And what even is a sum of uncountably many elements? Can you define it? – H.v.M. Jun 07 '17 at 19:18

I would suggest you use the axiom of choice to find a unique $f(x)$ for any $x\in A$. Indeed, you can define $Q(x)=\{F_x\in \mathbb{Q}: g(x^-)<F_x<g(x^+)\}$ for all $x\in A$. Then notice that: 1) $Q(x)\neq \emptyset~\forall x\in A$, 2) $Q(x)\cap Q(y)=\emptyset~\forall x\neq y$ in $A$. 1) implies, by the axiom of choice that there is a function $f:A\to \cup_{x\in A}Q(x)\subset \mathbb{Q}$ such that $f(x)\in Q(x)$ for all $x\in A$ and 2) implies that this function is an injection.

  • 41
  • 1

For $n \geq 2$ let $$A_n := \{x \in [0+1/n,1-1/n] : \lim_{h \to 0} g(x+h)-g(x-h) \geq 1/n \}.$$ $A_n$ is finite since otherwise $g$ would be infinite at $x=1-1/n$. We also have that the set, $A$, of all dicontinuities is the union of all $A_n$. Finally use the fact that the countable union of finite sets is itself countable.

  • 375
  • 1
  • 9