# Urysohn's lemma

In topology, Urysohn's lemma is a lemma that states that a topological space is normal if and only if any two disjoint closed subsets can be separated by a continuous function.[1]

Urysohn's lemma is commonly used to construct continuous functions with various properties on normal spaces. It is widely applicable since all metric spaces and all compact Hausdorff spaces are normal. The lemma is generalized by (and usually used in the proof of) the Tietze extension theorem.

The lemma is named after the mathematician Pavel Samuilovich Urysohn.

## Discussion

Two subsets ${\displaystyle A}$  and ${\displaystyle B}$  of a topological space ${\displaystyle X}$  are said to be separated by neighbourhoods if there are neighbourhoods ${\displaystyle U}$  of ${\displaystyle A}$  and ${\displaystyle V}$  of ${\displaystyle B}$  that are disjoint. In particular ${\displaystyle A}$  and ${\displaystyle B}$  are necessarily disjoint.

Two plain subsets ${\displaystyle A}$  and ${\displaystyle B}$  are said to be separated by a function if there exists a continuous function ${\displaystyle f:X\to [0,1]}$  from ${\displaystyle X}$  into the unit interval ${\displaystyle [0,1]}$  such that ${\displaystyle f(a)=0}$  for all ${\displaystyle a\in A}$  and ${\displaystyle f(b)=1}$  for all ${\displaystyle b\in B.}$  Any such function is called a Urysohn function for ${\displaystyle A}$  and ${\displaystyle B.}$  In particular ${\displaystyle A}$  and ${\displaystyle B}$  are necessarily disjoint.

It follows that if two subsets ${\displaystyle A}$  and ${\displaystyle B}$  are separated by a function then so are their closures.
Also it follows that if two subsets ${\displaystyle A}$  and ${\displaystyle B}$  are separated by a function then ${\displaystyle A}$  and ${\displaystyle B}$  are separated by neighbourhoods.

A normal space is a topological space in which any two disjoint closed sets can be separated by neighbourhoods. Urysohn's lemma states that a topological space is normal if and only if any two disjoint closed sets can be separated by a continuous function.

The sets ${\displaystyle A}$  and ${\displaystyle B}$  need not be precisely separated by ${\displaystyle f}$ , i.e., we do not, and in general cannot, require that ${\displaystyle f(x)\neq 0}$  and ${\displaystyle \neq 1}$  for ${\displaystyle x}$  outside of ${\displaystyle A}$  and ${\displaystyle B.}$  The spaces in which this property holds are the perfectly normal spaces.

Urysohn's lemma has led to the formulation of other topological properties such as the 'Tychonoff property' and 'completely Hausdorff spaces'. For example, a corollary of the lemma is that normal T1 spaces are Tychonoff.

## Formal Statement

A topological space ${\displaystyle X}$  is normal if and only if, for any two non-empty closed disjoint subsets ${\displaystyle A}$  and ${\displaystyle B}$  of ${\displaystyle X,}$  there exists a continuous map ${\displaystyle f:X\to [0,1]}$  such that ${\displaystyle f(A)=\{0\}}$  and ${\displaystyle f(B)=\{1\}.}$

## Sketch of proof

Illustration of Urysohn's "onion" function.

The procedure is an entirely straightforward application of the definition of normality (once one draws some figures representing the first few steps in the induction described below to see what is going on), beginning with two disjoint closed sets. The clever part of the proof is the indexing of the open sets thus constructed by dyadic fractions.

For every dyadic fraction ${\displaystyle r\in (0,1),}$  we are going to construct an open subset ${\displaystyle U(r)}$  of ${\displaystyle X}$  such that:

1. ${\displaystyle U(r)}$  contains ${\displaystyle A}$  and is disjoint from ${\displaystyle B}$  for all ${\displaystyle r,}$
2. For ${\displaystyle r  the closure of ${\displaystyle U(r)}$  is contained in ${\displaystyle U(s).}$

Once we have these sets, we define ${\displaystyle f(x)=1}$  if ${\displaystyle x\not \in U(r)}$  for any ${\displaystyle r}$ ; otherwise ${\displaystyle f(x)=\inf\{r:x\in U(r)\}}$  for every ${\displaystyle x\in X,}$  where ${\displaystyle \inf }$  denotes the infimum. Using the fact that the dyadic rationals are dense, it is then not too hard to show that ${\displaystyle f}$  is continuous and has the property ${\displaystyle f(A)\subseteq \{0\}}$  and ${\displaystyle f(B)\subseteq \{1\}.}$

In order to construct the sets ${\displaystyle U(r),}$  we actually do a little bit more: we construct sets ${\displaystyle U(r)}$  and ${\displaystyle V(r)}$  such that

• ${\displaystyle A\subseteq U(r)}$  and ${\displaystyle B\subseteq V(r)}$  for all ${\displaystyle r,}$
• ${\displaystyle U(r)}$  and ${\displaystyle V(r)}$  are open and disjoint for all ${\displaystyle r,}$
• For ${\displaystyle r  ${\displaystyle V(s)}$  is contained in the complement of ${\displaystyle U(r)}$  and the complement of ${\displaystyle V(r)}$  is contained in ${\displaystyle U(s).}$

Since the complement of ${\displaystyle V(r)}$  is closed and contains ${\displaystyle U(r),}$  the latter condition then implies condition (2) from above.

This construction proceeds by mathematical induction. First define ${\displaystyle U(1)=X\setminus B}$  and ${\displaystyle V(0)=X\setminus A.}$  Since ${\displaystyle X}$  is normal, we can find two disjoint open sets ${\displaystyle U(1/2)}$  and ${\displaystyle V(1/2)}$  which contain ${\displaystyle A}$  and ${\displaystyle B,}$  respectively. Now assume that ${\displaystyle n\geq 1}$  and the sets ${\displaystyle U\left(k/2^{n}\right)}$  and ${\displaystyle V\left(k/2^{n}\right)}$  have already been constructed for ${\displaystyle k=1,\ldots ,2^{n}-1.}$  Since ${\displaystyle X}$  is normal, for any ${\displaystyle a\in \left\{0,1,\ldots ,2^{n}-1\right\},}$  we can find two disjoint open sets which contain ${\displaystyle X\setminus V\left(a/2^{n}\right)}$  and ${\displaystyle X\setminus U\left((a+1)/2^{n}\right),}$ respectively. Call these two open sets ${\displaystyle U\left((2a+1)/2^{n+1}\right),}$ and ${\displaystyle V\left((2a+1)/2^{n+1}\right),}$  and verify the above three conditions.

The Mizar project has completely formalized and automatically checked a proof of Urysohn's lemma in the URYSOHN3 file.