[Math] Proof of metric

elementary-set-theorygeneral-topologymetric-spaces

Let $A$ be a set and $F$ the set of finite subsets of $A$.
Define $d:F\times F\rightarrow\mathbb{R}$ with $d(X,Y)=\#(X\cup Y)\backslash(X\cap Y)$ with $\#$ the cardinality.

How do I prove that this is a metric?

The main thing I need to prove is the triangle inequality, or

$$\#(X\cup Z)\backslash(X\cap Z)\leq\#(X\cup Y)\backslash(X\cap Y)+\#(Y\cup Z)\backslash(Y\cap Z)$$

Graphically this can be made quite clear, but how can I show this formally?

Best Answer

The operation that sends sets $A$ and $B$ to $(A \cup B) \setminus (A \cap B)$ is called the symmetric difference $A \triangle B$. So your metric is defined as $d(A,B) = |A \triangle B|$,where $|.|$ denotes cardinality.

Symmetric difference has some interesting properties, one of which is $(A \triangle B) \triangle (B \triangle C) = A \triangle C$, which implies that

$$ A \triangle C \subseteq (A \triangle B) \cup (B \triangle C)\text{ so }d(A, C) \le d(A,B) + d(B,C)$$

as a union has at most the sum of the elements of its components. So as an exercise you could try and prove the inclusion above yourself. There are probably answers doing exactly that on this site...

Related Question