# De Rham curve

In mathematics, a de Rham curve is a continuous fractal curve obtained as the image of the Cantor space, or, equivalently, from the base-two expansion of the real numbers in the unit interval. Many well-known fractal curves, including the Cantor function, Cesàro–Faber curve (Lévy C curve), Minkowski's question mark function, blancmange curve, and the Koch curve are all examples of de Rham curves. The general form of the curve was first described by Georges de Rham in 1957.

## Construction

Consider some complete metric space $(M,d)$ (generally $\mathbb {R}$$^2$ with the usual euclidean distance), and a pair of contracting maps on M:
    $d_{0}:\ M\to M$
    $d_{1}:\ M\to M.$
By the Banach fixed-point theorem, these have fixed points $p_{0}$ and $p_{1}$ respectively. Let x be a real number in the interval $[0,1]$, having binary expansion
    $x=\sum _{k=1}^{\infty }{\frac {b_{k}}{2^{k}}},$
where each $b_{k}$ is 0 or 1. Consider the map
    $c_{x}:\ M\to M$
defined by
    $c_{x}=d_{b_{1}}\circ d_{b_{2}}\circ \cdots \circ d_{b_{k}}\circ \cdots ,$
where $\circ$ denotes function composition. It can be shown that each $c_{x}$ will map the common basin of attraction of $d_{0}$ and $d_{1}$ to a single point $p_{x}$ in $M$. The collection of points $p_{x}$, parameterized by a single real parameter x, is known as the de Rham curve.

## Continuity condition

The construction in terms of binary digits can be understood in two distinct ways. One way is as a mapping of Cantor space to distinct points in the plane. Cantor space is the set of all infinitely-long strings of binary digits. It is a discrete space, and is disconnected. Cantor space can be mapped onto the unit real interval by treating each string as a binary expansion of a real number. In this map, the dyadic rationals have two distinct representations as strings of binary digits. For example, the real number one-half has two equivalent binary expansions: $h_{1}=0.1000\cdots$ and $h_{0}=0.01111\cdots$ This is analogous to how one has 0.999...=1.000... in decimal expansions. The two points $h_{0}$ and $h_{1}$ are distinct points in Cantor space, but both are mapped to the real number one-half. In this way, the reals of the unit interval are a continuous image of Cantor space.
The same notion of continuity is applied to the de Rham curve by asking that the fixed points be paired, so that
    $d_{0}(p_{1})=d_{1}(p_{0})$
With this pairing, the binary expansions of the dyadic rationals always map to the same point, thus ensuring continuity at that point. Consider the behavior at one-half. For any point p in the plane, one has two distinct sequences:
    $d_{0}\circ d_{1}\circ d_{1}\circ d_{1}\circ \cdots (p)$
and
    $d_{1}\circ d_{0}\circ d_{0}\circ d_{0}\circ \cdots (p)$
corresponding to the two binary expansions $1/2=0.01111\cdots$ and $1/2=0.1000\cdots$. Since the two maps are both contracting, the first sequence converges to $d_{0}(p_{1})$ and the second to $d_{1}(p_{0})$. If these two are equal, then both binary expansions of 1/2 map to the same point. This argument can be repeated at any dyadic rational, thus ensuring continuity at those points. Real numbers that are not dyadic rationals have only one, unique binary representation, and from this it follows that the curve cannot be discontinuous at such points. The resulting de Rham curve $p_{x}$ is a continuous function of x, at all x.
In general, the de Rham curves are not differentiable.

## Properties

De Rham curves are by construction self-similar, since
    $p(x)=d_{0}(p(2x))$ for $x\in [0,1/2]$ and
    $p(x)=d_{1}(p(2x-1))$ for $x\in [1/2,1].$
The self-symmetries of all of the de Rham curves are given by the monoid that describes the symmetries of the infinite binary tree or Cantor space. This so-called period-doubling monoid is a subset of the modular group.
The image of the curve, i.e. the set of points $\{p(x),x\in [0,1]\}$, can be obtained by an Iterated function system using the set of contraction mappings $\{d_{0},\ d_{1}\}$. But the result of an iterated function system with two contraction mappings is a de Rham curve if and only if the contraction mappings satisfy the continuity condition.
Detailed, worked examples of the self-similarities can be found in the articles on the Cantor function and on Minkowski's question-mark function. Precisely the same monoid of self-similarities, the dyadic monoid, apply to every de Rham curve.

## Classification and examples

The following systems generate continuous curves.

### Cesàro curves

Cesàro curves, also known as Cesàro–Faber curves or Lévy C curves, are De Rham curves generated by affine transformations conserving orientation, with fixed points $p_{0}=0$ and $p_{1}=1$.
Because of these constraints, Cesàro curves are uniquely determined by a complex number $a$ such that $|a|<1$ and $|1-a|<1$.
The contraction mappings $d_{0}$ and $d_{1}$ are then defined as complex functions in the complex plane by:
    $d_{0}(z)=az$
    $d_{1}(z)=a+(1-a)z.$
For the value of $a=(1+i)/2$, the resulting curve is the Lévy C curve.

### Koch–Peano curves

In a similar way, we can define the Koch–Peano family of curves as the set of De Rham curves generated by affine transformations reversing orientation, with fixed points $p_{0}=0$ and $p_{1}=1$.
These mappings are expressed in the complex plane as a function of ${\overline {z}}$, the complex conjugate of $z$:
    $d_{0}(z)=a{\overline {z}}$
    $d_{1}(z)=a+(1-a){\overline {z}}.$
The name of the family comes from its two most famous members. The Koch curve is obtained by setting:
    $a_{\text{Koch}}={\frac {1}{2}}+i{\frac {\sqrt {3}}{6}},$
while the Peano curve corresponds to:
    $a_{\text{Peano}}={\frac {(1+i)}{2}}.$
The de Rham curve for $a=(1+ib)/2$ for values of $b$ just less than one visually resembles the Osgood curve. These two curves are closely related, but are not the same. The Osgood curve is obtained by repeated set subtraction, and thus is a perfect set, much like the Cantor set itself. The construction of the Osgood set asks that progressively smaller triangles to be subtracted, leaving behind a "fat" set of non-zero measure; the construction is analogous to the fat Cantor set, which has a non-zero measure. By contrast, the de Rham curve is not "fat"; the construction does not offer a way to "fatten up" the "line segments" that run "in between" the dyadic rationals.

### General affine maps

The Cesàro–Faber and Peano–Koch curves are both special cases of the general case of a pair of affine linear transformations on the complex plane. By fixing one endpoint of the curve at 0 and the other at 1, the general case is obtained by iterating on the two transforms
    $d_{0}={\begin{pmatrix}1&0&0\\0&\alpha &\delta \\0&\beta &\varepsilon \end{pmatrix}}$
and
    $d_{1}={\begin{pmatrix}1&0&0\\\alpha &1-\alpha &\zeta \\\beta &-\beta &\eta \end{pmatrix}}.$
Being affine transforms, these transforms act on a point $(u,v)$ of the 2-D plane by acting on the vector
    ${\begin{pmatrix}1\\u\\v\end{pmatrix}}.$
The midpoint of the curve can be seen to be located at $(u,v)=(\alpha ,\beta )$; the other four parameters may be varied to create a large variety of curves.
The blancmange curve of parameter $w$ can be obtained by setting $\alpha =\beta =1/2$, $\delta =\zeta =0$ and $\varepsilon =\eta =w$. That is:
    $d_{0}={\begin{pmatrix}1&0&0\\0&1/2&0\\0&1/2&w\end{pmatrix}}$
and
    $d_{1}={\begin{pmatrix}1&0&0\\1/2&1/2&0\\1/2&-1/2&w\end{pmatrix}}.$
Since the blancmange curve for parameter $w=1/4$ is a parabola of the equation $f(x)=4x(1-x)$, this illustrates the fact that on some occasions, de Rham curves can be smooth.

### Minkowski's question mark function

Minkowski's question mark function is generated by the pair of maps
    $d_{0}(z)={\frac {z}{z+1}}$
and
    $d_{1}(z)={\frac {1}{2-z}}.$

## Non-examples

Given any two functions $d_{0}$ and $d_{1}$, one can define a mapping from Cantor space, by repeated iteration of the digits, exactly the same way as for the de Rham curves. In general, the result will not be a de Rham curve, when the terms of the continuity condition are not met. Thus, there are many sets that might be in one-to-one correspondence with Cantor space, whose points can be uniquely labelled by points in the Cantor space; however, these are not de Rham curves, when the dyadic rationals do not map to the same point.

### Julia set of the Mandelbrot set

The Mandelbrot set is generated by a period-doubling iterated equation $z_{n+1}=z_{n}^{2}+c.$ The corresponding Julia set is obtained by iterating the opposite direction. This is done by writing $z_{n}=\pm {\sqrt {z_{n+1}-c}}$, which gives two distinct roots that the forward iterate $z_{n+1}$ "came from". These two roots can be distinguished as
    $d_{0}(z)=+{\sqrt {z-c}}$
and
    $d_{1}(z)=-{\sqrt {z-c}}.$
Fixing the complex number $c$, the result is the Julia set for that value of $c$. This curve is continuous when $c$ is inside the Mandelbrot set; otherwise, it is a disconnected dust of points. However, the reason for continuity is not due to the de Rham condition, as, in general, the points corresponding to the dyadic rationals are far away from one-another. In fact, this property can be used to define a notion of "polar opposites", of conjugate points in the Julia set.

## Generalizations

It is easy to generalize the definition by using more than two contraction mappings. If one uses n mappings, then the n-ary decomposition of x has to be used instead of the binary expansion of real numbers. The continuity condition has to be generalized in:
    $d_{i}(p_{n-1})=d_{i+1}(p_{0})$, for $i=0\ldots n-2.$
This continuity condition can be understood with the following example. Suppose one is working in base-10. Then one has (famously) that 0.999...= 1.000... which is a continuity equation that must be enforced at every such gap. That is, given the decimal digits $b_{1},b_{2},\cdots ,b_{k}$ with $b_{k}\neq 9$, one has
    $b_{1},b_{2},\cdots ,b_{k},9,9,9,\cdots =b_{1},b_{2},\cdots ,b_{k}+1,0,0,0,\cdots$
Such a generalization allows, for example, to produce the Sierpiński arrowhead curve (whose image is the Sierpiński triangle), by using the contraction mappings of an iterated function system that produces the Sierpiński triangle.

## Multifractal curves

Ornstein and others describe a multifractal system, where instead of working in a fixed base, one works in a variable base.
Consider the product space of variable base-$m_{n}$ discrete spaces
    $\Omega =\prod _{n\in \mathbb {N} }A_{n}$
for $A_{n}=\mathbb {Z} /m_{n}\mathbb {Z} =\{0,1,\cdots ,m_{n}-1\}$ the cyclic group, for $m_{n}\geq 2$ an integer. Any real number in the unit interval can be expanded in a sequence $(a_{1},a_{2},a_{3},\cdots )$ such that each $a_{n}\in A_{n}$. More precisely, a real number $0\leq x\leq 1$ is written as
    $x=\sum _{n=1}^{\infty }{\frac {a_{n}}{\prod _{k=1}^{n}m_{k}}}$
This expansion is not unique, if all $a_{n}=0$ past some point $K<n$. In this case, one has that
    $a_{1},a_{2},\cdots ,a_{K},0,0,\cdots =a_{1},a_{2},\cdots ,a_{K}-1,m_{K+1}-1,m_{K+2}-1,\cdots$
Such points are analogous to the dyadic rationals in the dyadic expansion, and the continuity equations on the curve must be applied at these points.
For each $A_{n}$, one must specify two things: a set of two points $p_{0}^{(n)}$ and $p_{1}^{(n)}$ and a set of $m_{n}$ functions $d_{j}^{(n)}(z)$ (with $j\in A_{n}$). The continuity condition is then as above,
    $d_{j}^{(n)}(p_{1}^{(n+1)})=d_{j+1}^{(n)}(p_{0}^{(n+1)})$, for $j=0,\cdots ,m_{n}-2.$
Ornstein's original example used
    $\Omega =\left(\mathbb {Z} /2\mathbb {Z} \right)\times \left(\mathbb {Z} /3\mathbb {Z} \right)\times \left(\mathbb {Z} /4\mathbb {Z} \right)\times \cdots$