On a version of Urysohn lemma for complete metric spaces, involving uniform continuous functions

complete-spacesgeneral-topologymetric-spacesuniform-continuity

Let $X$ be a complete metric space. Let us say that given a subset $A\subseteq X$, a point $a\in X$ is a limit point of $A$ if for every $r>0, A \cap B(a,r)\setminus \{a\} \ne \phi$. Now let $A,B$ be disjoint closed subsets of a complete metric space $X$ such that $A,B$ has no limit point in $X$ and also assume that $A,B$ are infinite. Then, does there necessarily exist a uniformly continuous function $f: X \to \mathbb R$ such that $d(f(A),f(B)):=\inf \{|f(a)-f(b)| : a\in A, b\in B\}>0$ ?

Best Answer

No. Take $X$ to be the real line, take $A$to be the set of positive integers, and take $B$ to be the set of numbers of the form $n+2^{-n}$ for positive integers $n$. If $f$ is uniformly continuous, then, for any $\varepsilon>0$, we'll have $|f(n)-f(n+2^{-n})|<\varepsilon$ for all sufficiently large $n$. So the infimum in your question will be zero.