# Proving a metric space $\mathbb N^{\mathbb N}$ with $d(x,y)=1/\min\{j:x_j\neq y_j\}$ is complete

Let $X$ be the collection of all sequences of positive integers. If $x=(n_j)_{j=1}^\infty$ and $y=(m_j)_{j=1}^\infty$ are two elements of $X$, set

$$k(x,y)=\inf\{j:n_j\neq m_j\}$$ and

$$d(x,y)= \begin{cases} 0 & \text{if x=y} \\ \frac{1}{k(x,y)} & \text{if x \neq y} \end{cases}$$

We know that $d$ is a metric on $X$. Now, I must prove that the metric space $(X,d)$ is complete.

By definition, a metric space $(X,d)$ is complete if every Cauchy sequence in $X$ is convergent. On the real line, this is trivial, but I have trouble applying the concept to metric spaces. We know that a sequence is Cauchy if: $$(\forall \epsilon>0)(\exists N>0)(\forall m,n \geq N)(d(x_m,x_n)<\epsilon)$$ A Cauchy sequence also has the following properties:

1. If a sequence $(x_n)$ converges, then it is Cauchy.
2. Every Cauchy sequence is bounded: for all $a \in X$, there exists $C_a>0$ such that $d(a,x_n)<C_a$ for all $n$.
3. If a Cauchy sequence $(x_n)$ has a converging subsequence $(x_{n_k})$ such that $\lim_{k \to \infty}x_{n_k}=x$, then $(x_n)$ converges to $x$.

Here is my attempt thus far, although my reasoning feels wrong. Let $(x_n)_{n=1}^\infty$ be any Cauchy sequence in $X$. Take $\epsilon=\frac12$. Let $N$ be such that for $n,m \geq N$, we have $d(x_n,x_m)<\frac12$. So, $x_n=x_m$ for all $n,m \geq N$ and $x_n=x_N$ for $n \geq N$. Thus, $x_n$ is eventually constant and hence convergent, which proves that the metric space is complete.

Any corrections or help on how to prove this would be appreciated. Thank you!

• There is something not right with your argument. Let $x_m$ be the sequence having all $1$ except for the $m$th spot in which it has $2$. Then for any $m \neq n$, $d(x_n,x_m) = 1/\min(m,n)$ so it is certainly Cauchy (and it does converge to the all ones sequence), but notice that $x_m \neq x_n$ ever. – Suugaku Feb 21 '15 at 23:09

You must use the full power of the $\forall\epsilon>0$ in the definition of being Cauchy. So, take $\epsilon=\frac{1}{n}$. Then, for $r,s>N(n)$, $d(x_r,x_s)<\frac{1}{n}$. This implies that $x_r,x_s$ are equal for all terms up to $n$. Define $x$ to have the term $x(n)$ equal to the $n$-th common entry of any such $x_r, x_s$.
Now you can show that the sequence (of sequences) $x_r$ converges to $x$. In fact, for $\epsilon>0$ there is $n$ such that $\epsilon>1/n$ then take $N(\epsilon)$ from the definition of Cauchy and we see that if $r>N(\epsilon)$ then $x_r$ and $x$ coincide up to the $n$-th term. Therefore their distance is smaller than $1/n<\epsilon$.