Are there minimal topological conditions on a space $X$ for it to have a countable separating set?


A separating set here is a set $D \subset C(X)$ (where $C(X)$ is the space of continuous functions from $X$ to $\mathbb{R}$) such that for every pair of points $x \neq y$ there is a function $f \in D$ satisfying $f(x) \neq f(y)$. I know that second-countable and normal Hausdorff are sufficient to have a countable separating set, but if one takes $X$ to be a reflexive and separable Banach space with the weak topology, there is a countable separating set despite not being even second-countable. So second-countability is not necessary.



Are there minimal topological conditions on a space  for it to have a countable separating set?
With the help of the comments by erz, I will prove the following fact:



> 
> $(X,\tau)$ admits a countable separating function set if and only if there exists a weaker topology $\tau^\*\subset\tau$ such that $(X,\tau^\*)$ is Hausdorff regular (i.e. $T\_3$) and second countable.
> 
> 
> 


### Comments


Let me first make a few comments.


* Regular second countable spaces are completely normal, so is it equivalent that $\tau^\*$ is Hausdorff second countable completely normal (i.e. $T\_5$).
* In terms of open sets of $\tau$, the condition can be rephrased as such: there exists a collection of open sets $U\_i$, $i\in I$ such that


	1. (base) for every $x\in U\_i\cap U\_j$, there exists $k$ such that $x\in U\_k$ and $U\_k\subset U\_i\cap U\_j$
	2. (Hausdorff) it separates points, i.e. for each pair $x\neq y$ there are disjoints sets $U\_i$, $U\_j$ such that $x\in U\_i$ and $y\in U\_j$;
	3. (regular) for each $x\in U\_i$, there exists $j$ such that $x\in U
	\_j$ and for all $y\in U\_i^\complement$, $y\in U\_k\subset U\_j^\complement$ for some $k=k(y)$ (think $\overline{U\_j}\subset U\_i$, but take the closure with respect to $\tau^\*$).
	4. (second countable) $I$ is countable.Indeed, if such a family exists, then the topology it generates gives a suitable $\tau^\*$, and if a Hausdorff regular second countable $\tau^\*$ exists, any of its countable bases gives a suitable $U\_i$.
* [Urysohn's metrisation theorem](https://en.wikipedia.org/wiki/Metrizable_space#Urysohn%27s_metrization_theorem) asserts that a Hausdorff regular second countable space is metrisable. In particular, it means that a Hausdorff space is regular second countable if and only if it is metrisable separable. In other words, a space $(X,\tau)$ admits a countable separating function set if and only if there exists a weaker $\tau^\*$ that is metrisable separable, i.e. it admits a distance $d$ such that the associated open balls are open in $\tau$ and there exists a countable subset of $X$ that intersects every open ball.


### Proof (open sets)


$(\Rightarrow)$ For the direct implication, suppose that we are given a countable $D\subset C(X)$ that separates points. Then we can define the family $\mathcal V$ of open sets of the form $f^{-1}(a,b)$, for $f\in D$ and $a,b\in\mathbb Q$, and the family $\mathcal U$ of finite intersections of elements of $\mathcal V$. Let us show that the topology $\tau^\*\subset\tau$ generated by $\mathcal U$ is Hausdorff regular second countable. As discussed above, we can reduce the proof to statements about $\mathcal U$.


* (base) $\mathcal V$ is stable by finite intersection.
* (Hausdorff) For a given pair $x\neq y$, because $D$ separates points, we have $f(x)\neq f(y)$ for some $f\in D$; without loss of generality, $a<f(x)<b<f(y)<c$ for some $a,b,c\in\mathbb Q$, and $f^{-1}(a,b)$, $f^{-1}(b,c)$ are disjoint sets in $\mathcal U$ containing respectively $x$ and $y$.
* (regular) Let $U\_1,\ldots,U\_n$ be elements of $\mathcal V$, i.e. $U\_i=f\_i^{-1}(a\_i,b\_i)$, $f\_i\in D$, $a\_i,b\_i\in\mathbb Q$. If $x$ belongs to the intersection $U$ of the $U\_i$, then $a\_i<f\_i(x)<b\_i$ and we can find $\alpha\_i,\beta\_i\in\mathbb Q$ such that $a\_i<\alpha\_i<f\_i(x)<\beta\_i<b\_i$. Then the intersection $U'$ of the sets $U'\_i:=f\_i^{-1}(\alpha\_i,\beta\_i)$ contains $x$. Suppose $y$ is not in $U$, for instance $f\_1(y)\geq b\_1$. Then $y\in f\_1^{-1}(\beta\_1,M)\subset (U')^\complement$ for some $M\in\mathbb Q$ large enough. Other possibilities for $y$ are treated similarly.
* (second countable) Elements of $\mathcal V$ are described by finite sequences of elements of $\mathcal U$, which in turn are described by elements of $D\times\mathbb Q\times\mathbb Q$.


$(\Leftarrow)$ In the other direction, let $\tau^\*\subset\tau$ be a Hausdorff regular second countable topology on $X$, and $(U\_n)\_{n\geq0}$ a countable basis of $\tau^\*$. For each $(n,m)$, choose if possible a continuous $f\_{nm}:(X,\tau)\to\mathbb R$ such that $(f\_{nm})\_{|U\_n}\equiv 0$, $(f\_{nm})\_{|U\_m}\equiv 1$. If there is no such function, have $f\_{nm}\equiv 1/2$. The set $D:=\lbrace f\_{nm},n,m\in\mathbb N\rbrace$ is obviously countable; let us show that it separates points.


We work in $\tau^\*$ in this paragraph. Choose any $x\neq y$ in $X$. Because $X$ is Hausdorff, there exist $U,V$ disjoint open sets such that $x\in U$ and $y\in V$. Because it is regular, we have $x\in U'\subset\overline{U'}\subset U$ for some open set $U'$, and similarly for $y$. Since $(U\_n)\_{n\geq0}$ is a basis, we find $n,m$ such that $x\in U\_n\subset U'$ and $y\in U\_m\subset V'$. It follows that the closures $\overline {U\_n}$ and $\overline {U\_m}$ are disjoint (they belong to $\overline{U'}\subset U$ and $\overline{V'}\subset V$ respectively). Since $X$ is normal (regular second countable spaces are completely normal hence normal), [Urysohn's lemma](https://en.wikipedia.org/wiki/Urysohn%27s_lemma) shows that there exists some continuous function $f:(X,\tau^\*)\to\mathbb R$ such that $f\_{|\overline{U\_n}}\equiv 0$ and $f\_{|\overline{U\_m}}\equiv 1$. But then $f:(X,\tau)\to\mathbb R$ is continuous, so $f\_{nm}$ is not 1/2 but a function that is 0 (resp. 1) when restricted to $U\_n$ (resp. $U\_m$). In particular, $f\_{nm}(x)=0\neq1=f\_{nm}(y)$ for some $f\_{nm}\in D$.


### Proof (metric spaces)


As discussed, the condition on $(X,\tau)$ is equivalent to the existence of some separable metrisable $\tau^\*\subset\tau$.


$(\Rightarrow)$ This elegant proof is due to erz. Let $D$ be a countable separating function set. There is an obvious continuous function $(X,\tau)\to\mathbb R^D$ that sends $x$ to the collection of $f(x)$ for $f\in D$. Let $\tau^\*$ be the pulls back of the topology of $\mathbb R^D$. Because $D$ separates points, this map is injective, so $(X,\tau^\*)$ has the topology of a subset of $\mathbb R^D$ (its image). Since second countability and metrisability are hereditary properties (a subset of a metric/second countable space is metric/second countable) and a separable metric space is second countable, it suffices to show that $\mathbb R^D$ is metrisable separable. This is well known: $d(x,y):=\sum\_{k\geq0}\min(|y(f\_k)-x(f\_k)|,2^{-k})$, for $D=\lbrace f\_k\rbrace\_{k\geq0}$, is a metric generating the topology, and the set $\mathbb Q^{(D)}$ of rational sequences with finite support is countable dense.


$(\Leftarrow)$ Take $D=\lbrace y\mapsto d(x\_n,y) \rbrace$, for $d$ a metic generating $\tau^\*$ and $x\_n$ a dense sequence with respect to $\tau^\*$.


### For fun


There is no explicit use of Urysohn's metrisation theorem in the proof above, but one can suspect it is lurking in the shadows. Indeed, the proof I know of this result goes as follows. Suppose $(X,\tau^\*)$ is Hausdorff regular second countable. Construct a countable family $(f\_n)\_{n\geq0}$ of functions that separates points, by following the proof given above. Then $d(x,y):=\sum\_{n\geq0}\min(|f(y)-f(x)|,2^{-k})$ is a distance inducing $\tau^\*$.


