Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|cite|improve this question

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 11 down vote accepted

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.

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.

share|cite|improve this answer
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

Not the answer you're looking for? Browse other questions tagged or ask your own question.