Let $f$ be a continuous mapping of a compact metric space $(X, d)$ onto a Hausdorff space $(Y, \tau_1)$.
If $d$ is a metric on $X$, how to show that $$d_1(y_1, y_2) := \inf\{d(a, b) : a \in f^{-1}(y_1)\text{ and }b \in f^{−1}(y_2)\}$$ is a metric on Y?
I can see that it is never $0$ when $y_1$ is not equal to $y_2$. But how should I go about showing that it satisfies the triangle inequality?
I am actually reading the following page from a book.
