no continuous function switches the rational and the irrational numbers
Let denote the irrationals.There is no continuous function such that and .
Proof
Suppose there is such a function .
First, implies
This is because functions preserve unions (see properties of functions).
And then, is first category, because every singleton in is nowhere dense (because with the Euclidean metric has no isolated points, so the interior of a singleton is empty).
But , so is first category too.Therefore is first category, as .Consequently, we have .
But functions preserve unions in both ways, so
(1) |
Now, is continuous, and as is closed for every , so is . This means that . If , we have that there is an open interval , and this implies that there is an irrational number and a rational number such that both lie in , which is not possible because this would imply that , and then would map an irrational and a rational number to the same element
, but by hypothesis
and .
Then, it must be for every , and this implies that is first category (by (1)).This is absurd, by the Baire Category Theorem.