# Show that a function is monotone and its set of discontinuities is equal to a sequence.

Let $$(a_n)_{n\geq 1}$$ be a sequence with $$a_n \in [0,1]$$ for all $$n \geq 1$$.

Show that $$f\colon[0,1]\to [0,1], \quad f(x) = \sum_{\{k : a_k\leq x \}}2^{-k-1}$$

is a monotone function and that the set of its discontinuities is equal to $$(a_n)_{n\geq 1}$$.

I tried around with some sequences and think that the function starts at 0, is monotonically increasing and is constant until x is equal to the next highest element of the sequence and then it jumps to a higher value. But I don't know where to start to prove it, could someone provide me a hint?

Suppose $$x,y \in [0,1]$$ with $$x \leq y$$. Then we clearly have $$\{k : a_k\leq x\} \subseteq \{k : a_k \leq y\}$$. This means $$\sum_{\{k : a_k\leq x \}}2^{-k-1}\leq \sum_{\{k : a_k\leq y \}}2^{-k-1}$$, and so $$f(x) \leq f(y)$$.
As for the set of discontinuities your intuition seems on the right track (except for the "starts at $$0$$" bit) but unless we change how either the sequence or function are defined, we can merely say that the set of discontinuities of $$f$$ is contained in the range of the sequence $$\{a_n\}_{n=1}^\infty$$. Why? Consider the problem as if $$\{a_n\}_{n=1}^\infty$$ has no nonzero term or even just a finite number of nonzero terms.
• for instance if the sequence $\{a_n\}_{n=1}^\infty$ has no nonzero term, then $f \equiv \frac12$. – Matt A Pelto Jan 22 at 19:12