Standard Discrete Metric is Metric

Theorem
The standard discrete metric is a metric.

Proof
Let $d: S \times S \to \R$ denote the standard discrete metric on the underlying set $S$ of some space $\struct {S, d}$.

By definition:
 * $\forall x, y \in S: \map d {x, y} = \begin {cases}

0 & : x = y \\ 1 & : x \ne y \end {cases}$

Proof of $\text M 1$
So axiom $\text M 1$ holds for $d$.

Proof of $\text M 2$
Let $x = z$.

Let $x \ne z$.

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

So:

So in either case:
 * $\map d {x, y} + \map d {y, z} \ge \map d {x, z}$

and axiom $\text M 2$ holds for $d$.

Proof of $\text M 3$
Let $x \ne y$.

So axiom $\text M 3$ holds for $d$.

Proof of $\text M 4$
So axiom $\text M 4$ holds for $d$.