Proving Baire's theorem: The intersection of a sequence of dense open subsets of a complete metric space is nonempty The following is problem 3.22 from Rudin's Princples of Mathematical Analysis:

Suppose $X$ is a nonempty complete metric space, and $\{G_n\}$ is a sequence of dense open subsets of $X$. Prove Baire's theorem, namely, that $\bigcap_{n=1}^\infty G_n$ is not empty. Hint: find a shrinking sequence of neighbourhoods $E_n$ such that $\overline{E}_n\subset G_n$.

Here's what I've tried so far: 

Let $\{r_n\}$ be a Cauchy sequence of positive real numbers converging to $0$. Fix $x\in X$ and define $E_i=\{g\in G_i:d(g,x)<r_i\}$, which is nonempty since $G_i$ is dense. I would like to show that for all $i$, $\overline{E}_i\subset G_i$ (I had convinced myself that this would be true but I am now having doubts). Let $e\in \overline{E}_i$. Then either $e\in E_i$ or $e$ is a limit point of $E_i$. If $e\in E_i$ then $e\in G_i$. Otherwise, every neighbourhood of $e$ contains a point in $E_i$. 

I thought that I should be able to then choose some point $e'\in E_i$ in a neighbourhood of $e$ and, since $G_i$ is open, it'll have a neighbourhood $N\subset G_i$ which contains $e$, but this is proving to be difficult and I'm worried that it's not true. If I can show that this is true then the rest will follow from results I've already proven.
Does my approach make any sense?
Incidentally, as a secondary question, what type of a thing would $G_n$ be? A sequence of dense open subsets seems weird to me—at first I was thinking of some sequence of infinite subsets of rational numbers in the real numbers but I realized that those aren't open. Is there anything which would be familiar to my little undergrad brain which would be analogous to this problem?
 A: It would probably be easier to start as follows: Notice that the $G_i$ being dense and open guarantees that $G_1 \cap G_2 \neq \emptyset$. Now choose an $x$ in so that there is a ball $E_1$ in completely contained in the intersection. Shrinking the ball if necessary, you can assume that $\overline{E_1}$ is completely contained in the intersection. Now the intersection of $E_1$ with $G_3$ is non-empty and so you can choose some $\overline{E_2}$ completely contained in $E_1 \cap G_3$ and hence in $E_1$. If you go on like this, you will have a decreasing (with respect to containment) sequence of closed and bounded sets which has non-empty intersection.
Now how do you prove this last assertion? You can either use the theorem in chapter 2 on intersection of compact sets (notice the nested bit guarantees that the intersection of finitely many of them is non-empty) or you can go straight up from the definition of sequential compactness.
A: Your approach won't work, since your $x$ might not belong to $G_i$, but then it would be a limit point of $E_i$, and so $x \in \overline{E_i} \setminus G_i$. 

In order to prove this, note the following facts.


*

*If $G$ is a dense open set, and $U$ is any nonempty open set, then $G \cap U$ is a nonempty open set.

*The intersection of finitely many dense open sets is itself dense open.


Using the above, we can construct a sequence $\langle x_n \rangle_n$ in $X$ such that for each $n$ there is a $\delta_n$ with $0 < \delta_n \leq 2^{-n}$ such that


*

*$\overline{B}(x_n;\delta_n) = \{ x \in X : d(x,x_n) \leq \delta_n \} \subseteq G_n$;

*if $m > n$, then $B(x_m;\delta_m) \subseteq B(x_n;\delta_n)$.


To recursively construct such a sequence:

 Suppose that $x_1 , \ldots , x_n$ have been appropriately chosen (with associated positive reals $\delta_1 , \ldots , \delta_n$). As $B ( x_n , \delta_n ) \cap G_{n+1}$ is a nonempty open set we may pick some $x_{n+1} \in B ( x_n , \delta_n ) \cap G_{n+1}$. Then there is a $\varepsilon > 0$ such that $B ( x_{n+1} , \varepsilon ) \subseteq B ( x_n , \delta_n ) \cap G_{n+1}$, so set $\delta_{n+1} = \min \{ 2^{-(n+1)} , \frac{\varepsilon}{2} \}$.

To see how such a sequence proves the result:

 Since for $m > n$ we have that $d(x_n,x_m) < \delta_n \leq 2^{-n}$ it follows that such a sequence (if constructed) must be Cauchy, and so has a limit, $x$. Furthermore for each $n$ as the tail $\langle x_k \rangle_{k=n}^\infty$ of the sequence is contained in $B ( x_n , \delta_n )$, then $x \in \overline{B ( x_n , \delta_n )} \subseteq \overline{B} ( x_n , \delta_n ) \subseteq G_n$. Therefore $x \in \bigcap_n G_n$.


As for the nature of dense open subsets complete metric spaces, note that for the real line $\mathbb{R}$ the following are examples sets would be of this kind:


*

*The complement of any finite set.

*The complement of the integers.

*The complement of any convergent sequence (including its limit point).

*The complement of the Cantor ternary set.

*If you enumerate the rational numbers as $\{ q_i : i \in \mathbb{N} \}$ and let $\{ \epsilon_i : i \in \mathbb{N} \}$ be any sequence of positive reals, then the set $\bigcup_i ( q_i - \epsilon_i , q_i + \epsilon_i )$.


Basically in $\mathbb{R}$ a dense open set an open set (so a union of open intervals) whose complement includes no "non-degenerate intervals" (intervals of non-zero length).
