William wrote:

> I notice: The identity function f(x) = x is order-preserving in all three cases. I think this is unique.

Nice! You mean it's the only one that's order-preserving, addition-preserving and metric-preserving. It's neat how you got examples of functions that preserve two but not all three of these structures.

It takes some work, but one can show that the only order-preserving and addition-preserving functions

$$f: \mathbb{R} \to \mathbb{R}$$

are of the form

$$f(x) = c x$$

for some \$$c \ge 0\$$. The only one of these functions that's also metric-preserving is the one with \$$c = 1\$$.

> Also, it looks like the addition-preserving endomorphisms are fully determined by the value of \$$f(1)\$$.

That's very plausible. Surprisingly, it's not true if you believe in the Axiom of Choice, the way most mathematicians do!

It's pretty easy to show that if \$$f\$$ is addition-preserving, \$$f(1) = c\$$ implies

$$f(x) = c x$$

when \$$x\$$ is _rational_. In theory you could cleverly choose \$$f\$$ to behave in some other way when \$$x\$$ is irrational. And using the Axiom of Choice, you can. But if you require \$$f\$$ to be continuous or even just "measurable", the only option is to take \$$f(x) = c x\$$ for all \$$x \in \mathbb{R}\$$. An order-preserving function must be measurable, so the the only order-preserving and addition-preserving functions

$$f: \mathbb{R} \to \mathbb{R}$$

are of the form

$$f(x) = c x$$

for some \$$a \ge 0\$$.

For more on this, see:

* Wikipedia, [Cauchy's functional equation](https://en.wikipedia.org/wiki/Cauchy%27s_functional_equation).

In 1821 Cauchy proved that any _continuous_ addition-preserving function \$$f: \mathbb{R} \to \mathbb{R} \$$ is of the form \$$f(x) = a x \$$. The trick is to show that \$$f\$$ must be like this when \$$x\$$ is rational. But this was just the start of a long and interesting story!