Lemma 4.10.2 (Urysohn). Let $X$ be a normal topological space, $A, B \subset X$ be closed with $A \cap B = \emptyset$, then
There exists $\bracs{U_q| q \in \rational \cap [0, 1]}\subset \cn(A)$ such that
$U_{1} = B^{c}$.
For any $p, q \in \rational \cap [0, 1]$ with $p < q$, $\overline{U_p}\subset U_{q}$.
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$,
$U_{1} = B^{c}$.
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
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
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
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,
is open.$\square$