Questions about open sets in ${\mathbb R}$

Consider the following problem:

Let ${\mathbb Q} \subset A\subset {\mathbb R}$, which of the following must be true?

A. If $A$ is open, then $A={\mathbb R}$

B. If $A$ is closed, then $A={\mathbb R}$

Since $\overline{\mathbb Q}={\mathbb R}$, one can immediately get that B is the answer.

Here are my questions:

Why A is not necessarily true? What can be a counterexample?

A slightly more interesting example than Luboš's can be obtained by enumerating the rationals as $\mathbb{Q} = \{q_n\}_{n=1}^\infty$ and taking $A = \bigcup_{n=1}^{\infty} (q_{n} - \frac{\varepsilon}{2^{n+1}}, q_{n} + \frac{\varepsilon}{2^{n+1}})$. Then the Lebesgue measure of $A$ can be estimated by $\mu(A) \leq \sum_{n=1}^{\infty} 2 \cdot \frac{\varepsilon}{2^{n+1}} = \varepsilon$, so $A$ cannot be all of $\mathbb{R}$ even if it's clearly open.

• It's amazing that without knowing what the irrational numbers are left, one can get that $A$ cannot be ${\bf R}$ through Lebesgue measure. Nice! – Jack Jun 6 '11 at 15:50
• @Jack: Of course, I used the deceptively innocent-looking fact that the Lebesgue measure of an interval is its length! The comments to Gowers's answer show that even some professional mathematicians are not aware of its non-triviality (or forgot about it)... – t.b. Jun 6 '11 at 16:09
• This is a very nice classical example. +1, I liked it so much when I saw it the first time :) it's like saying you can "cover" a dense subset of an infinitely long line with a simple woodstick (of finite length), if you "cut it correctly" and "place the pieces at the right places". It shows how mathematics can rudely destroy intuition. =P – Patrick Da Silva Jul 29 '11 at 5:45
• @Patrick: Right. I find it even better when you write $A_{\varepsilon}$ for the set in this answer and take $N = [0,1] \cap \bigcap_{k=1}^{\infty} A_{1/k}$. Then you get a dense $G_{\delta}$ (hence a set of second Baire category) in $[0,1]$. This set is generic in the sense of Baire, but it has zero Lebesgue measure. In other words: the two notions of generic that are commonly used (one in the sense of Baire, the other in the sense of probability) are quite incompatible. – t.b. Jul 29 '11 at 7:58
• @Patrick: Oh, sorry. The set $N$ has measure zero, right? So if you pick a point randomly (wrt Lebesgue measure on $[0,1]$), it won't be in $N$ almost surely, so a "generic point will be outside $N$". On the other hand, this set is a countable intersection of open and dense sets, and according to the Baire category theorem, such sets are "large" or "generic" (in the sense of Baire). E.g.: a generic continuous function is nowhere differentiable. Now $N$ is "very small" in the Lebesgue sense, and "very large" in the Baire sense. That's it. – t.b. Jul 29 '11 at 22:29

A counterexample for the rule A is $${\mathbb R} \backslash F$$ where $F$ is any non-empty finite (or countable) set of irrational numbers. For example $${\mathbb R} \backslash \{\pi\}$$ Note that if I remove the point $\pi$, the set is still open on both sides from $\pi$. Because $\pi$ isn't rational, the set above still contains all rational numbers.

• You couldn't remove any countable set - for example, removing $\{\frac{\pi}{n} \mid n \in \mathbb{N}\}$ would leave you with a set that's not open. – MartianInvader Jun 6 '11 at 16:46
• "(or countable)" could be replaced with "(or closed)" to make this correct and general. – Jonas Meyer Jun 6 '11 at 18:11

The question boils down to whether there are nonempty subsets of $\mathbb{R}\setminus \mathbb{Q}$ that are closed in $\mathbb{R}$. The easiest examples are finite sets, as Luboš Motl noted. An easy infinite example is $\sqrt{2}+\mathbb{Z}$. Theo Buehler showed that there are positive measure examples, which is much stronger and closely related to the question at this link.

Another direction to strengthen the result is to show that there are perfect examples, which is the subject of the question at this link.

• Nice wrap-up, Jonas, and prods to make connections with earlier questions/answers. A post such as this would be helpful for some answers that get a half-dozen (or more) answers which take a different angle, approach...and to help shed light on how strong (or generalizable/extendable) a statement one can make, "spring-boarding" off a single question, and connecting to other semi-related posts. – Namaste Jun 22 '11 at 5:35

"Why A is not necessarily true? What can be a counterexample?"

I'm surprised at the complexity of some answers given to this. Here's a counterexample: $$(-\infty,\pi)\cup (\pi,\infty).$$ You can construct lots of others similar to that but more complicated if need be.

• How is $\mathbb{R} \smallsetminus \{\pi\}$ more complicated than your example? – t.b. Oct 8 '11 at 0:24
• I.e. the complement of any discrete set of irrational numbers. – Michael Hardy Oct 8 '11 at 0:25
• Sorry..... I hadn't thorougly read all of them. – Michael Hardy Oct 8 '11 at 0:26
• @MichaelHardy: $\{\frac{\pi}{n}:n\in\mathbb N\}$ is a discrete set of irrationals, but its complement is not open. The set of irrational numbers in question has to be closed. – Jonas Meyer Dec 4 '11 at 6:38