# Prove d to be a metric

Goodday. The problem is as follows:

Let $\mathbb{Z}^\mathbb{N}:=\{x:\mathbb{N}\rightarrow \mathbb{Z} \}$.

We define a function $\text{d}:\mathbb{Z}^\mathbb{N} \times \mathbb{Z}^\mathbb{N} \rightarrow \mathbb{R}$ by the following relation: $-\text{log d(x,y)} = \text{inf}\{\text{n}\in \mathbb{N}:\text{x(n)}\neq \text{y(n)}\}$

Show that $(\mathbb{Z}^\mathbb{N},d)$ is a metric space. [inf $\emptyset$ = +$\infty$ and log $0$ = - $\infty$]

I have difficulties proving the triangle inequality for this metric.

Could you give me a hint (no solution if possible)?

Thanks!

Hint: If $n\in\Bbb N$ is such that $\text{x}(n)\ne\text{z}(n),$ then we must have $\text{x}(n)\ne\text{y}(n)$ or $\text{y}(n)\ne\text{z}(n).$
• Well, duh. How could I miss that? That means we have $e^{(-n1)} \leq e^{(-n1)} + e^{(-n2)}$, where n2 could be a number or "infinity". Did I catch that right? – Jo Be Oct 14 '13 at 19:44
• Pretty much, yes. If we suppose without loss of generality that $\text{x}(n)\neq\text{y}(n),$ then we immediately have $$\text{d}(\text{x},\text{z})\le\text{d}(\text{x},\text{y})\le \text{d}(\text{x},\text{y})+ \text{d}(\text{y},\text{z}).$$ – Cameron Buie Oct 14 '13 at 20:03
• We still have to deal with the $\text{x}=\text{z}$ case,but that's easy. – Cameron Buie Oct 14 '13 at 20:04
• More explicitly, let's say for any $\text{x},\text{y}\in\Bbb Z^{\Bbb N}$ that $$\nu(\text{x},\text{y}):=\inf\{n\in\Bbb N:\text{x}(n)\ne\text{y}(n)\},$$ so that $\text{d} (\text{x},\text{y})=e^{-\nu (\text{x},\text{y})}.$ Then what my hint effectively says is that if $\nu (\text{x},\text{z})\ne+\infty,$ then $\nu(\text{x},\text{y})\le\nu(\text{x},\text{z})$ or $\nu(\text{y},\text{z})\le\nu (\text{x},\text{z}).$ of course, both of these inequalities hold trivially if $\nu (\text{x},\text{y})=+\infty.$ The rest then follows from the fact that $t\mapsto e^t$ is increasing on the extended reals. – Cameron Buie Oct 14 '13 at 20:22