Let $\varphi:[0,+\infty)\rightarrow[0,\infty)$ an increasing function, continuous at $0$ and such that $\varphi(0)=0$. A function $f:M\rightarrow N$ is said to admit $\varphi$ as a "continuity module" when $d(f(x),f(y))\leq\varphi(d(x,y))$ for any $x,y\in M$ . Prove that $f:M\rightarrow N $ is uniformly continuous if and only if it admits some $\varphi$ as a "continuity module".
I'll put here where i could go so far:
$\Longrightarrow:$ given $\epsilon>0$, there exists $\delta>0$ such that $d(x,y)<\delta$ implies $d(f(x),f(y))<\epsilon$ for any $x,y\in M$. Now we construct such a $\varphi$. We must define it increasing and such that for $x\in[0,\delta)$ $\varphi(x)<\epsilon$. But i couldn't think of a good and clear construction.
$\Longleftarrow$: Let $\varphi$ a "continuity module" for $f$. We analyse two cases: $f$ is bounded and not.
$i)$ if $f$ is bounded, then the condition: $d(f(x),f(y))\leq\varphi(d(x,y))$ implies that $\varphi([0,\infty))$ must be unbounded too. Hence, $\varphi$ is surjective and given $\epsilon>0$ one can find $\delta\in[0,\infty)$ such that $\varphi(\delta)=\epsilon.$ Therefore, if $d(x,y)<\delta$ by the fact that $\varphi$ is inreasing, for any $d(x,y)<\delta$ we conclude that $d(f(x),f(y))\leq \varphi( d(x,y))<\varphi(\delta)=\epsilon.$
$ii)$ now if $f$ is bounded, i really dunno how to proceed. When i was thinking about this exercise i was considering the supremum of $f(M)$, but $M$ is a metric space. So this quite does not make sense.
That's all i could come up. Any help would be appreciated.