# Continuous on rationals, discontinuous on irrationals

Let $f: R \rightarrow R$. Show that the set of points of continuity of $f$ is a $G_{\delta}$ set. Explain why it follows from this that there is no function that is continuous on the rationals and discontinuous on the irrationals.

Solution:

I can prove the second part, although independently of the first.

In words:

No function can be continuous only on a countable dense set of $R$, such as $Q$. If the set, $X$, of continuity points were countable, then we could choose a nested sequence of intervals around points of $X$ where the variation in $f$ goes to 0, that eventually avoids all points of $X$. But the common point of the intervals would be a continuity point, contradiction.

How can I relate this to the first part?

-
Related: here, here, and here. – Zev Chonoles Apr 23 '13 at 22:57