# Need help in understanding proof of continuity of monotone function

I am reading the following proof of a proposition from Royden+Fitzpatrick, 4th edition, and need help in understanding the last half of the proof. (My comments in italics.)

Proposition: Let $A$ be a countable subset of the open interval $(a,b).$ Then there is an increasing function on $(a,b)$ that is continuous only at points in $(a,b)$ ~ $A.$

Proof: If $A$ is finite the proof is clear. Assume $A$ is countably infinite. Let $\{q_n\}_{n=1}^{\infty}$ be an enumeration of $A.$ Define the function $f$ on $(a,b)$ by setting $$f(x) = \sum\limits_{\{n|q_n \leq x\}} \frac{1}{2^n} \ \mathrm{for \ all} \ a<x<b,$$ where the sum over the empty set is zero.

Since a geometric series with a ratio less than $1$ converges, $f$ is properly defined. Moreover,

$$\mathrm{if} \ a<u<v<b, \ \mathrm{then} \ f(v)-f(u) = \sum\limits_{\{n|u<q_n \leq v\}} \frac{1}{2^n}. \ \ \ \ \ \ \ \ \ \ \ (1)$$

Thus $f$ is increasing.

I follow so far.

Let $x_0 = q_k$ belong to $A.$ Then by (1), $$f(x_0)-f(x) \geq \frac{1}{2^k} \ \mathrm{for \ all} \ x<x_0.$$ Therefore $f$ fails to be continuous at $x_0.$ Now let $x_0$ belong to $(a,b)$ ~ $A.$ Let $n \in \mathbb{N}.$ There is an open interval $J$ containing $x_0$ for which $q_n$ does not belong to $J$ for $1 \leq k \leq n.$ We infer from (1) that $|f(x)-f(x_0)|<1/2^n$ for all $x \in J.$ Therefore $f$ is continuous at $x_0.$

Why are the claims of $f$ continuous/discontinuous true? I need some clarification.

## 1 Answer

Look at the set $(a,b)-A$. WLOG we can assume the enumeration $\{q_n\}$ of $A$ is increasing, so that $q_n<q_{n+1}$ for all $n$. Then, $(a,b)-A = (a,q_1)\sqcup (q_1,q_2)\sqcup\ldots$.

Now, the function given is constant on each of the intervals $(q_n,q_{n+1})$, so is continuous on each interval individually, and jumps by $\frac{1}{2^{n+1}}$ at $x_0 = q_{n+1}$, causing the implied discontinuity at each point $x_0\in A$.

• That makes sense. What about for $f$ being continuous at $x_0 \in (a,b)$ ~ $A$? – arabhi manachra Apr 18 '15 at 14:34
• Since $f$ is constant on each of the intervals $(q_i,q_{i+1})$, it is continuous on each of them, since constant functions are continuous. Now, each $x\in (a,b)-A$ lives in one of these intervals, so $f$ is continous at $x$. Thus, $f$ is continuous on all of $(a,b) - A$. – WSL Apr 18 '15 at 14:37