Lemma 4.10.2 (Urysohn). Let $X$ be a normal topological space, $A, B \subset X$ be closed with $A \cap B = \emptyset$, then

  1. There exists $\bracs{U_q| q \in \rational \cap [0, 1]}\subset \cn(A)$ such that

    1. $U_{1} = B^{c}$.

    2. For any $p, q \in \rational \cap [0, 1]$ with $p < q$, $\overline{U_p}\subset U_{q}$.

  2. There exists $f \in C(X; [0, 1])$ with $f|_{A} = 0$ and $f|_{B} = 1$.

Proof. (1): Let $\seq{q_n}$ be an enumeration of $\rational \cap (0, 1)$. For each $n \in \natp$, let $Q_{n} = \bracs{0, 1}\cup \bracs{q_k|1 \le k \le n}$.

Let $U_{1} = B^{c}$. By (2) of Definition 4.10.1, there exists $U_{0} \in \cn(A)$ such that $A \subset U_{0} \subset \ol{U_0}\subset B^{c}$. In which case, for $n = 0$,

  1. $U_{1} = B^{c}$.

  2. For any $p, q \in Q_{k}$ with $p < q$, $\overline{U_p}\subset U_{q}$.

Suppose inductively that $\bracs{U_q|q \in Q_n}$ has been constructed, and (ii) holds for $n$. Let $p = \max\bracs{r \in Q_n|r < q_{n+1}}$ and $q = \min\bracs{r \in Q_n|r > r_{n+1}}$. By (2) of Definition 4.10.1, there exists $U_{q_{n+1}}\in \cn^{o}(\overline{U_p})$ such that

\[U_{p} \subset \overline{U_p}\subset U_{q_{n+1}}\subset \overline{U_{q_{n+1}}}\subset U_{q}\]

and $\bracs{U_q|q \in Q_{n+1}}$ satisfies (ii) for $n + 1$.

Now suppose that $\bracs{U_q|q \in \rational \cap [0, 1]}$ has been constructed and (ii) holds for all $n \in \nat$. For any $p, q \in \rational \cap [0, 1]$ with $p < q$, there exists $n \in \nat$ such that $p, q \in Q_{n}$. In which case, $\ol{U_p}\subset U_{q}$ by (ii). Thus (b) holds.

(2): Let

\[f: X \to [0, 1] \quad x \mapsto \inf\bracs{q \in [0, 1] \cap \rational| x \in U_q}\]

where $f(x) = 1$ if $x \not\in \bigcup_{q \in [0, 1] \cap \rational}U_{q}$. Since $A \subset \bigcap_{q \in [0, 1] \cap \rational}U_{q}$ and $U_{1} = B^{c}$, $f|_{A} = 0$ and $f|_{B} = 1$.

Let $\alpha \in [0, 1]$, then

\[f^{-1}([0, \alpha)) = \bigcup_{\substack{q \in \rational \cap [0, 1] \\ q < \alpha}}U_{q}\]

is open. On the other hand, let $x \in X$, then $f(x) > \alpha$ if and only if there exists $q \in (\alpha, f(x)) \cap \rational$ such that $x \not\in U_{q}$. By (b) of (1), this is equivalent to the existence of $p \in (\alpha, f(x)) \cap \rational$ such that $x \not\in \ol{U_p}$. In which case,

\[f^{-1}((b, 1]) = \bigcup_{\substack{q \in \rational \cap [0, 1] \\ q > \alpha}}\overline{U_p}^{c}\]

is open.$\square$