# Avoiding rationals $\implies$ constant

If $f:(0,1)\rightarrow\mathbb{R}^n$, with $n>1$, is a continuous curve in $\mathbb{R}^n$, with $f(p)=(x_1(p),x_2(p),...,x_n(p))$. Must the set of $p$ such that for some $i$, $x_i(p)$ is a rational number, be dense in $(0,1)$?

$f$ is non-constant on every open interval of $(0,1)$.

-
You can set $n=1$ because one $f$ has all the $x_i$ equal. –  Ross Millikan May 17 '12 at 6:02
I want to know if its true for all f –  user1708 May 17 '12 at 6:05
@lbhezbgure Then it's trivially false. Let $f(x)=(\pi,\ldots,\pi)$. –  Alex Becker May 17 '12 at 6:06
How is a point a continuous curve? –  user1708 May 17 '12 at 6:06
I am very picky. And we need $n>1$. If f is constant its a point in R^n, not a curve, and not continuous. –  user1708 May 17 '12 at 6:13

Suppose that $f\colon [0,1]\to\mathbb R^n$ is such that it does not attain rational values on no coordinate for some non-trivial subinterval $I$ of $[0,1]$. This means that the restriction can be considered as a continuous map $f\colon I \to (\mathbb R\setminus\mathbb Q)^n$. We will show bellow that such map must be constant.

So if you assume that your map $f$ is not constant on any subinterval of $[0,1]$, then the set of points having at least one rational coordinate must be dense.

The fact that such map is constant follows from the fact that $I$ is connected and $(\mathbb R\setminus\mathbb Q)^n$ is totally disconnected. Every continuous map from a connected space to a totally disconnected space is constant.

However, it would be good to add a self-contained proof for this special case, so that this answer is self-contained and readable for someone not familiar with connected and totally disconnected spaces. I'll try to find whether we have something like that in another question at this site, if I don't find anything, I'll add a proof here. I've tried to add a proof for this special case, but I don't think this proof can be followed without at least basic knowledge of general topology. (The proof bellow would work for any totally separated space.)

Proof for this special case can be done very similarly as the proof for the theorem I mentioned above: Denote $Y=(\mathbb R\setminus\mathbb Q)^n$. Assume that $f\colon I\to Y$ is not constant. So you have at least two distinct points $a,b\in f[I]$. These two points differ at least in one coordinate $a_k$, $b_k$, which implies that they can be separated by a hyperplane $x_k=q$, where $q$ is some rational number between $a_k$ and $b_k$. This hyperplanes determines two open half-spaces. Their intersections with $Y$ give two disjoint open subsets $U$, $V$ of $Y$ such that $a\in U$, $b\in V$ and $U\cup V=Y$. Hence $f^{-1}[U]$ and $f^{-1}[V]$ are non-empty open disjoint subset of $I$ such that their union is $I$. This is not possible since $I$ is connected.

See Continuous functions from $\mathbb R$ to $\mathbb Q$ and Continuity leads to constant function for other special cases of the above theorem.

-