Let $X$ be a non empty set. Let $M$ the set of all sequences $(x_{n})$ of elements of $X$. For $x=(x_{n})$ and $y=(y_{n})$ in $M$, let $k(x,y)$ the smallest integer $n$ such that $x_{n}\neq y_{n}$. Let $d:M\times M\to \mathbb{R}$ $d(x,y)=\dfrac{1}{k(x,y)}$ if $x\neq y$ and $d(x,x)=0$. Show that $d$ is metric.
My approach: We have $d(x,y)=0\iff y=x$, by hypothesis, and $d(x,y)=\dfrac{1}{k(x,y)}$, where $k(x,y)$ is the smallest integer n, then $d(x,y)>0$. And $d(x,y)=\dfrac{1}{k(x,y)}=\dfrac{1}{k(y,x)}=d(y,x)$, because $k(x,y)$ is a integer. But How I prove triangle inequality...