# Union as Symmetric Difference with Intersection

## Theorem

Let $A$ and $B$ be sets.

Then:

$A \cup B = \paren {A \symdif B} \symdif \paren {A \cap B}$

where:

$A \cup B$ denotes set union
$A \cap B$ denotes set intersection
$A \symdif B$ denotes set symmetric difference

## Proof

From the definition of symmetric difference:

$\paren {A \symdif B} \symdif \paren {A \cap B} = \paren {\paren {A \symdif B} \cup \paren {A \cap B} } \setminus \paren {\paren {A \symdif B} \cap \paren {A \cap B} }$

Also from the definition of symmetric difference:

$\paren {A \symdif B} \cap \paren {A \cap B} = \paren {\paren {A \cup B} \setminus \paren {A \cap B} } \cap \paren {A \cup B}$
$\paren {S \setminus T} \cap T = \O$

Hence:

$\paren {\paren {A \cup B} \setminus \paren {A \cup B} } \cap \paren {A \cup B} = \O$

This leaves:

 $\ds$  $\ds \paren {\paren {A \symdif B} \cup \paren {A \cap B} } \setminus \paren {\paren {A \symdif B} \cap \paren {A \cap B} }$ $\ds$ $=$ $\ds \paren {\paren {A \symdif B} \cup \paren {A \cap B} } \setminus \O$ $\ds$ $=$ $\ds \paren {A \symdif B} \cup \paren {A \cap B}$ Set Difference with Empty Set is Self

Then:

 $\ds$  $\ds \paren {A \symdif B} \cup \paren {A \cap B}$ $\ds$ $=$ $\ds \paren {A \setminus B} \cup \paren {B \setminus A} \cup \paren {A \cap B}$ Definition 1 of Symmetric Difference $\ds$ $=$ $\ds \paren {\paren {A \setminus B} \cup \paren {A \cap B} } \cup \paren {\paren {B \setminus A} \cup \paren {A \cap B} }$ Set Union is Idempotent, Union is Commutative and Union is Associative $\ds$ $=$ $\ds A \cup B$ Set Difference Union Intersection

Hence the result.

$\blacksquare$