Extending continuous functioms defined on the irrationals

Lavrentieff proved a Theorem which implies that every real valued continuous function defined on a dense subset $$D\subseteq \mathbb R$$ admits a continuous extension to some $$G_\delta$$ subset of $$\mathbb R$$. See Theorem (4.3.20) in "General Topology" by Engelking, or this Mathematics Stack Exchange post.

If the dense subset $$D$$ is already a $$G_\delta$$, such as the set of irrational numbers, Lavrentieff's Theorem of course says nothing. So let us be a bit more audacious:

Given a real valued continuous function $$f$$ defined on $$\mathbb R\setminus \mathbb Q$$, is there an open subset $$U$$ of $$\mathbb R$$, containing all irrational numbers, and a continuous extension of $$f$$ to U?

1 Answer

Enumerate the rationals as $$\{q_n\}$$ and define $$f(x) = \sum_{n : q_n < x} 2^{-n}$$. Then $$f$$ is continuous on $$\mathbb{R} \setminus \mathbb{Q}$$ but cannot be extended continuously to any proper superset of $$\mathbb{R} \setminus \mathbb{Q}$$.

• Wonderful !!!!! – Ruy Dec 12 '18 at 13:16
• I am writing a paper in which your nice example will fit marvelously, so I plan to cite this post, but I wonder if perhaps you have other sources I should also cite? – Ruy Dec 12 '18 at 16:02
• I don't remember where I first learned about this function, but I feel like it's "well known". Gelbaum's Counterexamples in Analysis might have it. I can check my copy later today. – Nate Eldredge Dec 12 '18 at 17:24
• This is Remark 4.31 in Rudin’s book Principles of Mathematical Analysis. A generalization of this is presented to show that the set of discontinuities of a monotonic function can be any countable set. – Ramiro de la Vega Dec 19 '18 at 12:25