Countable intersection of open sets results in a closed set In $\Bbb R$, if we take the intersection of open intervals $\left(a-\frac1n,b+\frac1n\right)$ for $n\in\Bbb N$, what we get is a closed interval $[a,b]$.
It makes sense intuitively, but what is the rigorous proof of this statement?
 A: If $x\in[a,b]$ then $x\in(a-\frac1n,b+\frac1n)$ for all $n$, hence $x\in\bigcap_{n\ge1}(a-\frac1n,b+\frac1n)$.
Hence $[a,b]\subseteq\bigcap_{n\ge1}(a-\frac1n,b+\frac1n)$. 
If $x\not\in[a,b]$ (in other words $x\in\mathbb R\setminus [a,b]$) then either $x<a$ or $x>b$. Consider the case $x<a$.
Pick any $n>\frac1{a-x}>0$. Then $\frac1n<a-x$, so $x<a-\frac1n$. Hence $x\not\in(a-\frac1n,b+\frac1n)$ (for this particular $n$). Similarly if $b<x$ then $x\not\in(a-\frac1n,b+\frac1n)$ whenever $n>\frac1{x-b}>0$ (since $b+\frac1n<x$). Hence $x\not\in\bigcap_{n\ge1}(a-\frac1n,b+\frac1n)$ (in other words $x\in\mathbb R\setminus \bigcap_{n\ge1}(a-\frac1n,b+\frac1n)$). This shows that $\mathbb R\setminus [a,b]\subseteq \mathbb R\setminus \bigcap_{n\ge1}(a-\frac1n,b+\frac1n)$. But this is equivalent to $[a,b]\supseteq \bigcap_{n\ge1}(a-\frac1n,b+\frac1n)$. 
Finally using that $[a,b]\subseteq\bigcap_{n\ge1}(a-\frac1n,b+\frac1n)$ and $[a,b]\supseteq\bigcap_{n\ge1}(a-\frac1n,b+\frac1n)$ we conclude that $[a,b]=\bigcap_{n\ge1}(a-\frac1n,b+\frac1n)$. 
A: Suppose $x \in [a,b]$; can you show that $$x \in \cap_{n \in \mathbb{N}}(a-1/n,b+1/n),$$ ie $$x \in (a-1/n, b+1/n) \ \forall\ n \in \mathbb{N}?$$ Conversely, suppose $x \notin [a,b]$; can you show that $$x \notin \cap_{n \in \mathbb{N}}(a-1/n,b+1/n),$$ ie $$\exists n\in\mathbb{N} \ \text{such that} \ x \notin (a-1/n,b+1/n)?$$ If you can do this, then you'll have shown exactly the result.

Note that, for sets $A$ and $B$, $A = B$ if and only if {$A \subseteq B, B \subseteq A$} if and only iff {$A \subseteq B, A^c \subseteq B^c$}. I have shown that, letting $A = [a,b]$ and $B = \cap_{n \in \mathbb{N}}(a-1/n,b+1/n)$, $A \subseteq B$ in the first part and $A^c \subseteq B^c$ in the second (converse) part).
Showing $A^c \subseteq B^c$ instead of $B \subseteq A$ is proving the contrapositive, which is sometimes easier. (Alternatively, it could be looked at as a "proof by contradiction".)
