# Why are such functions not always necessarily uniformly continuous?

One form of Urysohn's lemma (I suspect there may be more than one) is that on a normal space $(A,\mathcal{T})$ with disjoint closed sets $X$ and $Y$, there exists a continuous real valued function $f$ such that $f|_X=0$ and $f|_Y=1$, and $0\leq f\leq 1$ elsewhere on $A$.

I wanted to know if this could be strengthened to finding a uniformly continuous $f$, but results on Google suggested otherwise.

A hint I found online suggested I find a nonconvergent Cauchy sequence $Z=\{z_n\}$ where $z_m\neq z_n$ when $m\neq n$, and take closed sets $X,Y$ with $X\cap Y=\varnothing$ such that $d(x_n,y_n)\to 0$ for $x_n\in X$, $y_n\in Y$ to be subsequences of that Cauchy sequence.

I asked a previous question looking at $(0,1)$ with the usual metric. User Chris Eagle pointed out that the set $X=\{\frac{1}{2n}\mid n\in\mathbb{N}\}$ and $Y=\{\frac{1}{2n+1}\mid n\in\mathbb{N}\}$ are two such closed sets such that $d(x_n,y_n)\to 0$, that is, $(\lim_{n\to\infty}\vert x_n-y_n\vert=0)$ if we take $x_n=\frac{1}{2n}$ and $y_n=\frac{1}{2n+1}$. I took $z_n=\frac{1}{n}$ to be a Cauchy sequence which doesn't converge in $(0,1)$, and can let $X$ and $Y$ be subsequences of $Z$.

Based on this setup, what fails here so that we can not always expect $f$ to be uniformly continuous?

-

Let $x_n$ and $y_n$ be nonconvergent Cauchy sequences such that $d(x_n,y_n) \to 0$ as $n\to \infty$. Assume $f$ is a uniformly continuous function such that $f(x_n)=1$ and $f(y_n)=0$. By uniformly continuity, taking $\epsilon = 1/2$, there exists $\delta > 0$ such that whenever $d(u,v) \leq \delta$, we have $|f(u)-f(v)| \leq \epsilon$. Now there exists $N$ such that $d(x_N, y_N) \leq \delta$. But $|f(x_N) - f(y_N)| = |1-0| = 1 > \epsilon$, which obviously contradicts the hypothesis on $f$.