From a Countable Base to Function Coordinates
Continuous functions can record topological information about points. To distinguish two points, it is enough to find a continuous function that takes different values at them. A stronger goal is to choose functions that also recover every open set: around each point of an open set, one function should be positive there and vanish outside the open set. In a regular second-countable space, a countable base supplies the data for making these choices countably many times.
The key base pairs are not arbitrary. We need pairs \(B,C\in\mathcal{B}\) for which \(\overline{B}\subseteq C\). For such a pair, the closed sets \(\overline{B}\) and \(X\setminus C\) are disjoint. Urysohn's lemma can then give a continuous function equal to \(1\) on \(\overline{B}\) and \(0\) on \(X\setminus C\). We first justify that the required normality is available.
Why Regularity and a Countable Base Give Normality
Proof. Let \(A\) and \(D\) be disjoint closed subsets of \(X\). If either is empty, the open sets \(\varnothing\) and \(X\) separate them. Assume both are nonempty. A second-countable space, and each of its subspaces, is Lindelöf: every open cover has a countable subcover. Indeed, the subspace has a countable base. For each basis element that is contained in a member of the cover, choose one such cover member. The chosen members form a countable subcover, since each point lies in a basis element contained in a cover member.
For each \(a\in A\), regularity gives an open set \(U_a\) containing \(a\) whose closure misses \(D\). To see the closure condition, take disjoint open neighborhoods of \(a\) and \(D\); the closure of the first misses the second. The sets \(U_a\) cover \(A\), so the Lindelöf property of the subspace \(A\) gives a countable subcover \((U_i)\). Similarly, choose a countable open cover \((V_j)\) of \(D\) such that each \(\overline{V_j}\) misses \(A\). Define \[ U=\bigcup_i\left(U_i\setminus\bigcup_{j\leq i}\overline{V_j}\right), \qquad V=\bigcup_j\left(V_j\setminus\bigcup_{i\leq j}\overline{U_i}\right). \] Each term in these unions is open, because it removes only a finite union of closed sets from an open set. Each \(a\in A\) lies in some \(U_i\) and in none of the \(\overline{V_j}\), so \(a\in U\); likewise \(D\subseteq V\). If a point belonged to the \(i\)-th term of \(U\) and the \(j\)-th term of \(V\), then \(i\leq j\) would make the latter term exclude \(\overline{U_i}\), or \(j\leq i\) would make the former exclude \(\overline{V_j}\). Both are impossible. Thus \(U\) and \(V\) are disjoint open neighborhoods of \(A\) and \(D\), proving normality. \(\square\)
We now use Urysohn's lemma, the standard result that in a normal space, for disjoint closed sets \(F,G\), there is a continuous function \(f:X\to[0,1]\) with \(f=1\) on \(F\) and \(f=0\) on \(G\). The interval \([0,1]\) has its usual subspace topology from \(\mathbb{R}\). The lemma is used here in this precise form.
The Countable Family from Nested Base Pairs
Proof. Fix a countable base \(\mathcal{B}\), and consider the set of ordered pairs \[ \mathcal{P}=\{(B,C)\in\mathcal{B}\times\mathcal{B}:\overline{B}\subseteq C\}. \] It is countable because it is a subset of the countable set \(\mathcal{B}\times\mathcal{B}\). For every \((B,C)\in\mathcal{P}\), the sets \(\overline{B}\) and \(X\setminus C\) are disjoint and closed. Normality and Urysohn's lemma give a continuous \(f_{B,C}:X\to[0,1]\) such that \(f_{B,C}=1\) on \(\overline{B}\) and \(f_{B,C}=0\) on \(X\setminus C\). Thus \(\{x:f_{B,C}(x)>0\}\subseteq C\).
We verify that there are enough such pairs. Given \(x\in O\) with \(O\) open, choose \(C\in\mathcal{B}\) with \(x\in C\subseteq O\). Regularity gives an open \(W\) containing \(x\) with \(\overline{W}\subseteq C\): separate \(x\) from the closed set \(X\setminus C\), and take the closure of the neighborhood of \(x\). Choose \(B\in\mathcal{B}\) with \(x\in B\subseteq W\). Then \(\overline{B}\subseteq\overline{W}\subseteq C\), so \((B,C)\in\mathcal{P}\), and \(f_{B,C}(x)=1\). Because \(C\subseteq O\), this function is zero outside \(O\). We have shown that every \(x\in O\) belongs to the positive set of a function from a pair with \(C\subseteq O\), while every such positive set is contained in \(O\). This proves the stated union formula.
Finally, if \(x\ne y\), the \(T_1\) property makes \(O=X\setminus\{y\}\) open and it contains \(x\). The construction gives a function with \(f(x)=1\) and \(f(y)=0\). It therefore separates \(x\) and \(y\). If \(X\) is empty, the empty family satisfies both conclusions, so that case is included as well. \(\square\)
The union formula also says that the family detects the topology. Each \(f\) is continuous, so its inverse images of open subsets of \([0,1]\) are open in \(X\). Conversely, \((0,1]\) is open in \([0,1]\), and the formula writes every open subset of \(X\) as a union of sets \(f^{-1}((0,1])\). Thus the original open sets can be recovered from the functions.
Worked Constructions
Worked Example: Nested Rational Intervals in the Real Line
In \(\mathbb{R}\) with its standard topology, rational-endpoint open intervals form a countable base. Consider \(B=(0,2)\) and \(C=(-1,3)\). Their closures satisfy \(\overline{B}=[0,2]\subset C\). A function for this pair is $$ f(x)= \begin{cases} 0,&x\leq -1,\\ x+1,&-1\leq x\leq 0,\\ 1,&0\leq x\leq 2,\\ 3-x,&2\leq x\leq 3,\\ 0,&x\geq 3. \end{cases} $$
The formulas agree at every shared endpoint: the values at \(-1,0,2,3\) are respectively \(0,1,1,0\) from either adjoining piece. Each piece is continuous, so the matching endpoint values make \(f\) continuous on \(\mathbb{R}\). For \(x=1\), the middle piece gives \(f(1)=1\); for \(x=4\), the last piece gives \(f(4)=0\). Thus these two points are separated. Also, \(f(x)=0\) whenever \(x\notin C\), as required for the pair.
For a function positive near \(1\) but zero outside \(O=(0,2)\), take \(B=(1/2,3/2)\) and \(C=(1/4,7/4)\). Then \(\overline{B}=[1/2,3/2]\subset C\subset O\). The function from this pair equals \(1\) at \(1\), and equals \(0\) at every point outside \(C\), hence outside \(O\). This illustrates how the pair chosen for open-set detection can be made to lie inside the specified open set.
Worked Example: A Finite Discrete Space
Let \(X=\{a,b,c\}\) have the discrete topology, so every subset is open. Use the base of singletons \(\mathcal{B}=\{\{a\},\{b\},\{c\}\}\). Each singleton is closed as well as open, so \((\{a\},\{a\})\), \((\{b\},\{b\})\), and \((\{c\},\{c\})\) are suitable pairs. Their functions take value \(1\) on the named singleton and \(0\) elsewhere. In the order \(a,b,c\), their values are $$ \begin{array}{c|ccc} & a&b&c\\ \hline f_{\{a\},\{a\}}&1&0&0\\ f_{\{b\},\{b\}}&0&1&0\\ f_{\{c\},\{c\}}&0&0&1 \end{array} $$
For example, the first and second functions distinguish \(a\) from \(b\), since their values at those points are \(1,0\) and \(0,1\), respectively. For \(O=\{a,c\}\), the functions associated with \(\{a\}\) and \(\{c\}\) have positive sets \(\{a\}\) and \(\{c\}\); their union is exactly \(O\). For \(O=\varnothing\), the union of no positive sets is \(\varnothing\). Thus the formula works for these sets, including the empty open set.
Worked Example: A Convergent Sequence with Its Limit
Let \(X=\{0\}\cup\{1/n:n\in\mathbb{N}\}\) with the subspace topology inherited from \(\mathbb{R}\). Consider the relative open sets \(B=X\cap(-1/8,1/4)\) and \(C=X\cap(-1/4,1/2)\). We have \(B=\{0\}\cup\{1/n:n\geq5\}\) and \(C=\{0\}\cup\{1/n:n\geq3\}\). The closure of \(B\) in \(X\) is \(B\): its complement in \(X\) is the finite set \(\{1,1/2,1/3,1/4\}\), whose points are isolated and therefore form an open set. Hence \(\overline{B}=B\subset C\).
Define a continuous function on \(\mathbb{R}\) by $$ F(t)= \begin{cases} 0,&t\leq -1/4,\\ 8(t+1/4),&-1/4\leq t\leq -1/8,\\ 1,&-1/8\leq t\leq 1/4,\\ 2-4t,&1/4\leq t\leq 1/2,\\ 0,&t\geq 1/2. \end{cases} $$ The formulas agree at \(-1/4,-1/8,1/4,1/2\), with values \(0,1,1,0\), respectively. Restrict \(F\) to \(X\) to obtain a continuous function \(f:X\to[0,1]\). We have \(f(0)=1\) and \(f(1)=0\). Also, \(f(1/2)=2-4(1/2)=0\), \(f(1/3)=2-4/3=2/3\), and \(f(1/4)=1\). For \(n\geq5\), \(1/n<1/4\), so \(f(1/n)=1\). The values confirm that \(f\) is positive on points of \(C\) and zero outside \(C\), including at \(1\) and \(1/2\). In particular, this function detects the neighborhood \(X\setminus\{1\}\) of \(0\): its positive set contains \(0\) and is contained in that neighborhood.
Check: the decreasing-piece calculation at \(1/3\) gives \(2-4/3=2/3>0\), while at \(1/2\) it gives \(2-2=0\). These values match the claimed inclusion of the positive set in \(C\).
A Common Pitfall
Common mistake: choosing any two base elements that contain the desired point and assuming Urysohn's lemma applies. For instance, in \(\mathbb{R}\), take \(B=(0,2)\) and \(C=(1,3)\). Although both contain \(1.5\), the required closed sets intersect: $$ \overline{B}\cap(\mathbb{R}\setminus C)=[0,2]\cap\bigl((-\infty,1]\cup[3,\infty)\bigr)=[0,1]\ne\varnothing. $$ They are not disjoint, so Urysohn's lemma does not give a function equal to \(1\) on \(\overline{B}\) and \(0\) outside \(C\). The correction is to choose a genuinely nested pair, such as \(B=(0,2)\) and \(C=(-1,3)\), for which \([0,2]\subset(-1,3)\). The closure containment is the condition that makes the construction work.
Check Your Understanding
Use the nested-pair construction and verify the closure containment whenever you select a pair.
- In \(\mathbb{R}\), choose rational-endpoint intervals \(B,C\) with \(1\in B\), \(\overline{B}\subset C\), and \(C\subset(0,2)\). What does the associated function do at \(1\) and outside \((0,2)\)?
- Explain why the family of ordered pairs from a countable base is countable.
- In the theorem, why is \(X\setminus\{y\}\) open when \(X\) is \(T_1\)? How does this give a function separating \(x\ne y\)?
- For \(X=\{0\}\cup\{1/n:n\in\mathbb{N}\}\), find a relative open neighborhood of \(0\) that excludes \(1\), and describe what the detecting function must satisfy.
- Explain why the set \((0,1]\) is open in the subspace \([0,1]\), and how that fact recovers open sets from the functions.