# Triangle inequality of a metric on a quotient space of a topological vector space

In "Functional Analysis" by Rudin, a metric $\rho$ on the quotient space $X/N$ of a topological vector space $X$ and a closed subspace $N$ is defined as follows:

For $x,y \in X$, $$\rho (\pi(x),\pi(y)) := \inf \{d(x-y,z):z\in N\},$$ where $\pi$ is the quotient map and $d$ is an invariant metric on $X$. The verification that it is an invariant metric on $X/N$ is omitted in this book. I cannot prove the triagle inequality of the metric. Could anyone show me how to prove it ?

Let $u,v,w \in X$. $$\begin{eqnarray} \rho(\pi(u),\pi(w))&=& \inf \{ d(u-w,z) : z \in N \}, \\ &=& \inf \{ d((u-v)+(v-w),z) : z \in N \}, \\ &=& \inf \{ d((u-v)+(v-w)+z,0) : z \in N \}, \\ &=& \inf \{ d(((u-v)+z')+((v-w)+z''),0) : z',z'' \in N \},\\ &\leq& \inf \{ d((u-v)+z',0)+d((v-w)+z'',0) : z',z'' \in N \},\\ &=& \inf \{ d((u-v)+z',0): z' \in N \}+\inf \{ d((v-w)+z'',0) : z'' \in N \},\\ &=& \inf \{ d(u-v,z'): z' \in N \}+\inf \{ d(v-w,z'') : z'' \in N \},\\ &=& \rho(\pi(u),\pi(v)) + \rho(\pi(v),\pi(w)). \end{eqnarray}$$