Borel sets: alternative characterization for metric space For any topological space $(X,\tau)$, the Borel $\sigma$-algebra $\mathcal{B}$ is the $\sigma$-algebra generated by the open sets. In other words, it is the intersection of all $\sigma$-algebras on $X$ which contain $\tau$.
For a metric space $(X,d)$, I want to prove the following alternative characterization.

The family of Borel sets of a metric space $(X,d)$ is the smallest class $\mathcal{S}$ of subsets of $X$ with the properties
  
  
*
  
*If $E_1,E_2,E_3,\ldots$ belong to $\mathcal{S}$, then so too does $\bigcup_{n=1}^{\infty}E_n$
  
*If $E_1,E_2,E_3,\ldots$ belong to $\mathcal{S}$, then so too does $\bigcap_{n=1}^{\infty}E_n$
  
*$\mathcal{S}$ contains all the closed sets in $X$.
  
  
  (Bruckner, Bruckner, and Thomson, Real Analysis, Theorem 3.3; proof is an exercise)

My questions:


*

*I have completed most of the proof, but I have not succeeded at proving that $\mathcal{S}$ is closed under taking complements. A hint would be great.

*My proof relies heavily on $X$ being a metric space. Can the result be generalized to, say, a Hausdorff space, or is there a counterexample?


Proof attempt:
$\mathcal{B}$ is a class of subsets of $X$ satisfying the three indicated properties. Since $\mathcal{S}$ is the smallest class of subsets of $X$ with these properties, we have the containment $\mathcal{S} \subseteq \mathcal{B}$.
To show that $\mathcal{B} \subseteq \mathcal{S}$, it suffices to show that $\mathcal{S}$ is a $\sigma$-algebra containing the open subsets of $X$, because $\mathcal{B}$ is the smallest such $\sigma$-algebra.
Let $U \subseteq X$ be any open set. Then $U^c$ is closed.
Consider the function $\rho : X \to \mathbb{R}$ defined by $\rho(x) = d(x,U^c)$. Then $\rho$ is continuous. Indeed, if $x,y \in X$ and $z \in U^c$, then $d(x,z) \leq d(x,y) + d(y,z)$; taking the infimum over $z \in U^c$, we have $\rho(x) \leq d(x,y) + \rho(y)$. Similarly, $\rho(y) \leq d(x,y) + \rho(x)$. Combining these inequalities, we have
$$|\rho(x) - \rho(y)| \leq d(x,y)$$
so in fact, the continuity is uniform.
Note also that $\rho(x) = 0$ if and only if $x \in U^c$, because $U^c$ is closed. Therefore,
$$\begin{aligned}
U &= \{x \in X : \rho(x) > 0\} \\
&= \bigcup_{n=1}^{\infty} \{x \in X : \rho(x) \geq 1/n\} \\
&= \bigcup_{n=1}^{\infty} \rho^{-1}([1/n, \infty)) \\
\end{aligned}$$
This exhibits $U$ as a countable union of closed sets, so $U \in \mathcal{S}$.
To complete the proof, we need to verify that $\mathcal{S}$ is a $\sigma$-algebra. Since $\mathcal{S}$ contains $X$ and is closed under countable unions, we just need to show that it is closed under taking complements. Note that so far, we have only used properties 1 and 3 of $\mathcal{S}$, so presumably we will need property 2 here.
Let $A \in \mathcal{S}$. I want to show that $A^c \in \mathcal{S}$. Unfortunately, I can't use the same method as above because $\rho(x) = 0$ is true for any limit point of $A$, whether or not it is in $A$.
 A: For the answer to the first question: let $\mathcal S' = \{A \in \mathcal S : A^C \in \mathcal S\}$.  See that $\mathcal S'$ contains all open sets, that $\mathcal S'$ is closed under taking complements, and that $\mathcal S'$ is closed under countable unions.
A: For a non-metrizable but locally compact Hausdorff counterexample, consider $\omega_1$ with its order topology.  I will show that $\mathcal{S}$ does not even contain all the open sets.
Let $\mathcal{B}$ be the collection of all sets $B \subset \omega_1$ such that either $B$ is countable or $B$ contains a club set.  (We consider "countable" to include "finite".)
I claim $\mathcal{B}$ contains all the closed sets and is closed under countable union and intersection.  It will follow that $\mathcal{S} \subset \mathcal{B}$.
Suppose $F \subset \omega_1$ is closed.  If $F$ is countable, then $F \in \mathcal{B}$ by definition.  If $F$ is uncountable, then it is unbounded, so it is a club, and thus $F \in \mathcal{B}$ again.
Now suppose $A_1, A_2, \dots \in \mathcal{B}$.
If all $A_n$ are countable, then $A = \bigcup_n A_n$ is also countable.  Otherwise, some $A_n$ contains a club, so $A$ also contains a club.  In either case $A \in \mathcal{B}$.
If some $A_n$ is countable, then $A' = \bigcap_n A_n$ is also countable.  Otherwise, each $A_n$ contains a club $F_n$.  A countable intersection of clubs is a club, so $F = \bigcap_n F_n$ is a club and contained in $A'$.  In either case $A'  \in \mathcal{B}$.
This shows $\mathcal{S} \subset \mathcal{B}$. Now let $U$ be the set of all successor ordinals.  I claim $U$ is open and $U \notin \mathcal{B}$.  To see $U$ is open, simply note that each successor ordinal is an isolated point.
Now $U$ is unbounded, hence uncountable.  And every club contains a limit ordinal.  (If $C$ is a club, since it is unbounded we can find an increasing sequence $\alpha_1 < \alpha_2 < \dots$ in $C$.  But then $\alpha = \sup_n \alpha_n$ is in $C$, because $C$ is closed, and $\alpha$ must be a limit ordinal.)  So $U$ does not contain a club.  Hence $U \notin \mathcal{B}$, and we have constructed an open set which is not in $\mathcal{S}$.
To turn this into a compact Hausdorff example, consider $\omega_1 + 1$ and let $\mathcal{B}' = \{B \subset \omega_1 + 1 : B \cap \omega_1 \in \mathcal{B}\}$.  
