User:Blackbombchu/Sandbox/There is exactly one distance function

Theorem
There is exactly one distance function and that function assigns to every ordered pair of real numbers $\tuple {x, y}$ $\sqrt {x^2 + y^2}$.

Proof
Suppose $f$ is a distance function.

Then for every ordered pair $\tuple {x, y}$ where $x$ and $y$ are not both $0$, let $a = \dfrac x {\sqrt {x^2 + y^2} }$ and $b = \dfrac y {\sqrt {x^2 + y^2} }$, so $a^2 + b^2 = 1$. Since $\map g {z, w} = \tuple {a z - b w, a w + b z}$ is an origin rotation and $\map g {\sqrt {x^2 + y^2}, 0} = \sqrt {x^2 + y^2}$, by definition since $f$ is a distance function, $\map f {x, y} = \map f {\map g {\sqrt {x^2 + y^2}, 0} } = \sqrt {x^2 + y^2}$. Also by definition, since $f$ is a distance function, it assigns $0$ to $\tuple {0, 0}$. Therefore, only the function that assigns $\sqrt {x^2 + y^2}$ to every ordered pair of real numbers $\tuple {x, y}$ can be a distance function.

Let $\map h {x, y}$ be $x^2 + y^2$. Suppose $g$ is an origin rotation, then for some $a$, $b$ where $a^2 + b^2 = 1$, $\map g {x, y} = \tuple {a x - b y, a y + b x}$ so for all real numbers $x$, $y$, $\map {h \circ g} {x, y} = \paren {a x - b y}^2 + \paren {a y + b x}^2 = a^2 x^2 - 2 a b x y + b^2 y^2 + a^2 y^2 + 2 a b x y + b^2 x^2 = \paren {a^2 x^2 + a^2 y^2} + \paren {b^2 x^2 + b^2 y^2} = a^2 \paren {x^2 + y^2} + b^2 \paren {x^2 + y^2} = \paren {a^2 + b^2} \paren {x^2 + y^2}$ but $a^2 + b^2 = 1$ so $\map {h \circ g} {x, y} = \paren {x^2 + y^2} = \map h {x, y}$. Let $\map f {x, y} = \sqrt {\map g {x, y} } = \sqrt {x^2 + y^2}$, then $\map {f \circ g} {x, y} = \map f {x, y}$ for all origin rotations $g$. Also, for all nonnegative real numbers $r$, $\map f {r, 0} = \sqrt {r^2 + 0^2} = \sqrt {r^2} = r$ so $\map f {x, y} = \sqrt {x^2 + y^2}$ is a distance function.

Since $\map f {x, y} = \sqrt {x^2 + y^2}$ is a distance function and it can be the only distance function, there is exactly one distance function and it is that function.