When defining metric spaces we want that $d$ in a pair $(X,d)$ satisfies:

1) $d$ is a function from $X \times X$ to $\mathbb R$

2) $d(x,y) \geq 0$ with $d(x,y)=0$ iff $x=y$

3) $d(x,y)=d(y,x)$

4) $d(x,z) \leq d(x,y)+d(y,z)$

First, I was thinking why the set of values of $d$ is some subset of $\mathbb R$ and then I saw that we have $\leq$ and $\geq$ in the axiomatics and reals are ordered with respect to a relation $\leq$.

I do not know could we have the same effective axiomatics if we wanted $d$ to be a function from $X \times X$ to $\mathbb R^2$.

But that is not what I want to share here.

It is some construction that I constructed that I want to share.

Let $S$ be some set of sets, let also $S$ be countable , that is, $S= \cup_{i\in \mathbb N} A_i$. We will require also that we have $A_1 \subset A_2 \subset ... \subset A_k \subset ...$

Now observe this: If we define $d$ to be a symmetric difference, that is $d(A,B)=( A \setminus B) \cup (B \setminus A)$, we have:

1) $d$ is a function from $S \times S$ to some set of sets $Y$

2) $d(A,B) \supseteq \emptyset$ with $d(A,B)= \emptyset$ iff $A=B$

3) $d(A,B)=d(B,A)$

4) $d(A,B) \subseteq d(A,C) \cup d(C,B)$

I have checked 4) with a help of Venn diagrams so I did not establish that it holds very rigorously but it seems that it holds.

But that is not important at all.

What is important is that we can define more general spaces than metric spaces by just changing the value-space of metric to not to be $\mathbb R$ and $\geq$ to be some other relation, $0$ to be zero of some structure, and $+$ to be some other operation suitably chosen.

This construction shows that it is possible to turn at least some topological spaces into "metric-like" spaces, and I would like to know something about that topic, that is, are there some results like this one and constructions that allow us to turn some topological spaces into spaces more general than classical metric ones(more general in that that we want that $d$ be a function to some set $Y$, which, as we see, need not be $\mathbb R$), as is done here.