The problem in question asks you to show that the non-negativity of a metric follows from the 2nd, 3rd, and 4th metric space axioms i.e.
$\textbf{M2}$ $d(x,y) = 0$ iff $x=y$
$\textbf{M3}$ $d(x,y) = d(y,x)$
$\textbf{M4}$ $d(x,y) \leq d(x,z) + d(z,y)$
My (kind of longwinded) proof was the following:
We prove by showing that all possible distances on the arbitrary points $x,y,z$ are non-negative.
That $d(x,x), d(y,y), d(z,z)$ are non negative is given by $\textbf{M2}$. For the remainder, let $x=y$, then using $\textbf{M2}$, $\textbf{M3}$, $\textbf{M4}$ we have
\begin{equation} \begin{split} d(x,y)=0 & \leq d(x,z) + d(z,y) \\ & \leq d(x,z) + d(z,x) \\ & \leq d(x,z) + d(x,z) \\ & \leq 2d(x,z) \end{split} \end{equation}
dividing both sides by 2 gives
\begin{equation} 0 \leq d(x,z) \end{equation}
Thus by $\textbf{M3}$ and using the fact that $y=x$ we have that $d(x,z)$, $d(z,x)$, $d(y,z)$, and $d(z,y)$ are all non-negative. QED.
I've checked some answers setting and y=x in $\textbf{M4}$ seems to be the right strategy. My question is why does setting y=x work in this case? Doesn't this only prove for the case in which y=x? What about when y doesn't equal x? I've a seen similar strategies used in proofs before and I never quite understood how prooving for a limited set of cases prooved all cases.
Many thanks.