**Differentiability of Space Filling Curves**

A *Peano curve* is a surjective (onto) function [tex]f\colon\mathbb{R}\to\mathbb{R}^2[/tex]. Apparently such an *f* cannot be smooth. To see this consider the restrictions of this function to closed intervals [tex]f\restriction [n,n+1][/tex]. By smoothness and compactness the image of each of them under *f* has finite length, and hence measure zero in the 2-dimensional Lebesgue measure of [tex]\mathbb{R}^2[/tex] (twice continuously differentiable is enough for this argument). Thus their countable union, the range of *f*, cannot be the whole plane.

On the other hand, *f* can be continuous, see the exercise I gave in the end of the __post about continued fractions__.

Let us try something between smooth and continuous. Denote [tex]f=(f_1,f_2)[/tex], where [tex]f_1[/tex] and [tex]f_2[/tex] are the co-ordinate functions. *Is it possible that at each point either [tex]f_1[/tex] or [tex]f_2[/tex] has a derivative?*

**Theorem** *The following are equivalent
1. Continuum Hypothesis
2. There exists a Peano curve such that at each point one of the components is differentiable.*

Reference: Michal Morayne Colloq. Math. 53 (1987), 129-132

**UPD: The argument as it is below uses the assumption that a set whose complement has measure zero has the size of continuum. This is true under Martin’s axiom, but seems to me independent from ZFC. By putting one more assumption on the Peano curve the proof below goes through: assume that there is are open intervals [tex]I_1,I_2[/tex] such that in [tex]I_k[/tex] the function [tex]f_k[/tex] is differentiable and the derivative is non-zero for k=1,2.**

For a proof we have to establish two lemmas.

**Lemma 1**

*The following are equivalent
(1) Continuum Hypothesis
(2) There exist sets [tex]S_1[/tex] and [tex]S_2[/tex] such that [tex]S_1\cup S_2=\mathbb{R}^2[/tex] and for each [tex]x\in \mathbb{R}[/tex] the sets
[tex](S_1)^x=\{y\in \mathbb{R}\mid (x,y)\in S_1\}[/tex]
and
[tex](S_2)_x=\{y\in \mathbb{R}\mid (y,x)\in S_2\}[/tex]
are countable.
*

**Proof of Lemma 1**

Assume CH. Let [tex]f\colon \mathbb{R}\to \omega_1[/tex] be a bijection and set

[tex]S_1=\{(x,y)\mid f(y)\leqslant f(x)\}[/tex]

and

[tex]S_2=\{(x,y)\mid f(x)\leqslant f(y)\}[/tex]

These clearly satisfy the assumption.

Suppose now that CH does not hold and [tex]S_1[/tex] and [tex]S_2[/tex] are some subsets of [tex]\mathbb{R}^2[/tex] for which the sets [tex](S_1)^x[/tex] and [tex](S_2)_x[/tex] are countable for all [tex]x\in \mathbb{R}[/tex]. Now pick a subset [tex]E[/tex] of [tex]\mathbb{R}[/tex] of size [tex]\omega_1[/tex]. The intersection

[tex]I=\bigcap_{x\in E}\mathbb{R}\setminus (S_1)^x[/tex]

is non-empty, because its complement is an [tex]\omega_1[/tex]-union of countable sets which has size [tex]\omega_1<|\mathbb{R}|[/tex]. Pick [tex]x\in I[/tex], now [tex](S_2)_{x}[/tex] should be uncountable in order to satisfy [tex]S_1\cup S_2=\mathbb{R}^2[/tex]. [tex]\quadd\square[/tex]

**Lemma 2**

Let [tex]f\colon \mathbb{R}\to\mathbb{R}[/tex] and [tex]D\subset \mathbb{R}[/tex] such that [tex](\forall x\in D)(f'(x)\text{ exists})[/tex]. Then the set

[tex]E=\{y\in \mathbb{R}\mid D\cap f^{-1}\{y\}\text{ is uncountable}\}[/tex]

has Lebesgue measure zero.

**Proof of Lemma 2**

Let us first show that

[tex]Z=\{f(x)\in \mathbb{R}\mid x\in D, f'(x)=0\}[/tex]

has measure zero (this is called Sard’s lemma). Fix a positive [tex]\varepsilon[/tex] and for each [tex]n[/tex] define

[tex]D_n=\{x\in D\mid x-\frac{1}{n}\leqslant y\leqslant x+\frac{1}{n}\Rightarrow |f(x)-f(y)|\leqslant \varepsilon\cdot|x-y|\}.[/tex]

Clearly [tex]\bigcup_n D_n=\{x\mid f'(x)\leqslant \varepsilon\}[/tex]. By the definition of Lebesgue measure there exist intervals [tex](I_k^n)_{k\in \mathbb{N}}[/tex] such that

(I) [tex]D_n\subset \bigcup_{k\in\mathbb{N}}I^n_k[/tex]

(II) [tex]\mu(I_k^{n})\leqslant \frac{1}{n}[/tex]

(III) [tex]\sum_{k\in \mathbb{N}}\mu(I_k^n)\leqslant \mu(D_n)+\varepsilon[/tex]

(Here [tex]\mu[/tex] denotes Lebsgue measure)

Now for every [tex]x,y\in I^{n}_k\cap D_n[/tex] we have [tex]|f(x)-f(y)|\leqslant\varepsilon\mu(I^n_k)[/tex], so we can calculate

[tex]\mu(f[D_n])\leqslant \sum_{k\in \mathbb{N}} \mu(f[I^n_k])\leqslant \varepsilon\sum_{k\in\mathbb{N}}\mu(I^n_k)\leqslant \varepsilon(\mu(D_n)+\varepsilon).[/tex]

Taking [tex]n\to \infty[/tex] and [tex]\varepsilon\to 0[/tex] we get Sard's lemma.

We will show that [tex]E\subset Z[/tex] which suffices. Suppose [tex]y\in E[/tex]. Then the set [tex]D\cap f^{-1}\{y\}[/tex] is uncountable and must have an accumulation point [tex]x[/tex]. Since [tex]x\in D[/tex] the derivative [tex]f'(x)[/tex] exists and because it is an accumulation point of the set [tex]f^{-1}\{y\}[/tex] the derivative is zero. Thus [tex]y\in Z[/tex]. [tex]\quadd\square[/tex]

**Proof of the Theorem**

Suppose CH and let [tex]S_1[/tex] and [tex]S_2[/tex] be as in Lemma 1. For each [tex]x\in\mathbb{R}[/tex] enumerate the sets [tex](S_1)^x[/tex] and [tex](S_2)_{x}[/tex]. Define [tex]f\colon \mathbb{R}\to\mathbb{R}^2[/tex] as follows. Let [tex]g(x)=x\sin x[/tex]. Let [tex]x\in \mathbb{R}[/tex] and suppose first that [tex]x\geqslant 0[/tex]. Let [tex]n=|[0,x)\cap g^{-1}\{g(x)\}|[/tex] and let [tex]x_n[/tex] be the [tex]n[/tex]:th element of [tex](S_1)^{g(x)}[/tex]. Then let [tex]f(x)=(g(x),x_n)[/tex]. This defines a surjection from positive reals to [tex]S_1[/tex]. If [tex]x[/tex] is negative do the same thing symmetrically: [tex]f(x)=(x_n,g(x))[/tex], where [tex]x_n[/tex] is the [tex]n[/tex]:th element of [tex](S_2)_{g(x)}[/tex] where [tex]n[/tex] is the size of the set [tex](x,0]\cap g^{-1}\{g(x)\}[/tex]. Since [tex]\mathbb{R}^2=S_1\cup S_2[/tex], [tex]f[/tex] is a surjection and clearly has one of the co-ordinate derivatives at each point except origin. The latter can be improved by resetting [tex]f(x)=(g(x),g(x))[/tex], when [tex]x\in (-1,1)[/tex] and instead of the intervals [tex][0,x)[/tex] and [tex](x,0][/tex] used above just use the intervals [tex][1,x)[/tex] and [tex](x,-1][/tex].

Suppose on the other hand that there exists a surjection [tex]f\colon \mathbb{R}\to \mathbb{R}^2[/tex] as in the assumption of the theorem. Denote [tex]f=(f_1,f_2)[/tex] as in the beginning. Let

[tex]D_1=\{f(x)\in \mathbb{R}\mid f’_1(x)\text{ exists}\}[/tex]

and

[tex]D_2=\{f(x)\in \mathbb{R}\mid f’_2(x) \text{ exists}\}[/tex].

Now the sets [tex]D_1[/tex] and [tex]D_2[/tex] are almost like [tex]S_1[/tex] and [tex]S_2[/tex] in Lemma 1. Clearly [tex]\mathbb{R}^2=D_1\cup D_2[/tex] but [tex](D_1)^x={(x,y)\in D_1\mid y\in \mathbb{R}\}[/tex] is not necessarily countable. But by Lemma 2 it is countable almost everywhere, since [tex]f_1[/tex] has a derivative at each point in [tex]D_1[/tex] and

[tex](D_1)^x=f[f_1^{-1}(x)\cap \{x\mid \exists f’_1(x)\}][/tex]

which is countable for almost all [tex]x[/tex] by Lemma 2.

To carry out the complete argument let

[tex]N_1=\{x\in \mathbb{R}\mid D_1\cap f_1^{-1}\{x\}\text{ is uncountable}\}[/tex]

and

[tex]N_2=\{x\in \mathbb{R}\mid D_2\cap f_2^{-1}\{x\}\text{ is uncountable}\}[/tex].

By Lemma 2 both [tex]N_1[/tex] and [tex]N_2[/tex] have measure zero. Let [tex]\beta\colon \mathbb{R}\to \mathbb{R}\setminus (N_1\cup N_2)[/tex] be a bijection which exists since the complement of a measure zero set of reals has the cardinality of the continuum. Then for [tex]i=1,2[/tex] the sets

[tex]S_i=\{(\beta^{-1}(x),\beta^{-1}(y))\mid (x,y)\in D_i\cap (\mathbb{R}\setminus N_1\cup N_2)^2\}[/tex]

are as in Lemma 1, so CH must hold. [tex]\quadd\square[/tex]