# Proof Clarification for Cantor Function is Holder Continuous

This is a follow up from the post: Cantor Function Clarification.

For convenience I will copy the definition here again:

Recall the Cantor set $$C \subseteq [0, 1]$$ is compact, has Hausdorff dimension $$\alpha = \frac{\ln 2}{\ln 3}$$ and $$H^\alpha$$ denotes the Hausdorff measure of dimension $$\alpha$$. We define the Cantor function as: $$f(x) = \frac{H^\alpha(C \cap [0, x])}{H^\alpha(C)}.$$ Intuitively, this is the fraction of the Cantor set that lies to the left of $$x$$. Now define the function $$g(x) = \inf\{ y: f(y) = x \}.$$ It can be observes that $$f(g(x)) = x$$ as $$f$$ is increasing and continuous and thus the infimum is achieved.

I would now like to show the Cantor function is, in fact, Holder continuous with exponent $$\alpha$$. Here is the short proof on the lecture note I would like to understand:

Let $$x, y \in [0, 1]$$ with $$x \leq y$$ and let $$a = f(x), b = f(y)$$. If $$a = b$$ we are done so we assume $$a < b$$. Thus $$x < y$$ as $$f$$ is nondecreasing. Let $$y - x > \frac{1}{3^n}$$. Say $$x \in [\frac{k}{3^n}, \frac{k + 1}{3^n})$$. Then we have $$|b - a| \leq |f(\frac{k}{3^n}) - f(\frac{k + 2}{3^n})| \leq \frac{2}{2^n} = 2 (\frac{1}{3^n})^{\log_3 2} = 2|y - x|^{\log_3 2}.$$ This proves Holder continuity of $$f$$.

I am not very familar with the other constructions of Cantor sets and it seems like the lecture note might be using the other constructions? I am not sure if this follows from the Hausdorff measure construction. Why are we assuming $$y - x > \frac{1}{3^n}$$ here and why does it suffice to consider $$x \in [\frac{k}{3^n}, \frac{k + 1}{3^n})$$? The first two inequality below also does not make sense to me at all. Any clarification would be great. (While the lecture note doesn't mention any other construction of Cantor function, I don't mind introducing other constructions here as well, as long as the logic here can be made clear to me.)

Since $$y-x>0$$, you can always choose $$n$$ such that $$\frac1{3^{n-1}}\geq y-x>\frac1{3^n}$$. And the numbers of the form $$\frac{k}{3^n}$$ for a partition of $$[0,1]$$; since $$x\in [0,1]$$, there will be some $$k$$ such that $$\frac k{3^n}\leq x<\frac{k+1}{3^n}$$. Then you have $$y This gives us, using that $$f$$ is monotone, \begin{align} |b-a|=b-a=f(y)-f(x)\leq f(\frac{k+4}{3^n})-f(\frac{k}{3^n}) \end{align} It remains to see why this difference should be bounded by some constant times $$2^{-n}$$. Possibly the most concrete way to write the Cantor function is the following:
Write $$x\in[0,1]$$ in base $$3$$, with the convention that if the last digit of the representation is 1, it is replaced with $$02222\cdots$$ (for instance, we write $$0.02222\cdots_3$$ instead of $$0.1$$ for $$x=\frac13$$). To obtain $$f(x)$$, if there is a digit $$1$$ in the representation of $$x$$, erase the rest of the digits after the leftmost $$1$$. After that, replace all $$2$$ with $$1$$, and read the result in base 2. For instance, $$f(\frac{23}{81})=f(0.0212_3)=f(0.021_3)=0.011_2=\frac14+\frac18=\frac38.$$ The numbers $$\frac{k+4}{3^n}$$ and $$\frac{k}{3^n}$$ differ by $$\frac4{3^n}=\frac1{3^{n-1}}+\frac1{3^n}\leq\frac2{3^{n-1}}=0.\overbrace{0\cdots0}^{n-2}2_3^{\vphantom3}$$. This means that their first $$n-2$$ digits will agree. Thus, recalling that the values of $$f$$ are interpreted in base 2, $$f(\frac{k+4}{3^n})-f(\frac{k}{3^n})\leq 0.\overbrace{0\cdots0}^{n-2}1_2^\vphantom2=\frac1{2^{n-1}}=\frac2{2^n}.$$