# Is there a smooth map f:R^n --> R^{n-1} whose image separates the rationals and others?

Let me make the question more precise:

Let A be the set of all points in R^n such that each of its coordinates is rational, and let B=R^n-A. My question is, is there a smooth map f:R^n --> R^{n-1} such that Im(f|_A) \cap Im(f|_B)=\emptyset?

This might be a solved question, but I could not find any reference for it. I would guess no such smooth map exists. Here is some of my thinkings: if Im(f|_A) contains a regular value, say a is such a value, then f^{-1}(a) is a 1-dimensional submanifold of R^n, hence contains some point in B; if Im(f|_A) has no regular value, then by density of A in R^n, Im(f) consists of singular values. By Sard's theorem, Im(f) is a Lebesgue measure 0 (connected) subset of R^{n-1}. As a simple example, if n=1, then in this case, f must be constant. I don't know how to continue in general.

-

Let us show that for an arbitrary countable subset $Q=\{x_1,x_2,\dots\}\subset \mathbb R^m$, there is a smooth map $f:\mathbb R^m\to \mathbb R^2$ such that $f(Q)$ is disjoint from $f(\mathbb R^m\backslash Q)$. In the construction, $f$ will be a limit of a sequence of maps $f_n$. The maps $f_n$ will be constructed recursively from $f_{n-1}$ in such a way that $f_n$ is smooth and the $C^n$-norm of $f_n-f_{n-1}$ is arbitrarily small.
Define $f_0(z)=0$. Assume $f_{n-1}$ is constructed. Take a smooth $h_n:\mathbb R^m\to\mathbb R^m$ which maps a neighborhood of $x_n$ to $x_n$ and does not move any $x_i$ for $i < n$. Then $f_n$ is a slight deformation of $f_{n-1}\circ h_n$ in a neighborhood of $x_n$ so that the image of $x_n$ will have a unique preimage. The latter is possible if the image of $f_{n-1}$ is a finite graph and we can construct $f_n$ so that this property survives. So the image of $f_0$ is a point, the image of $f_1$ is an interval, the image of $f_n$ is a tree with $n$ endpoints $f_n(x_1),\dots, f_n(x_n)$.
Clearly the $C^n$-norm of $f_n-f_{n-1}$ can be made arbitrarily small. Therefore one can construct the sequence $f_n$ so that it converges to a smooth $f$. One has to be a bit careful in choosing this sequence so that there are no “overlaps” in the limit, so the limit $f$ has the needed property.
Enxin, the statement is a simple cardinality argument. Pick any point $x$ in $\mathbb{R}^n$; then there are only countably many $r$ for which the sphere of radius $r$ and center $x$ intersects $A$ in a nonempty set. So pick any $r$ not in that countable set. – Todd Trimble Jul 25 '11 at 5:21
The $n$ indexing the steps of the induction and the $n$ that is the dimension of the ambient space would like to be different letters. – Andreas Blass Jul 25 '11 at 8:05