Urysohn's Lemma: Proof

$\newcommand{\cl}{\operatorname{cl}}$I prefer a more topological proof.

Let $D$ be the set of dyadic rationals in $[0,1]$. We shall construct a family $\{U(d):d\in D\}$ of sets $A \subseteq U(d) \subseteq \Omega\setminus B$, all open with the possible exception of $U(0)$, satisfying the condition that $\cl U(d_0)\subseteq U(d_1)$ whenever $d_0,d_1\in D$ and $d_0<d_1$.

For $n\in\Bbb Z^+_0$ = set of non-negative integers let $D_n = \{\frac{k}{2^n} : k\in\{0,\ldots,2^n\} \}$. We have $D_{n} \subseteq D_{n+1}$ and $\bigcup_{n=0}^\infty D_n = D$. We shall construct the desired $U(d)$ inductively for $d \in D_n$.

For $n = 0$ let $U(0)=A$ and $U(1)=\Omega\setminus B$. Note that $U(0)$ is closed, but in general not open.

Now suppose the $U(d)$ have been constructed for $d \in D_n$. By normality, for each $k\in\{0,\ldots,2^n\}$ there is an open $U\left(\frac{2k+1}{2^{n+1}}\right)$ such that

$$\cl U\left(\frac{k}{2^n}\right)=\cl U\left(\frac{2k}{2^{n+1}}\right)\subseteq U\left(\frac{2k+1}{2^{n+1}}\right)\subseteq\cl U\left(\frac{2k+1}{2^{n+1}}\right)\subseteq U\left(\frac{k+1}{2^n}\right)\;.$$

Let

$$h:\Omega\to[0,1]:x\mapsto\begin{cases} 1,&\text{if }x\notin U(1)\\ \inf\{d\in D:x\in U(d)\},&\text{otherwise}\;. \end{cases}$$

Clearly $h[A]=\{0\}$ and $h[B]=\{1\}$, so it only remains to show that $h$ is continuous. First note that if $r\in D$ and $x\in U(r)$, then $h(x)\le r$, while if $x\in\Omega\setminus\cl U(r)$ then $h(x)\ge r$. Now let $x\in\Omega$ and $\epsilon>0$ be arbitrary.

  • If $h(x)=0$, choose $r\in D$ so that $0<r<\epsilon$; then $V=U(r)$ is an open nbhd of $x$ such that $h[V]\subseteq[0,\epsilon)$.

  • If $h(x)=1$, choose $r\in D$ so that $1-\epsilon<r<1$; then $V=\Omega\setminus\cl U(r)$ is an open nbhd of $x$ such that $h[V]\subseteq(1-\epsilon,1]$.

  • If $0<h(x)<1$, choose $r,s\in D$ so that $h(x)-\epsilon<r<h(x)<s<h(x)+\epsilon$; then $V=U(s)\setminus\cl U(r)$ is an open nbhd of $x$ such that $h[V]\subseteq(h(x)-\epsilon,h(x)+\epsilon)$.

Thus, $h$ is continuous at every point of $\Omega$.