# another proof of the non-existence of a continuous function that switches the rational and the irrational numbers

Let $\mathbb{J}=\mathbb{R}\setminus\mathbb{Q}$ denote the irrationals. There is no continuous function   $f\colon\mathbb{R}\to\mathbb{R}$ such that $f(\mathbb{Q})\subseteq\mathbb{J}$ and $f(\mathbb{J})\subseteq\mathbb{Q}$.

Proof

Suppose $f$ is such a function. Since $\mathbb{Q}$ is countable  , $f(\mathbb{Q})$ and $f(\mathbb{J})$ are also countable. Therefore the image of $f$ is countable. If $f$ is not a constant function, then by the intermediate value theorem the image of $f$ contains a nonempty interval, so the image of $f$ is uncountable. We have just shown that this isn’t the case, so there must be some $c$ such that $f(x)=c$ for all $x\in\mathbb{R}$. Therefore $f(\mathbb{Q})=\{c\}\subset\mathbb{J}$ and $f(\mathbb{J})=\{c\}\subset\mathbb{Q}$. Obviously no number is both rational and irrational, so no such $f$ exists.

Title another proof of the non-existence of a continuous function that switches the rational and the irrational numbers AnotherProofOfTheNonexistenceOfAContinuousFunctionThatSwitchesTheRationalAndTheIrrationalNumbers 2013-03-22 16:23:54 2013-03-22 16:23:54 neapol1s (9480) neapol1s (9480) 7 neapol1s (9480) Proof msc 54E52