Consider the set of all sequences of real numbers.For $x={(x_n)_n}$ and $y={(y_n)_n}$ we define $N(x,y)=\inf \{n\in\Bbb N :x_n\ne y_n,\text{if $x\ne y$} \}$. Now, $$d(x,y)= \begin{cases} 0, & \text{if $x=y$} \\ 1/N(x,y), & \text{otherwise} \end{cases}$$
Prove that $d(x,y)$ defines a metric.
I have difficulties with the triangular inequality i.e, if $z={z_n}$ then $d(x,y)\le d(x,z)+d(z,y)$. Help.