Prove the triangle inequality for this metric space

general-topologymetric-spaces

Let $X = \prod_{k=1}^\infty \{0,1\}$ which can be viewed as the set of all sequences of binary digits. For $f,g \in X$, with $f \neq g$, define $m(f, g) = \min\{k : f(k) \neq g(k)\}$ and define $d : X \times X \to \mathbb{R}$ by

$$d(f, g) = \begin{cases}2^{-m(f,g)} & \text{if } f \neq g \\ 0 & \text{if }f = g.\end{cases}$$

The first three axioms have been given I imagine the first starting point is to prove that

$$m(a,c) \ge \min\{m(a,b), m(b,c)\}.$$

Followed by:

For $f \in X$, $n \in \mathbb{N}$, prove that $B(f, 2^{-n})$ consists of all $g \in X$ for which
$$f(1) = g(1), f(2) = g(2), \ldots, \text{ and }f(n) = g(n).$$

This I think you must use the previous fact that $d(f,g) = 2^{-m(f,g)}$.

Followed by:

Show that for all $f \in X$, $r > 0$, either $B'(f,r) = B(f,r)$ or $B'(f,r) = B(f,2r)$.

This I believe must be a continuity using open sets problem.

Best Answer

Suppose $f \ne g \ne h \ne f.$ Let $a=m(f,g),\,b=m(g,h), \,c=m(f,h).$

Suppose $d(f,g)+d(g,h)<d(f,h).$

Then $ 2^{-a}+2^{-b}<2^{-c},$ which implies $(\,c<a \land c<b\,). $ But then $$ f(c)=g(c)\quad (\text { as }c<a=m(f,g)\,)$$ $$ \text {and } \quad g(c)=h(c)\quad (\text { as } c<b=m(g,h)\,)$$ so $f(c)=h(c),$ contrary to the def'n of $c=m(f,h).$ Contradiction.