TITLE: Characterization of Uniform Continuity
QUESTION [5 upvotes]: If $f:X \to Y$ is uniformly continuous, then there exists $\omega : (0, +\infty) \to (0, +\infty)$ with $\lim \limits_{t \to 0^+} \omega(t) = 0$ such that $d_Y(f(x), f(x')) < \omega(d_X(x, x'))$. 
I am trying to come up with such an $\omega$ function. 
\begin{equation*}
    \omega(t) =t +  \sup \limits_{x \in X, x' \in X} \{d_Y(f(x), f(x')) : d_X(x, x') < t \}
\end{equation*}
I don't know if it makes sense. There will probably be some issues with $\sup$. 
Can anyone suggest improvements/corrections? 
Thanks.

REPLY [2 votes]: Such a function need not exist. Consider $\mathbb N$ with the discrete metric and let $f(n)=n$ for all $n$. Then $f$ is uniformly continuous. But $|n-1| <\omega (1) \vee \omega (0)$ does not hold for all $n$ whatever your function $\omega$ is. 
Here $Y$ is the real line with the usual metric.