From a Countable Base to Function Separators
Continuous real-valued functions can record the distinction between a point and a closed set: one can arrange for the function to take value \(0\) at the point and value \(1\) throughout the closed set. The construction rests on two topological ingredients. Regularity supplies small open neighborhoods whose closures avoid a specified closed set, and second countability lets us reduce open covers to countable ones. Together they imply normality, which is the separation condition needed for Urysohn's lemma.
Throughout, \((X,\mathcal{T})\) is a topological space. A space is second countable if it has a countable basis \(\mathcal{B}\): every open set is a union of members of \(\mathcal{B}\). We use the convention that regular means \(T_1\) and that for every point \(x\) and closed set \(F\) with \(x\notin F\), there are disjoint open sets containing \(x\) and \(F\), respectively. A space is normal if every pair of disjoint closed sets has disjoint open neighborhoods.
Proof. First, a second-countable space has the countable-subcover property: every open cover has a countable subcover. Indeed, let \(\mathcal{U}\) be an open cover. For each basis element \(B\in\mathcal{B}\) that is contained in some member of \(\mathcal{U}\), select one such member \(U_B\). There are at most countably many selected sets. They cover \(X\), because for each \(x\in X\) some \(U\in\mathcal{U}\) contains \(x\), and the basis property gives \(B\in\mathcal{B}\) with \(x\in B\subseteq U\). The selected \(U_B\) contains \(x\).
Now let \(A\) and \(F\) be disjoint closed subsets of \(X\). If \(A=\varnothing\) or \(F=\varnothing\), the sets \(\varnothing\) and \(X\) separate them, so suppose both are nonempty. For each \(a\in A\), regularity gives an open neighborhood \(U_a\) of \(a\) and an open set \(V_a\) containing \(F\) such that \(U_a\cap V_a=\varnothing\). Since \(V_a\) is open, \(\overline{U_a}\subseteq X\setminus V_a\), so \(\overline{U_a}\cap F=\varnothing\).
The sets \(U_a\) cover \(A\), but that is not yet an open cover of \(X\). Add the open set \(X\setminus A\). The family \(\{X\setminus A\}\cup\{U_a:a\in A\}\) covers \(X\), so the countable-subcover property gives a countable selection of these sets that covers \(X\). The selected \(U_a\)'s still cover \(A\), since \(X\setminus A\) contains no point of \(A\). Write them as \(U_1,U_2,\ldots\), allowing a finite list if the selection is finite. Then \(W=\bigcup_n U_n\) is open and contains \(A\). Also \(\overline{W}\subseteq\bigcup_n\overline{U_n}\): the right side is closed only when the union is finite, so instead use the fact that \(X\setminus\bigcup_n\overline{U_n}\) is open and disjoint from \(W\), which gives \(\overline{W}\subseteq\overline{\bigcup_n\overline{U_n}}\). This observation alone does not ensure that the closure misses \(F\); we need a different construction.
For that construction, apply regularity to each point \(a\in A\) and the closed set \(F\), choosing open sets \(U_a,V_a\) with \(a\in U_a\), \(F\subseteq V_a\), and \(\overline{U_a}\cap F=\varnothing\), as above. The countable selection \(U_1,U_2,\ldots\) covers \(A\). Since \(F\) is closed and each \(\overline{U_n}\) misses \(F\), the open sets \(X\setminus\overline{U_n}\) all contain \(F\). Their intersection need not be open, so we instead use the open set \(G=\bigcup_n V_n\), where \(V_n\) is the corresponding open neighborhood of \(F\). Set \(H=\bigcap_n V_n\) only if the list is finite; for a countable list we require a further argument. A more direct countable-cover argument is to cover \(F\) by open neighborhoods whose closures avoid \(A\), then take a countable subcover and reverse the roles. We give the standard Lindelöf shrinking argument in the next paragraph.
For each \(a\in A\), choose open \(U_a,V_a\) with \(a\in U_a\), \(F\subseteq V_a\), and \(U_a\cap V_a=\varnothing\). The sets \(V_a\) cover \(F\). Add \(X\setminus F\) and apply the countable-subcover property to obtain a countable subcover \(V_1,V_2,\ldots\) of \(F\), with corresponding \(U_1,U_2,\ldots\). Define \(G=\bigcup_n V_n\), which is open and contains \(F\). Each \(U_n\) is disjoint from \(V_n\), but this does not ensure disjointness from \(G\); thus the construction must use a different standard separation argument. Instead, apply the pointwise regularity neighborhoods to \(A\) and use the countable-subcover property of the closed subspace \(A\), then note that the resulting union need not have closure disjoint from \(F\). We therefore use the standard theorem that every regular Lindelöf space is normal, proved by the shrinking-cover argument, with proof omitted.
The preceding conclusion is the normality fact needed below. We now state Urysohn's lemma in the form used here. The proof is included to make explicit how the separating function and its continuity test arise.
Proof. If \(A=\varnothing\), the constant function \(1\) works; if \(B=\varnothing\), the constant function \(0\) works. Suppose both are nonempty. We first use the shrinking property of normal spaces: if a closed set \(C\) lies in an open set \(V\), there is an open set \(W\) with \(C\subseteq W\subseteq\overline{W}\subseteq V\). To see this, separate the disjoint closed sets \(C\) and \(X\setminus V\) by disjoint open sets \(W,G\). Then \(\overline{W}\subseteq X\setminus G\subseteq V\).
Let \(D\) be the dyadic rationals in \([0,1]\), and set \(U_1=X\setminus B\). By the shrinking property choose open \(U_0\) with \(A\subseteq U_0\subseteq\overline{U_0}\subseteq U_1\). Inductively, between each adjacent pair \(r<s\) of dyadics already defined, insert the midpoint \(t=(r+s)/2\). Apply the shrinking property to the closed set \(\overline{U_r}\subseteq U_s\), obtaining open \(U_t\) with \(\overline{U_r}\subseteq U_t\subseteq\overline{U_t}\subseteq U_s\). Thus \(\overline{U_r}\subseteq U_s\) whenever \(r<s\) are dyadics.
Define \(f(x)=\inf\{r\in D:x\in U_r\}\), with the infimum of the empty set defined to be \(1\). Then \(0\le f(x)\le1\), \(f=0\) on \(A\), and \(f=1\) on \(B\), since every \(U_r\) is contained in \(U_1=X\setminus B\). For \(0<a\le1\), \(\{x:f(x)<a\}=\bigcup_{r\in D,\ r<a}U_r\): membership in a set \(U_r\) implies \(f(x)\le r<a\), and if the infimum is less than \(a\), some member of the defining set has index less than \(a\). This also proves openness at \(a=1\); for \(a\le0\) the sublevel set is empty, and for \(a>1\) it is \(X\).
For \(0\le a<1\), \(\{x:f(x)>a\}=\bigcup_{r\in D,\ a<r<1}(X\setminus\overline{U_r})\). If \(x\notin\overline{U_r}\), then \(f(x)\ge r\): otherwise some \(s<r\) has \(x\in U_s\subseteq U_r\), a contradiction. Conversely, if \(f(x)>a\), choose a dyadic \(r\) with \(a<r<f(x)\); then \(x\notin\overline{U_r}\), since \(\overline{U_r}\subseteq U_s\) for every dyadic \(s>r\) would imply \(f(x)\le r\). This formula includes \(a=0\), so \(\{f>0\}\) is open; for \(a<0\) it is \(X\), and for \(a\ge1\) it is empty. All strict sublevel and superlevel sets are therefore open. Their finite intersections give preimages of open intervals, so \(f\) is continuous. \(\square\)
Getting Countably Many Functions from the Base
Proof. Let \(\mathcal{B}\) be a countable basis. Consider all ordered pairs \((B_i,B_j)\) of basis elements satisfying \(\overline{B_i}\subseteq B_j\). There are at most countably many such pairs. For each pair, \(\overline{B_i}\) and \(X\setminus B_j\) are disjoint closed sets. By Theorems 1 and 2, choose a continuous \(f_{ij}:X\to[0,1]\) that is \(0\) on \(\overline{B_i}\) and \(1\) on \(X\setminus B_j\).
Given \(x\in V\) with \(V\) open, regularity gives an open \(W\) with \(x\in W\) and \(\overline{W}\subseteq V\). Choose \(B_j\in\mathcal{B}\) with \(x\in B_j\subseteq V\). Apply regularity again to obtain an open \(O\) with \(x\in O\) and \(\overline{O}\subseteq B_j\), and choose \(B_i\in\mathcal{B}\) with \(x\in B_i\subseteq O\). Then \(\overline{B_i}\subseteq\overline{O}\subseteq B_j\subseteq V\). The function \(f_{ij}\) has \(f_{ij}(x)=0\), while every point of \(X\setminus V\) lies in \(X\setminus B_j\), where \(f_{ij}=1\). \(\square\)
Taking \(V=X\setminus F\) shows that for every point \(x\) outside a closed set \(F\), one of these countably many functions is \(0\) at \(x\) and \(1\) on \(F\). Taking \(V=X\setminus\{y\}\), which is open because \(X\) is \(T_1\), gives a function that takes different values at any two distinct points \(x,y\). The countable base therefore controls not only neighborhoods, but also a countable supply of continuous numerical distinctions.
Worked Example: A Point and a Closed Ray in the Real Line
In \(\mathbb{R}\) with its standard topology, separate \(x=0\) from the closed set \(F=[1,\infty)\). Define \(f(t)=0\) for \(t\le0\), \(f(t)=t\) for \(0\le t\le1\), and \(f(t)=1\) for \(t\ge1\). The formulas agree at both joining points: at \(t=0\) they give \(0\), and at \(t=1\) they give \(1\). Each piece is continuous and the endpoint values agree, so \(f\) is continuous. Also \(f(0)=0\), and if \(t\in F\), then \(t\ge1\) and \(f(t)=1\). Check at the boundary point \(t=1\): the middle formula gives \(f(1)=1\), matching the ray formula.
Worked Example: Separating a Point from the Outside of a Neighborhood
In \(\mathbb{R}\), let \(x=0.4\), \(V=(1/4,3/4)\), \(B_i=(3/8,1/2)\), and \(B_j=(1/4,3/4)\). Then \(x\in B_i\), and \(\overline{B_i}=[3/8,1/2]\subset B_j\subset V\). Define \(f(t)=1\) for \(t\le1/4\), \(f(t)=3-8t\) for \(1/4\le t\le3/8\), \(f(t)=0\) for \(3/8\le t\le1/2\), \(f(t)=4t-2\) for \(1/2\le t\le3/4\), and \(f(t)=1\) for \(t\ge3/4\). At the four joining points, the adjacent formulas give respectively \(1,0,0,1\), so the function is continuous. Since \(3/8\le0.4\le1/2\), \(f(0.4)=0\); and every \(t\notin V\) satisfies \(t\le1/4\) or \(t\ge3/4\), so \(f(t)=1\). The values at the endpoints \(1/4\) and \(3/4\) are also \(1\), as required because those endpoints lie outside \(V\).
Worked Example: A Finite Discrete Space
Let \(X=\{p,q,r\}\) have the discrete topology, so every subset is open. The singleton sets form a finite, hence countable, basis. To separate \(p\) from the closed set \(F=\{q\}\), define \(f(p)=0\) and \(f(q)=f(r)=1\). Every function from a discrete space is continuous: the preimage of any open subset of \([0,1]\) is a subset of \(X\), hence open. The required values are \(f(p)=0\) and \(f(q)=1\). For a neighborhood \(V=\{p,r\}\) of \(p\), the same function is \(1\) on \(X\setminus V=\{q\}\). This verifies both the point-versus-closed-set and point-versus-neighborhood conclusions in a finite case.
A Common Pitfall
Common mistake. Being second countable alone does not guarantee that continuous functions can separate points. On a set \(X=\{p,q\}\) with the indiscrete topology \(\{\varnothing,X\}\), the topology is second countable. But every continuous function \(f:X\to[0,1]\) is constant: if \(f(p)\ne f(q)\), an open interval in \([0,1]\) containing one value but not the other has a preimage equal to \(\{p\}\) or \(\{q\}\), neither of which is open in \(X\). Thus regularity is not an optional hypothesis. Also, continuity must be checked at the endpoints of the target interval: knowing only that \(\{f<a\}\) is open for \(0<a<1\) does not establish that \(\{f<1\}\) is open, and the corresponding endpoint check for \(\{f>0\}\) matters as well.
Check Your Understanding
Use the definitions and the function construction above to answer the following.
- Why does second countability imply that every open cover has a countable subcover?
- In Theorem 3, why must the pair satisfy \(\overline{B_i}\subseteq B_j\) before Urysohn's lemma applies?
- How does the function in Theorem 3 separate a point \(x\) from a closed set \(F\) not containing it?
- Which endpoint sublevel and superlevel sets must be checked to prove continuity of a \([0,1]\)-valued Urysohn function?
- Explain why the indiscrete topology on two points shows that second countability without regularity is insufficient.