Every Closed Set In $R^1$ is intersection of countable collection of open set. This is question I tried to solve as follows 
Consider $A$ be closed set in $\Bbb R$ Therefore $\Bbb{R}\smallsetminus A$ is Open set .Now By Representation theorem of open set ,Every open set in $\Bbb R$ can be written as union of countable collection of disjoint open interval.$\Bbb{R}\smallsetminus A=\bigcup I_n$ Where $I_n$ is open interval where n is form countable index set.$\Bbb{R}\smallsetminus(\Bbb{R}\smallsetminus A)=A$ $=\Bbb{R}\smallsetminus\cup I_n $ $=\bigcap (\Bbb{R}\smallsetminus I_n)$ which implies $A$ is countable intersection of Closed set . I had to prove that it is intersection of countable intersection of open set but I got other answer Where is my mistake in argument ? Any Help will be appreciated
 A: This works in every metric space $(X, d) $:
Hints:
Let $A$ be closed in $X$, then


*

*$A=\{x:d(x, A) =0\} $

*Consider $A_n:=\{x:d(x, A) <\frac1n\} $. 


where $d(x, A) $ denotes the distance of point $x$ to set $A$, i.e. 
$$d(x, A) =\inf_{a\in A} d(x, a) $$
And specifically for $\Bbb R$,  the distance function is given by $d(x, y) :=\vert y-x\vert$. 
A: For $k=1,2,...$, cover the real line with the intervals $(n/2^k-1/2^{k+1},(n+1)/2^k+1/2^{k+1})$, for $n\in\mathbb{Z}$. Define $U_k$ to be the union of those intervals in this collection that intersect your closed set $C$.
The claim is that $\cap_k U_k=C$. Clearly $C\subset\cap_k U_k$ because $C\subset U_k$ for all $k$.
Assume that $x\in\cap_k U_k$. Then for each $k$ there is an $n_k\in\mathbb{Z}$ such that $x\in(n_k/2^k-1/2^{k+1},(n_k+1)/2^k+1/2^{k+1})\subset U_k$. But this interval contains some point $c_k\in C$ by definition of $U_k$. Therefore, $c_k\to x$ because the sizes of those intervals $1/2^k-1/2^{k+1}\to0$. Therefore $x\in C$ because $C$ is closed.
