Examples of order-preserving, metric-preserving and addition-preserving functions on $\Bbb R$

482 Views Asked by At

I just started reading Seven Sketches in Compositionality: An Invitation to Applied Category Theory, just for the fun of it. On p.2 I stumbled upon this basic exercise:

Exercise 1.1. Some terminology: a function $f:\Bbb R\to\Bbb R$ is said to be

a)order-preserving if $x\le y$ implies $f(x)\le f(y)$ $\forall x,y\in\Bbb R$

b)metric preserving if $\left\lvert x-y\right\rvert = \left\lvert f(x)-f(y)\right\rvert$

c)addition-preserving if $f(x+y)=f(x)+f(y)$

For each of these three properties defined above-call it $foo$-find an $f$ that is $foo$-preserving and example for an $f$ that is not $foo$-preserving.

I started with $f(x)=e^x$ and quickly realised that it is neither metric-preserving nor addition-preserving. Next, the most obvious example: $f(x)=x$, the identity function hit my mind. The function is clearly $foo$-preserving. However, I could not think of any more functions. I rearranged the terms for metric-preservation conditions and found that: $$\left\lvert \frac{f(x)-f(y)}{x-y}\right\rvert = 1$$From this, I deduced absolute value function over restricted domains might work, but $f$ is mapped on $\Bbb R$. Hence, I have loads of examples for functions which are not $foo$-preserving, but only one for $foo$-preserving. Here's my question:

Is the identity function the only $foo$-preserving function?

Just to clarify, I don't have a rigorous mathematical background. As such, if the answer requires some pre-requisite knowledge of other advanced math topics(analysis, topology and the likes), I'd appreciate references for the terminology and notions involved.

Edit: As brought to my attention by @Joe, $foo$-preserving refers to satisfying at least one of the three properties, and not necessarily simultaneously satisfying all. This, however, does not make a substantial difference to the solution being sought.

1

There are 1 best solutions below

4
On BEST ANSWER

Let $f$ be addition-preserving, then we have $$ f(0)=f(0+0)=f(0)+f(0) $$ and hence $f(0)=0$. If $f$ is also metric-preserving, then we have $$ \vert f(x)\vert = \vert f(x) - 0 \vert = \vert f(x) - f(0) \vert = \vert x-0 \vert = \vert x \vert. $$ This means that $f(x) \in \{\pm x\}$. So if $f$ is order-preserving, then $f(x)=x$.

Added: In fact one can show that addition-preserving implies that for all $q\in\mathbb{Q}, x\in \mathbb{R}$ holds $f(qx)=q f(x)$ and so we will get for all $q\in \mathbb{Q}$ $$ f(q)= q \cdot f(1). $$ Instead of metric-preserving, we could also make the weaker assumption that our map is continous and we would get for all $x\in \mathbb{R}$ $$ f(x) = f(1) \cdot x. $$ So, these are still reasonable maps. However, be aware that if we only assume addition-preserving, then hell might break loose and you get a zoo of nasty functions.