# Generalization of Urysohn's Lemma

Urysohn's lemma in general topology states:

A topological space $X$ is normal (i.e., $T_4$) iff, for each pair of disjoint closed subsets $C, D \subset X$, there is a function $f : X \to [0, 1]$ such that $f(C) = 0$ and $f(D) = 1$.

Of course Urysohn's proof relies heavily on the structure of $[0, 1]$, to go through, but I wondered how necessary this is. In particular, let's say

A space $Y$ is said to "have property $\mathscr{U}$" if, for every compact Hausdorff space $X$, and every pair of disjoint subsets $C, D \subset X$, there exists a continuous map $f : X \to Y$ such that there are $y_1 \neq y_2 \in Y$ with $f(C) = y_1$ and $f(D) = y_2$.

Question: Can we characterize those spaces with property $\mathscr{U}$?

Urysohn's lemma says that any space containing a line segment has property $\mathscr{U}$. Is this sufficient condition in fact necessary?

(Of course we could define a similar property replacing "compact Hausdorff" with "normal." I'm directly interested in the former situation, but I don't have any idea which is the "correct" definition to make.)

Motivation: I've recently learned the following cute result: Let $X$ be a compact Hausdorff space and $F$ be a topological field. Then there is a continuous bijection $$\varphi : X \to \operatorname{MaxSpec} C(X, F),$$ where the space on the right is endowed with the Zariski topology. Of course $\varphi^{-1}$ will usually be far from continuous, since the Zariski topology is fairly weak. However, when $F = \mathbb{R}$ then $\varphi$ is a homeomorphism. To see this, we verify directly that $\varphi$ is a closed map using Urysohn's lemma.

I'm wondering if this allows us to give a characterization of the real numbers as a topological field that's essentially different from the usual ones.

Property $\mathscr U$ is rather trivial and it is equivalent to “the space $Y$ contains a continuous image $f_0([0,1])$ of the unit segment such that $f_0(0)\ne f_0(1)$”. Indeed, the necessity follows from the existence of a continuous map $f_0:[0,1]\to Y$ such that $f_0(0)\ne f_0(1)$, the sufficiency (even for normal spaces $X$) follows from Urysohn's lemma (the composition $f_0\circ f$ is the required separating map). (Here I assume that you mean both sets $C$ and $D$ are closed (conversely, if we take as $C$ and $D$ disjoint dense subsets of $[0,1]$ then $f(C)=f([0,1])=f(D)$ for each continuous map $f$ into a $T_1$-space such that both $f(C)$ and $f(D)$ are one-point sets)).