Give a direct proof of the Urysohn lemma for a metric space \((X, d)\) by setting
\[ f(x) = \frac{d(x, A)}{d(x, A) + d(x, B)} \]
for disjoint nonempty closed sets \(A\) and \(B\).
Solution
Goal: Prove the Urysohn Lemma for metric spaces directly using distance-to-a-set functions.
1. Properties of the distance function \(d(x, S)\):For any non-empty subset \(S \subseteq X\), the function \(d_S: X \to [0, \infty)\) defined by \(d_S(x) = d(x, S) = \inf_{s \in S} d(x, s)\) is 1-Lipschitz continuous, and \(d(x, S) = 0 \iff x \in \overline{S}\).Proof:
1.1. For any \(x, y \in X\) and \(s \in S\), \(d(x, s) \le d(x, y) + d(y, s)\).
1.2. Taking the infimum over \(s \in S\) on both sides yields \(d(x, S) \le d(x, y) + d(y, S) \implies d(x, S) - d(y, S) \le d(x, y)\).
1.3. Reversing the roles of \(x\) and \(y\) gives \(|d(x, S) - d(y, S)| \le d(x, y)\), proving 1-Lipschitz continuity.
1.4. By definition of closure in metric spaces, \(x \in \overline{S} \iff \forall \varepsilon > 0, B_d(x, \varepsilon) \cap S \neq \emptyset \iff \inf_{s \in S} d(x, s) = 0\).
2. Well-definedness and bounds of \(f(x)\):\(f(x) = \frac{d(x, A)}{d(x, A) + d(x, B)}\) is well-defined and maps \(X\) into \([0, 1]\).Proof:
2.1. Since \(A\) and \(B\) are closed and disjoint (\(A \cap B = \emptyset\)), no point \(x \in X\) belongs to both \(A\) and \(B\).
2.2. By 1, \(d(x, A) = 0 \iff x \in A\) and \(d(x, B) = 0 \iff x \in B\).
2.3. Thus for every \(x \in X\), at least one of \(d(x, A)\) or \(d(x, B)\) is strictly positive, which implies:\[d(x, A) + d(x, B) > 0.\]
2.4. The denominator is strictly positive everywhere on \(X\), so \(f\) is well-defined.
2.5. Since \(0 \le d(x, A) \le d(x, A) + d(x, B)\), we have \(0 \le f(x) \le 1\) for all \(x \in X\).
3. Continuity of \(f\):Proof:
3.1. The functions \(x \mapsto d(x, A)\) and \(x \mapsto d(x, B)\) are continuous by
1.
1.2. The sum \(x \mapsto d(x, A) + d(x, B)\) is continuous and non-vanishing.
1.3. As a quotient of continuous functions with a non-vanishing denominator, \(f: X \to [0, 1]\) is continuous.
4. Separation values on \(A\) and \(B\):Proof:
4.1. If \(x \in A\), then \(d(x, A) = 0\) and \(d(x, B) > 0\), so:\[f(x) = \frac{0}{0 + d(x, B)} = 0.\]
4.2. If \(x \in B\), then \(d(x, B) = 0\) and \(d(x, A) > 0\), so:\[f(x) = \frac{d(x, A)}{d(x, A) + 0} = 1.\]
5. Conclusion:\(f: X \to [0, 1]\) is a continuous function satisfying \(f(A) = \{0\}\) and \(f(B) = \{1\}\), establishing the Urysohn lemma for \((X, d)\). Q.E.D.