I have been dabbling in learning basic things about probability theory and (of course) being of the school of abstract nonsense I have tried to understand things in its language. I apologize if this question is therefore somehow obvious.


As I understand it, if $X$ is a probability space with measure $\mu$ and $f \colon X \to \mathbb{R}$ is a random variable (measurable function), its "probability distribution function" is actually the pushforward measure $f\_\*(\mu)$, which is only a function multiple of Lebesgue measure under some kind of regularity hypothesis that I'm not asking about now. If $g$ is another such random variable, the joint distribution is obtained by forming the map $(f, g) \colon X \to \mathbb{R}^2$ and pushing forward again, getting $(f,g)\_\*(\mu)$. Independence of these random variables is Fubini's theorem, that for any $h(x,y)$ on $\mathbb{R}^2$, we have $$\int h(x,y) d(f,g)\_\*(\mu) = \iint h(x,y) df\_\*(\mu) dg\_\*(\mu).$$


Okay. It therefore appears that when $X = [0,1]$, the following dream is possible: find a pair of functions $f,g$ as above, say with values also in $[0,1]$, each of which is *uniformly distributed* in that their distributions are both Lebesgue measure, which are also independent. Then $(f,g)\_\*(\mu)$ is Lebesgue measure on $[0,1]^2$. This seems to me to be rather different from the usual construction.


I can imagine what the pair $(f,g)$ must look like: it traces a curve in $[0,1]^2$ that is obviously space-filling, since the pullback of any small box must have positive measure, and so must at least be nonempty; i.e. the curve is dense.


**Question: Are the component functions of the standard space-filling curves (say, the Hilbert curve) independent and uniformly distributed? Can it be shown directly that they are independent, i.e. without constructing two-dimensional Lebesgue measure and invoking Fubini's theorem explicitly? Is this a valid way of getting Lebesgue measure on $[0,1]^2$?**



What are two independent, uniformly distributed random variables on the unit interval?
Let us consider more closely the question about space-filling curves. The [Peano curve](http://en.wikipedia.org/wiki/Space-filling_curve) and the [Hilbert curve](http://en.wikipedia.org/wiki/File%3aHilbert_curve.svg), and several other variations of them, have parametrizations $[0,1]\to[0,1]^2$ that actually take the 1-dimensional Lebesgue measure on $[0,1]\, ,$ $\mathcal{L} \_1\, ,$ to the 2-dimensional Lebesgue measure on $[0,1]^2\, ,$ $\mathcal{L} \_2\, ,$ by push-forward. Notably, the Peano curve $\gamma: [0,1]\to[0,1]^2$ is originally defined in terms of ternary expansions of real numbers, which makes it particularly simple to check the independence of the coordinates. The Hilbert curve also admits a (slightly less) simple description in terms of *binary* expansions. Here are the details; I'll try to give you an abstract-nonsense-friendly description.


Let's start by some well known facts. The map that takes a sequence $a:=(a\_1,a\_2,\dots)\in\ 3^\mathbb{N}$ (here $3:=\{0,1,2\}$ and $\mathbb{N}$ is the set of positive integers) into its value as ternary expansion, namely $\mathrm{v}(a):= \sum\_ {n\ge1} 3^{-n}a\_ n\in[0,1]$, is a continuous surjective map (and bijective, up to removing a certain countable, null subset $D$ of the domain) :


$$\operatorname{v}:3^\mathbb{N}\to[0,1]\, .$$ 


Also, this map takes the measure $\mathbf{m}$, product of countably many copies of the uniform probability measure on $3$ to the measure $\mathcal{L} \_1$ ("the base 3 digits of a real number are independent and uniformly distributed". Any other base of course works as well).  

Now, at the level of the ternary sequences we have the nice and simple Cantor bijection $3^\mathbb{N}\to 3^\mathbb{N}\times 3^\mathbb{N}$
"split the sequence of digits into the sequence of odd-position digits and the sequence of even-position digits"
$$C:3^\mathbb{N}\ni (a\_n)\mapsto \big(\, (a\_{2n-1}), (a\_{2n})\, \big) \in 3^\mathbb{N}\times 3^\mathbb{N} $$
which is easily seen to be a compact metric space homeomorphism that takes the measure $\mathbf{m}$ into the product measure $\mathbf{m}\otimes\mathbf{m}$. Note that this homeomorphism does not pass through the quotient map $\mathrm{v}$, for in general sequences with the same value do not produce sequences with the same value by extraction of a subsequence. However, removing the above mentioned countable set $D$ the map $\mathbf{v}$ becomes bijective and you do have correspondingly a bi-measurable, a.e. defined (or everywhere but non-continuous) map of the unit interval to the unit square that takes the measure $\mathcal{L} \_1$ to the measure $\mathcal{L} \_2$. All that is quite standard. Now your question cames quite naturally, as a request for a commutative square: 



> 
> *Can we find another measure preserving homeomorphism
>  $\Gamma:3^\mathbb{N}\to
> > 3^\mathbb{N}\times 3^\mathbb{N}$ that
>  induces a map $\gamma:
> > [0,1]\to[0,1]\times[0,1]$ through the map $\mathbf{v}$, that is, such that $\gamma\circ\mathbf{v}=(\mathbf{v}\times\mathbf{v})\circ\Gamma$ ?*
> 
> 
> 


Since $\mathbf{v}$ is a quotient map, this map $\gamma$ will be automatically a continuous surjection, that also takes $\mathcal{L} \_1$ to $\mathcal{L} \_2$. The answer is yes, and this is Peano's construction (he was not interested in the measure-theoretic property, but this also follows immediately from the definition). It's the way he constructed his example in the celebrated paper dated 1890 on *Mathematische Annalen*, " *Sur une courbe, qui remplit toute une aire plane* ". 
Here's Peano definition of the map $\Gamma$: extract as before the sequence of the odd-position digits and the even-position digits, but first *invert* every odd-position digit whenever there are an odd number of odd even-position digits before it, and invert every even-position digit 
whenever there are an odd number of odd odd-position digits before it. Here "invert" just means taking $x\in3$ to $2-x$, that is $0$ to $2$, $1$ to $1$, $2$ to $0$. Translating this definition in a formula, is not difficult to check it defines a homeomorphism of the form $\Gamma=C \circ \phi$, compatible with the map $\mathbf{v}$. The measure property is quite obvious, since the "inverting digit map" $ \phi:3^\mathbb{N}\to 3^\mathbb{N}$ is clearly an involutory preserving measure homeomorphism. 
For the Hilbert curve, the digit description has to be done in terms of binary representation, and it is slightly less simple (I have it written somewhere and will look for it and quote here at request) but everything works as well.


Let me finish with an historical note. Of course, what is not easy in the short Peano's paper is to understand what's going on *geometrically*. He made no picture in this paper, although the graphical iterative construction was perfectly clear to him, and was with all probability his starting point —he made an ornamental tiling showing a picture of the curve in his home in Turin. His choice to avoid any appeal to graphical visualization was no doubt motivated by a desire for a well-founded, completely rigorous proof owing nothing to pictures, in the spirit of the program of arithmetization of analysis. In the conclusion of his paper he observed incidentally that the same construction may be made with all odd basis, and even basis too, although in the latter case, by slightly more complicated formulae (hence less elegant from his viewpoint). In order to make Peano's example more accessible to the mathematical community, a couple of years later Hilbert wrote on the same journal the very clear geometric construction that we know. He chose the Peano construction in base 2 because it is simpler from the graphical point of view. 


