# no continuous function switches the rational and the irrational numbers

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

Proof

Suppose there is such a function $f$.

First, $\mathbb{Q}=\bigcup _{i\in \mathbb{N}}\{{q}_{i}\}$ implies

$$f(\mathbb{Q})=\bigcup _{i\in \mathbb{N}}\{f({q}_{i})\}.$$ |

This is because functions preserve unions (see properties of functions^{}).

And then, $f(\mathbb{Q})$ is first category, because every singleton in $\mathbb{R}$ is nowhere dense (because $\mathbb{R}$ with the Euclidean metric has no isolated points, so the interior of a singleton is empty).

But $f(\mathbb{J})\subseteq \mathbb{Q}$, so $f(\mathbb{J})$ is first category too. Therefore $f(\mathbb{R})$ is first category, as $f(\mathbb{R})=f(\mathbb{Q})\cup f(\mathbb{J})$. Consequently, we have $f(\mathbb{R})=\bigcup _{i\in \mathbb{N}}\{{z}_{i}\}$.

But functions preserve unions in both ways, so

$$\mathbb{R}={f}^{-1}(\bigcup _{i\in \mathbb{N}}\{{z}_{i}\})=\bigcup _{i\in \mathbb{N}}{f}^{-1}(\{{z}_{i}\}).$$ | (1) |

Now, $f$ is continuous, and as $\{{z}_{i}\}$ is closed for every $i\in \mathbb{N}$, so is ${f}^{-1}(\{{z}_{i}\})$. This means that $\overline{{f}^{-1}(\{{z}_{i}\})}={f}^{-1}(\{{z}_{i}\})$. If $\mathrm{int}({f}^{-1}(\{{z}_{i}\}))\ne \mathrm{\varnothing}$, we have that there is an open interval $({a}_{i},{b}_{i})\subseteq {f}^{-1}(\{{z}_{i}\})$, and this implies that there is an irrational number ${x}_{i}$ and a rational number^{} ${y}_{i}$ such that both lie in ${f}^{-1}(\{{z}_{i}\})$, which is not possible because this would imply that $f({x}_{i})=f({y}_{i})={z}_{i}$, and then $f$ would map an irrational and a rational number to the same element^{}, but by hypothesis^{} $f(\mathbb{Q})\subseteq \mathbb{J}$ and $f(\mathbb{J})\subseteq \mathbb{Q}$.

Then, it must be $\mathrm{int}({f}^{-1}(\{{z}_{i}\}))=\mathrm{\varnothing}$ for every $i\in \mathbb{N}$, and this implies that $\mathbb{R}$ is first category (by (1)). This is absurd, by the Baire Category Theorem.

Title | no continuous function switches the rational and the irrational numbers |
---|---|

Canonical name | NoContinuousFunctionSwitchesTheRationalAndTheIrrationalNumbers |

Date of creation | 2013-03-22 14:59:15 |

Last modified on | 2013-03-22 14:59:15 |

Owner | yark (2760) |

Last modified by | yark (2760) |

Numerical id | 13 |

Author | yark (2760) |

Entry type | Result |

Classification | msc 54E52 |