## the Cantor function and some of its properties

Let’s start by definining the Cantor set. Define and . At each step we delete the middle third of all the intervals of to obtain . Note that we obviously have (an easy inductive argument) and . The sets are compact and descending, therefore we can define which is a compact subset of with zero measure and it is called the *Cantor set*.

Since at each step we remove a middle third of all the intervals in , one way to look at the Cantor set is to look at the ternary representation of the points in it. In the first step, we remove all the elements of which have on their first position in the ternary representation. In the second step we remove those (remaining) which have on the second position, and so on. In the end we are left only with elements of which have only digits in their ternary representation. Using this representation we can construct a bijection between and which maps

where if and if . This proves that the Cantor set is uncountable.

We can construct the Cantor function in the following way. Denote the set (i.e. the set removed in step ). On we let . On we have two intervals: on the left one we let and on the right one we let . We continue like this iteratively, at each step choosing constant on each of the intervals which construct such that the constant on an interval is the mean of the values of neighboring interval values.

A precise formula can be given:

where is the first index in the representation for which or if no such index exists.

The Cantor function is monotone by construction (it is also called the devil’s staircase). Since is constant on each interval in each and almost everywhere we conclude that exists almost everywhere in and .

We can deduce from the formula given for that the Cantor function is continuous. Indeed, if then so the difference between and will be of the order with .

Since is monotone, it has bounded variation, and here we can see a pathological example which illustrates the structure of a function with bounded variation. A function with bounded variation in one dimension is a function defined on an interval such that the quantity for all partitions of ( is not fixed).

An equivalent definition is

and in this case there exists a Radon measure such that

The structure theorem for functions of bounded variation says that if has bounded variation then can be splitted into three parts:

- ; (Radon Nikodym with respect to the Lebesgue measure)
- where is the jump part of .
- : the rest, which is called (what a coincidence) the Cantor part of .

Therefore a bounded variation function has a part which behaves as a Sobolev function (the dimensional part), it has a jump part (the dimensional part), and it may have a third part (in between dimensions and ) which usually cannot be well described.

The Cantor function is differentiable almpost everywhere (in ) and for every . The part where is differentiable represents the first component of and we see that . Since is continuous, we do not have a jump part. The only part of the distributional gradient which measures the vertical displacement of is concentrated on the cantor set (which is to be expected, since is constant on every interval outside ) and this is the *Cantor* part of .

Usually the Cantor part is so nasty that we can say very little for these bounded variation functions. In order to obtain a space with nicer properties, the space was introduce, and its definition is exactly the functions such that .

Another interesting property of the Cantor function is that the length of its graph is although the function is increasing, and . Intuitively this seems to be false, since travels mostly horizontally. First notice that is an upper bound. Any curve which increases from to has length at most . Now let’s see that the arclength is at least . First look horizontally: on each the function is piecewise constant, and cover up to a set of measure zero. Therefore the horizontal arclength is . Secondly, must move vertically from to and it does this continuously, so the vertical arclength is also . As a consequence, the arclength of is .