Is there other function $f$ such that $f(x, y) + f(y, z) \geq 2f(x,z)$? What is it name?

Let function $f: \mathbb R^d\times \mathbb R^d \rightarrow \mathbb R$ satisfy the following conditions: For all $x, y, z\in \mathbb R^d$,

  • Non-negativity: $f(x, y)\geq 0$
  • Identity: $f(x, x)=0$
  • "Convexity": $f(x, z) \leq \frac{1}{2}f(x, y) + \frac{1}{2}f(y, z)$

Is there a function which satisfies all above properties and is there a name for such class of functions?

Edit: I thought that $f_1(x, y)=||x-y||^2$ satisfies all the conditions, however, it does not satisfy the last condition as figured out by @WhatUp in the comment below.


$$ f(a, b) + f(b, b) \geq 2 f(a, b) $$ $$ f(b, b) \geq f(a, b) $$ $$ 0 \geq f(a, b) $$ Since we also have $f(a, b) \geq 0$, the only solution is the constant function $f(a, b) = 0$.


The name for this class of functions is

constant-zero functions.


Consider $x,y,z$ and let $$ A=\max\{f(x,y),f(x,z),f(y,z),f(y,x),f(z,x),f(z,y)\}.$$ Wlog., $f(x,z)=A$. Then by "convexity", $f(x,y)=f(y,z)=A$. By "convexity" again (applied to $(y,z,x)$ instead of $(x,y,z)$), also $f(y,x)=A$ and in a similar way ultimately also $f(z,x)=f(z,y)=A$. Thus

Lemma. For all $x,y,z$, $$f(x,y)=f(x,z)=f(y,z)=f(z,x)=f(z,y)=f(y,x).$$

Apply the lemma to $z=x$, to find

Theorem. For all $x,y$, $$f(x,y)=0.$$