Prove that $(M,d)$ is a metric space Hello I have problems with exercise
Let $M$ be the space of all real sequences. Given $x = (x_i)_i \; , y = (y_i)_i \in M$, define
$d(x,y) = \displaystyle\sum_{i=1}^\infty{\displaystyle\frac{1}{i^2} \; min \{ |x_i-y_i| , 1 \}} $
Prove that $(M, d)$ is a metric space. Let $ \{ x^{(k)} \}_k$ be a sequence in $M$. Prove that $x^{(k)}  \rightarrow x$ for $d$ if and only if ${x_i}^{(k)} \rightarrow x_i $ for all $i \in \mathbb{N}.$
My attempt
$(i) \; d(x,x)=0$
$d(x,x)= \displaystyle\sum_{i=1}^\infty{\displaystyle\frac{1}{i^2} \; min \{ |x_i-x_i| , 1 \}} = \displaystyle\sum_{i=1}^\infty{\displaystyle\frac{1}{i^2} \; min \{ |0| , 1 \}} = \displaystyle\sum_{i=1}^\infty{\displaystyle\frac{1}{i^2}} \cdot 0 = 0 $
$(ii) \; If \; x \neq y $ then $d(x,y) > 0$
$d(x,y) = \displaystyle\sum_{i=1}^\infty{\displaystyle\frac{1}{i^2} \; min \{ |x_i-y_i| , 1 \}}$ (This expression is always greater than zero)
$(iii) \; d(x,y)=d(y,x)$
$d(x,y) = \displaystyle\sum_{i=1}^\infty{\displaystyle\frac{1}{i^2} \; min \{ |x_i-y_i| , 1 \}} =  \displaystyle\sum_{i=1}^\infty{\displaystyle\frac{1}{i^2} \; min \{ |y_i-x_i| , 1 \}} = d(y,x)$
$(iv) \; d(x,z) \leq{} d(x,y) + d(y,z) $ (I have problems with triangular inequality)
I don't know how to prove this part:
Prove that $x^{(k)}  \rightarrow x$ for $d$ if and only if ${x_i}^{(k)} \rightarrow x_i $ for all $i \in \mathbb{N}.$
Thanks
 A: Concerning the triangular inequality, note that, for each $i\in\Bbb N$,\begin{align}\min\{|x_i-z_i|,1\}&\leqslant\min\{|x_i-y_i|+|y_i-z_i|,1\}\\&\leqslant\min\{|x_i-y_i|,1\}+\min\{|y_i-z_i|,1\};\end{align}see this question.
If $\lim_{k\to\infty}x^{(k)}=x$ and if $i\in\Bbb N$, take $\varepsilon>0$. Then, if $k$ is large enough, $d\left(x^{(k)},x\right)<\frac\varepsilon{i^2}$. In particular, $\frac1{i^2}\min\left\{\left|x_i^{(k)}-x_i\right|,1\right\}<\frac\varepsilon{i^2}$, and therefore $\min\left\{\left|x_i^{(k)}-x_i\right|,1\right\}<\varepsilon$, which implies that $\left|x_i^{(k)}-x_i\right|<\varepsilon$.
Finally, if $\lim_{i\to\infty}x_i^{(k)}=x_i$ for each $i\in\Bbb N$ and if $\varepsilon>0$, take $M\in\Bbb N$ such that $\sum_{i=M+1}^\infty\frac1{i^2}<\frac\varepsilon2$. For each $i\leqslant M$, take $N_i\in\Bbb N$ such that $k\geqslant N_i\implies\frac1{i^2}\left|x_i^{(k)}-x_i\right|<\frac\varepsilon{2N}$. Then$$k\geqslant\max\{N_1,N_2,\ldots,N_M\}\implies d\left(x^{(k)},x\right)<\frac\varepsilon2+\frac\varepsilon2=\varepsilon.$$
