Standard Discrete Metric is Metric

Theorem
The standard discrete metric is a metric.

Proof
The metric space axioms M1, M3 and M4 clearly hold.

It remains to inspect M2.

Let $x = z$.

Then:
 * $d \left({x, z}\right) = 0 \implies d \left({x, y}\right) + d \left({y, z}\right) \ge d \left({x, z}\right)$

Let $x \ne z$.

Either $x \ne y$ or $y \ne z$.

So:
 * $d \left({x, y}\right) + d \left({y, z}\right) \ge 1$

but:
 * $d \left({x, z}\right) = 1$

so:
 * $d \left({x, y}\right) + d \left({y, z}\right) \ge d \left({x, z}\right)$

Either way:
 * $d \left({x, y}\right) + d \left({y, z}\right) \ge d \left({x, z}\right)$

Thus M2 holds.