Analysis Problem of the Day 62

Today’s problem appeared as Problem 9 on the Texas A&M Real Analysis Qual:

Problem 9. Prove or disprove that there exists a continuous function f: \mathbb{R} \to \mathbb{R} such that f(x) is rational for x irrational and f(x) is irrational for x rational.


Solution: Suppose such an f did exist. For a_1,a_2,... \in \mathbb{Q} an enumeration of the rationals, consider the sets A_i:=f^{-1}(\{a_i\}), which are closed in \mathbb{R} since f is continuous. Then, by assumption, A_i \subseteq \mathbb{R} \setminus \mathbb{Q} and \bigcup_{i=1}^\infty A_i = \mathbb{R} \setminus \mathbb{Q}. Thus, the irrationals would be a countable union of closed sets, which we call an F_\sigma set. But the irrationals are not an F_\sigma set (and the rationals are not a G_\delta set) by a classic Baire category theorem argument. Thus, such an f cannot exist.

Proof of the claim: By DeMorgan’s laws, it suffices to show the rationals are not a countable intersection of open sets. Suppose they were, i.e. \mathbb{Q}=\bigcap_{i=1}^\infty U_i. Then, each U_i contains \mathbb{Q} and therefore must be dense in \mathbb{R}. Clearly then, U_i \setminus \{a_i\} is also open and dense. But then, \bigcap_{i=1}^\infty U_i \setminus \{a_i\} = \varnothing, which is impossible since by the Baire category theorem, an intersection of open dense sets has to be dense (and thus cannot be empty).

Remark: In general, there are lots of powerful nonconstructive existence/non-existence arguments that rely on the Baire category theorem. For example, it can be proven that there exists a continuous nowhere differentiable function (without providing a specific example of one).

Leave a Reply

Your email address will not be published. Required fields are marked *