A metric space is a set M together with a function $d:M \times M \rightarrow \Bbb{R} $, where $d$ satisfies:
- $d(x,y)\ge 0$
- $d(x,y)=0 \Leftrightarrow x=y$
- $d(x,y)=d(y,x)$
- $d(x,z) \le d(x,y)+ d(y,z)$
$\forall x,y,z \in M.$
Naively it seems that $\Bbb{R}$ has too much structure than what is required of it to satisfy these axioms and $d$ could map to any ordered ring.
So my question is why is $\Bbb{R}$ chosen and not a more general ring? Has there been any research on metrics that map to sets other than $\Bbb{R}$?
I have searched Google and not found anything useful. My question title seems similar to this one but after reading the full question text I believe they are asking different things.
There seems to be only a single way in which generalization makes sense: by adding infinities, i.e. $x\in R$ with
$$\forall n\in\Bbb N:\underbrace{1+\cdots+1}_n<|x|,$$
or infinitesimals, i.e. $x\in R-\{0\}$ with
$$\forall n\in\Bbb N:\underbrace{|x+\cdots+x|}_n<1.$$
For ordered rings with such non-standard elements we have some interesting non-standard metric spaces. Let for example $R=\Bbb R^*$ a set of hyperreals. Now points in your metric space can be infinitely far apart or infinitely close together in some precise sense. Especially $\Bbb R^*$ is a non-standard metric space which cannot be given a usual metric (except when allowing $\infty$ as distance).
However, when you explicitely want to avoid infinites/infinitesimals, then your generalization is merely a restriction. As it turns out, any linerly ordered ring without non-standard element is just a subring of $\Bbb R$. So whatever you built in this way can also be considered a usual metric space with a metric $d:X\times X\to\Bbb R$.
And note that the axioms of metric spaces not even use multiplication. Hence it suffices to ask for metrics $d:X\times X\to G$ for a totally ordered (abelian) group $G$. Still, this is only more general when we allow infinities/infinitesimals. Otherwise we are isomorphic to a subgroup of (the additive group of) $\Bbb R$ by the same argument as for rings.