Denote the set of extended natural numbers $\mathbb{N} \cup \{\infty \}$ by $X$. Is there any metric $D$ that makes $X$ a complete metric space? In other words a distance function $D: \mathbb{N}\times \mathbb{N} \to \mathbb{R}$ such that
- $D(n,m)\geq 0$
- $D(n,m)= 0$ if, only if, $m=n$
- $D(m,n)=D(n,m)$
- $D(m,n)\leq D(m,p)+D(p,n)$
My attempt. I tried using the metric $d(m,m)= \frac{|n-m|}{1+|m-n|}$ of $\mathbb{N}$ to produce a metric on $X=\mathbb{N} \cup \{\infty\}$. Necessarily I made some additional definitions like
- $|n\pm\infty|=\infty$ for all $n\in\mathbb{N}$
- $|\infty\pm n|=\infty$ for all $n\in\mathbb{N}$
- $1+\infty=\infty$
- $|\infty-\infty|=0$
- $ \frac{\infty}{\infty}=1$
Define $$D(m,n)=\sum_{k=\min(m,n)}^{\max(m,n)}\frac{1}{2^k}d(\min(m,n),k).$$
Proof of 1.( $D(m,n) \geq 0$ for all $m,n \in X$): Since $d(\min(m,n),k) \geq 0$ for all $k \in \mathbb{N}$, then $D(m,n) \geq 0$.
Proof of 2. ($D(m,n) = 0$ if and only if $m = n$): If $m = n$, then we have $\min(m,n) = \max(m,n) = m$, and $d(m,k) = 0$ for all $k \in \mathbb{N}$. So $D(m,n) = 0$. If $D(m,n) = 0$, then each term in the sum is zero, and since each term is non-negative, this implies that $d(\min(m,n),k) = 0$ for all $k \in \mathbb{N}$ such that $\min(m,n) \leq k \leq \max(m,n)$. In particular, this implies that $\min(m,n) = \max(m,n)$, i.e., $m = n$.
Proof of 3. ($D(m,n) = D(n,m)$ for all $m,n \in X$): Just note that $\min(m,n) = \min(n,m)$ and $\max(m,n) = \max(n,m)$, so $D(m,n) = D(n,m)$.
Now the triangular inequality. But I was not able to prove the triangular inequality. In fact, I think that $D$ may not satisfy the triangle inequality.
I'm not sure whether this $D$ of yours satisfies the triangle inequality or not. It is quite complicated. Still, answering your original question:
Sure. The simplest example is the discrete metric $d(x,y)=1$ (whenever $x\neq y$). This will work for any set.
For more sophisticated example consider $Y=\{0\}\cup\{\frac{1}{n}\}_{n=1}^\infty$ (which is compact and thus complete) and any bijection $f:\mathbb{N}\cup\{\infty\}\to Y$. Such bijection exists since both are countable. Then define metric on $\mathbb{N}\cup\{\infty\}$ by transfering from the (Euclidean) metric on $Y$:
$$d(x,y)=|f(x)-f(y)|$$