I recently encountered the following function, defined in terms of the (standard, middle-thirds) Cantor set $\mathcal{C}$, on the domain $[0,1]$: $$f(x) = \min\{y \in \mathcal{C}: y \geq x\}$$ Since the Cantor set is compact, and $[x,1]$ is compact for any $x \in [0,1]$, then $\mathcal{C} \cap [x,1]$ is also compact; and then the function above should be well-defined with the minimum (rather than infimum). I think it should also have the following properties:
- It is non-decreasing
- It is discontinuous at the Cantor ``end-points'': i.e., numbers that can be written as an integer divided by a power of 3. This is a countably infinite set of points.
- It satisfies $f(x) = x$ if and only if $x \in \mathcal{C}$.
- Because of (1), it has at most countably many discontinuities.
My question is: is this function continuous for any $x$ that is not a Cantor end-point? And, if so, how do I square that with my geometric intuition that the function should "jump up" (i.e, have a discontinuity) any time it reaches a point that is not in the Cantor set? (The meta-question, of course, is whether my construction is invalid or any of my 1-4 are incorrect)
Thank you so much in advance!