Let f0(x) = x. Then, for every integer , the next function fn+1(x) will be defined in terms of fn(x) as follows: Let fn+1(x) = , when ; Let fn+1(x) = 1/2, when ; Let fn+1(x) = , when . The three definitions are compatible at the end-points 1/3 and 2/3, because fn(0) = 0 and fn(1) = 1 for every n, by induction. One may check that fn converges pointwise to the Cantor function defined above. Furthermore, the convergence is uniform. Indeed, separating into three cases, according to the definition of fn+1, one sees that If f denotes the limit function, it follows that, for every n ≥ 0, Also the choice of starting function does not really matter, provided f0(0) = 0, f0(1) = 1 and f0 is bounded. Fractal volume The Cantor function is closely related to the Cantor set. The Cantor set C can be defined as the set of those numbers in the interval [0, 1] that do not contain the digit 1 in their base-3 (triadic) expansion, except if the 1 is followed by zeros only (in which case the tail 1000 can be replaced by 0222 to get rid of any 1). It turns out that the Cantor set is a fractal with (uncountably) infinitely many points (zero-dimensional volume), but zero length (one-dimensional volume). Only the D-dimensional volume (in the sense of a Hausdorff-measure) takes a finite value, where is the fractal dimension of C. We may define the Cantor function alternatively as the D-dimensional volume of sections of the Cantor set Self-similarity The Cantor function possesses several symmetries. For , there is a reflection symmetry and a pair of magnifications, one on the left and one on the right: and The magnifications can be cascaded; they generate the dyadic monoid. This is exhibited by defining several helper functions. Define the reflection as The first self-symmetry can be expressed as where the symbol denotes function composition. That is, and likewise for the other cases. For the left and right magnifications, write the left-mappings and Then the Cantor function obeys Similarly, define the right mappings as and Then, likewise, The two sides can be mirrored one onto the other, in that and likewise, These operations can be stacked arbitrarily. Consider, for example, the sequence of left-right moves Adding the subscripts C and D, and, for clarity, dropping the composition operator in all but a