# Unzipping the real number line

Pardon the lack of technical notation and probable misuse of terminology. I hope the question comes out clear anyway.

Is this possible?

Given a real interval I, there exists two interleaving sets F and G, such that:

• For any f ϵ F, f ϵ I. For any g ϵ G, g ϵ I.
• The union of F and G = I
• The intersection of F and G is empty.
• When considering F and G within the interval I, for any two elements belonging to F, fIa and fIb, there exists a gIc belonging to G such that fIa < gIc < fIb. And for any two elements belonging to G, gIa and gIb, there exists a fIc belonging to F such that gIa < fIc < gIb.

And if F and G do exist, could one then define a weird zipper-like function z which unzips the real line apart one point at a time via a simple rule such as:

z(x)= {If x ϵ F: x+1;

If x ϵ G: x-1}

I ask because something doesn’t seem right here. Such a zipper function would seem to separate any x from the “least next” Δx along the real line. But given a continuous line, there is no such thing as a “least next” value, because there’s always a value between any other two.

As a follow up question, does anything change if one restricts I to be an interval of only rational numbers?

Let $I$ be a fixed interval $[a,b]$. Then you may let $F=\mathbb{Q} \cap I$ (rationals in $I$) and $G=I\setminus \mathbb{Q}$ (irrationals in $I$), which satisfy all the properties you want.

As you point out, there is no 'least next' value, but this is not an issue because your last bullet point doesn't necessitate that such things exist. Instead, it is sufficient for both $F$ and $G$ to be dense in $I$.

To answer your last question, nothing changes, we could take $F= (I\cap \mathbb{Q})\cap \{n/2^m \mid \text{$n$odd integer,$m\geq 0$}\}$ and $G = (I\cap \mathbb{Q}) \setminus \{n/2^m \mid \text{$n$odd integer,$m\geq 0$}\}$. The elements of $\{n/2^m \mid \text{$n$odd integer,$m\geq 0$}\}$ are called the dyadic rationals.

As far as your function $z(x)$ defined by $$z(x) = \begin{cases} x+1 & x\in F \\ x-1 & x\in G \end{cases}$$ is concerned, it does indeed exist (that's a valid definition above). While it separates $I$, that isn't really a problem.

• Thank you. One more question. Does thought of "damn, real numbers are weird" ever go away? – MichCon Sep 2 '16 at 6:37
• Personally, I wouldn't say that the real numbers are weird. However, you can create a lot of weird things with them (particularly subsets of $\mathbb{R}$ or functions $\mathbb{R} \to \mathbb{R}$). Some particular examples include the cantor set or the Weierstrass function. In a way, the nice properties of $\mathbb{R}$ (particularly the fact that it is a 'complete' line) are what allows these pathological things to be defined since they allow the constructions to go through... – Hayden Sep 2 '16 at 6:44
• ...so while you might (eventually) think $\mathbb{R}$ isn't weird, you'll probably never stop seeing things created using it that are weird. – Hayden Sep 2 '16 at 6:44

To summarize what you're asking for: you want a partition of $\mathbb{R}$ into two sets $F$ and $G$, such that there is an element of $F$ between any two elements of $G$ and vice-versa. Certainly this is possible: let $F$ and $G$ be the rationals and the irrationals, respectively. And your zipper-like function is well-defined: $z(x)$ increases rational numbers by $1$ and decreases irrational numbers by $1$, and so it is discontinuous everywhere, even though it is continuous when restricted to either the rationals or the irrationals. Altering the base set from $\mathbb{R}$ to $\mathbb{Q}$ doesn't change any of this. For instance, you can let $F$ be the set of rationals with prime denominators (in lowest terms). Both $F$ and $\mathbb{Q}-F$ are dense on the real line, so they interleave in the way you want.

Such a partition does exist. Let $F = I \cap \Bbb Q$ and $G = I \setminus F$. It's clear that $F$ and $G$ have empty intersection, and their union is all of $I$.

And for any two rational numbers, there's an irrational number between them. The other way around too. Since this is all taking place inside an interval $I$, the middle point that you find is also in $I$.