# No function that is continuous at all rational points and discontinuous at irrational points. [duplicate]

Possible Duplicate:
Set of continuity points of a real function

I think I saw somewhere(but I'm not sure) that there is no function $g$ on $[0,1]$ that is continuous at all rational points and discontinuous at all irrational points. Please, is this true? If yes how can I show it? Thanks.

-

## marked as duplicate by t.b., Martin Sleziak, anon, Zhen Lin, J. M.Apr 28 '12 at 10:38

Yes, what you remember is true.
The set of discontinuities of $g$ is a $F_\sigma$, a denumerable union of closed subsets of $[0,1]$, and the irrationals are not such a union because of Baire's theorem.

Edit
Let me show in detail (as an answer to Linda's question in the comments) why $[0,1]\setminus \mathbb Q$ is not a union $\bigcup F_n$ of countably many closed subsets $F_n\subset [0,1]$.
First note that each $F_n$ would have empty interior since else it would contain some rational numbers.
On the other hand $[0,1]\cap \mathbb Q=\bigcup G_n$ with $G_n=\lbrace q_n\rbrace$, with the $q_n$ some enumeration of $\mathbb Q$.
So we would have a presentation $[0,1]=(\bigcup F_n)\bigcup (\bigcup G_n)$ of the complete metric space $[0,1]$ as a denumerable union of closed sets without interior. Baire's theorem says that this is impossible.

-
Ah. I had forgotten this tidbit. Thanks for the reminder. – Harald Hanche-Olsen Apr 28 '12 at 8:48
Thanks. What will happen if the irrationals are a union of closed subsets of [0,1]? – Linda Apr 28 '12 at 8:51
Well, the irrationals in $[0,1]$ are a union of closed subsets of $[0,1]$--namely a union of singletons--but it isn't a countable union, as your edit points out. – Cameron Buie Apr 28 '12 at 9:34
Dear Linda, the point is that it is not such a denumerable union! I have written an edit to spell that out. (Thanks to @Cameron who judiciously remarks that it is a union, albeit a non-denumerable one) – Georges Elencwajg Apr 28 '12 at 9:41