Problem:
Let $p$ be binary relation on the set $X$, for any $x,y$ $\in$ $X$ let:
$$ d(x,y) = \begin{cases} 3, & \text{for } \hspace{0.5cm}xpy \\ 0, & \text{for} \hspace{0.5cm} \neg xpy \end{cases} $$
Determine necessary and sufficient condition(characteristic of relation $p$) so that $d$ is metric on the set $X$.
Necessary conditions for metric:
$$d(x,y)=0 \Leftrightarrow x=y$$
$$d(x,y)= d(x,y)=0 $$
$$d(x,z)\leq d(x,y) + d(y,z)$$
Possible solution:
The binary relation must be symmetric, because of the second condition for metric, but I do not know whether that is necessary and sufficient. It seems to me that the relation $p$ is non-equality, is it possible? Any help is appreciated.
$d$ is a metric if and only if $p$ is equal to the relation $\ne$, or $$(x,y) \in p \iff x \ne y$$
Assume that $p$ is equal to $\ne$ and let's check that $d$ is a metric.
Conversely, if $p$ isn't equal to $\ne$, then either