Suppose $(X,d)$ is an incomplete metric space. Prove that there exist a uniformly continuous function $$f\ \colon\ \ X\rightarrow (0,\infty)$$ such that $$\inf_{x\in X} f(x)=0.$$ This is what I did. Now since completion of $X$ does exist so taking any cauchy sequence $\{x_n\}$ we can find the limit, say, $x_0$ in the completion . Define the function $$f(x)=x-x_0.$$ Then $$\lim_{n\rightarrow \infty} f(x_n)=0$$
But what assures that it will not take values less than $0$? And what about uniformity of the function?
So I think what I came up with is useless.
How to prove it then? Thanks for any help.