TITLE: How to show that a set of discontinuous points of an increasing function is at most countable
QUESTION [117 upvotes]: 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?

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