2 Generalized approach, and fixed an error.

Perhaps a start would be to consider metrics of the form $f(x,y)=g(g^{-1}(x) - g^{-1}(y))$, f(x,y)=g(h(g^{-1}(x),g^{-1}(y))$, where$g$is some invertible function. We can place restrictions on$g$and$h$by considering the conditions for$f(x,y)$to be a valid metric. Firstly, definiteness requires$f(x,x)=0$, so we have$g(g^{-1}(x) - g^{-1}(x))=0$, h(g^{-1}(x),g^{-1}(x))=g^{-1}(0)$, and so the definiteness requirement reduces to $g(x)=0$ h(a,b)=g^{-1}(0)=g_0$iff$x=0$.a=b$.

Secondly, we have the symmetry requirement. Since we require $f(x,y) = f(y,x)$ it follows that $g(g^{-1}(x) - g^{-1}(y)) g(h(g^{-1}(x),g^{-1}(y))) = g(g^{-1}(y) - g^{-1}(x))$ g(h(g^{-1}(y),g^{-1}(x)))$and so$g(x) h(a,b) = g(-x)$h(b,a)$. If $h$ is continuous, then $g_0$ is either the maximum or minimum value taken on by $h$.

Now, lets turn to the associativity requirement you have specified: $f(x,f(y,z))=f(f(x,y),z)$. We have $f(f(x,y),z)=g(g^{-1}(g(g^{-1}(x) - g^{-1}(y))) - g^{-1}(z))$. Since f(f(x,y),z)=g(h(g^{-1}(g(h(g^{-1}(x),g^{-1}(y)))),g^{-1}(z)))$. Let$f(f(x,y),z) = f(f(y,x),z)$, from the symmetry condition, g^{-1}(x)=a$, $f(f(x,y),z)$ can be rewritten as g^{-1}(y)=b$and$f(f(x,y),z)=g(-g^{-1}(x)+g^{-1}(y)-g^{-1}(z))$. Applying the identity operation g^{-1}(z)=c$. Then $g^{-1}\circ g$ we obtain g^{-1}(f(f(x,y),z))=h(h(a,b),c)$and$f(f(x,y),z)=g(-g^{-1}(x)+g^{-1}(g(g^{-1}(y)-g^{-1} (z))))=f(f(y,z),x)$, g^{-1}(f(x,f(y,z)))=h(a,h(b,c))$, and so by the symmetry again we obtain associativity requirement on $f(f(x,y),z)=f(x,f(y,z))$.

So the question reduces to whether there exists a function f$becomes an associativity requirement on$g$which is both evenh$.

Applying the third condition, invertible and has the triangle in equality, we obtain the restriction that $g(0)=0$ which satisfies g \circ f$obeys the triangle inequalityin equality. I suspect Since this can be expressed as is not specifically a condition on$f$, it seems that a reasonable approach would be to look for any function$h(a,b)$with the first derivative following properties: 1) There exist some$g_0$such that$h(a,b)=g_0$iff$a=b$, 2)$h(a,b)=h(b,a)$and 3) h(h(a,b),c)=h(a,h(b,c)). Since we can set$g_0=0$without loss of generality (by choosing$g$.g'(x) = g(x)-g_0$), finding a $h$ satisfying only 3 criteria: 1) Definiteness, 2) Symmetry and 3) Associativity, would seem to go a long way towards producing a metric of the desired form.

1

This is my first post, and so I hope this response is above the minimum level of usefulness expected of a response on MO.

Perhaps a start would be to consider metrics of the form $f(x,y)=g(g^{-1}(x) - g^{-1}(y))$, where $g$ is some invertible function.

We can place restrictions on $g$ by considering the conditions for $f(x,y)$ to be a valid metric.

Firstly, definiteness requires $f(x,x)=0$, so we have $g(g^{-1}(x) - g^{-1}(x))=0$, and so the definiteness requirement reduces to $g(x)=0$ iff $x=0$.

Secondly, we have the symmetry requirement. Since we require $f(x,y) = f(y,x)$ it follows that $g(g^{-1}(x) - g^{-1}(y)) = g(g^{-1}(y) - g^{-1}(x))$ and so $g(x) = g(-x)$.

Now, lets turn to the associativity requirement you have specified: $f(x,f(y,z))=f(f(x,y),z)$. We have $f(f(x,y),z)=g(g^{-1}(g(g^{-1}(x) - g^{-1}(y))) - g^{-1}(z))$. Since $f(f(x,y),z) = f(f(y,x),z)$, from the symmetry condition, $f(f(x,y),z)$ can be rewritten as $f(f(x,y),z)=g(-g^{-1}(x)+g^{-1}(y)-g^{-1}(z))$. Applying the identity operation $g^{-1}\circ g$ we obtain $f(f(x,y),z)=g(-g^{-1}(x)+g^{-1}(g(g^{-1}(y)-g^{-1} (z))))=f(f(y,z),x)$, and so by the symmetry again we obtain $f(f(x,y),z)=f(x,f(y,z))$.

So the question reduces to whether there exists a function $g$ which is both even, invertible and has $g(0)=0$ which satisfies the triangle inequality. I suspect this can be expressed as a condition on the first derivative of $g$.