# Do there exist intervals in $[0,1]$ of rational numbers?

Basically I'm struggling to prove that if you take the indicator function $f$ on $\mathbb{Q}$ intersect $[0,1]$ and $\phi, \psi$ are step functions such that $\phi \leq f \leq \psi$ then $\phi \leq 0$ and $\psi \geq 0$ for all but finitely many $x$

As step functions can only be defined on intervals (by my definition I am working with) I'm trying to describe the places where the indicator function is 1

EDIT: so as $\mathbb{Q}$ is a set of discrete points, when we define a step function on $[0,1]$ can we can not find an interval such that the indicator function of $\mathbb{Q}$ intersect $[0,1]$ where it is 1, so can not find anywhere where $\phi > 0$? Unless we can define step functions pointwise?

-
$\mathbb{Q}$ does not contain any interval if that is what you're asking. – HbCwiRoJDp Jan 19 '12 at 16:04
@Karatug Ozan: thank you for confirming that – Freeman Jan 19 '12 at 16:09
+1 Nice question. – user38268 Jan 19 '12 at 16:17

The result follows immediately from the fact that any step function can be written as

$$g=\sum_{i=1}^n a_i \chi_{I_i} \,,$$

where the intervals $I_i$ are pairwise disjoint. Note that the intervals could actually be trivial (i.e. a single point).

Now if $\phi(x) >0$, then $x \in I_i$ for some $I_i$. But then, if $I_i$ is not trivial, it contains an irrational number $y$, and thus $\phi(y)=\phi(x)>0=f(y)$, contradiction.

The other implication follows from the density of the rationals.

-
Thank you :) this is very helpful – Freeman Jan 21 '12 at 16:52

All you're trying to prove is that, for example, $\phi\geqslant0$ a.e. on $[0,1]$. But, you know that the set of values where this isn't true is contained in $\mathbb{Q}\cap[0,1]$, which then must be countable, which tells us you is measure zero.

P.S. There seems to be some misconception on measure zero, as is suggested by the wording of your question. Being measure zero is not equivalent to containing no intervals, as is easily seen by the fact that $(\mathbb{R}-\mathbb{Q})\cap[0,1]$ has empty interior yet is not measure zero--if it did have measure zero then so would $((\mathbb{R}-\mathbb{Q})\cap[0,1])\cup(\mathbb{Q}\cap[0,1])=[0,1]$!

-
Hmm, if you elaborate that would be very helpful. How do we translate the property of countable to finite? As we are looking for a finite number such that the step function is strictly greater than 0. Does this mean the step function maps some points to points greater than 0? As surely any interval mapping to greater that 0 contains infinite elements? – Freeman Jan 19 '12 at 16:08
I have not yet defined measure in my course, that'll be next lecture sorry :) – Freeman Jan 19 '12 at 16:12