Give an example of a non-compact set $X$ such that every continuous function on $X$ is uniformly continuous

317 Views Asked by At

Give an example of a non-compact set $X$ such that every continuous function on $X$ is uniformly continuous.

My try:

Consider $\Bbb N$ and the metric $d(x,y)=|x-y|$.Now $(\Bbb N,d)$ is not compact but every continuous function will be uniformly continuous .

If $f$ is continuous then to show that $|f(x)-f(y)|<\epsilon$ whenever $|x-y|<\delta$ ,I choose $\delta <1$ then $|f(x)-f(y)|=|f(x)-f(x)|=0<\epsilon$

Is this example correct?Please help.