Show that symmetric difference is $A \Delta B = (A \cup B)$ \ $(A\cap B)$ I want to show with logical symbols that the symmetric difference is
$A \Delta B = (A \cup B)$ \ $(A\cap B)$
I tried it as:
$(x \in A) \land (x\notin B) \lor (x \notin A) \land (x\in B)$
However, how to come to the conclusion that $A \Delta B = (A \cup B)$ \ $(A\cap B)$
?
I appreciate your answer!!!
 A: We can show set equality by using, in the following order: 


*

*the Distributive Law twice,  

*the Law of the excluded middle ($P \lor \lnot P = T$), 

*identity for conjunction $(T \land P \equiv P \land T \equiv T)$

*DeMorgan's
$$\begin{align} & x\in (A \Delta B) \iff \Big[(x \in A) \land (x\notin B)\Big] \lor \Big[(x \notin A) \land (x\in B)\Big]\\ \\
& \iff \Big[x \in A \lor (x \notin A \land x \in B)\Big] \land \Big[x\notin B \lor (x\notin A \land x\in B)\Big]\\ \\ 
& \iff (x \in A \lor x \notin A) \land (x\in A \lor x \in B) \land (x \notin B \lor x\notin A) \land (x \notin B \lor x\in B) \\ \\
&\iff T \land (x \in a \lor x \in B) \land (x \notin A \lor x \notin B) \land T \\ \\
& \iff (x \in A \lor x \in B) \land (x\notin A \lor x \notin B) \\ \\
& \iff (x \in A \cup B) \land \lnot (x \in A \land x\in B) \\ \\ 
& \iff \Big[x \in (A\cup B)\Big] \land  \Big[x\notin (A\cap B)\Big] \\ \\
& \iff x \in \Big[(A\cup B)\setminus(A \cap B)\Big]
\end{align} $$
A: $$\begin{array}{ll}
(A\setminus B)\cup (B\setminus A)&=\left\{x\mid (x\in A\land x\not\in B)\lor (x \not\in A \land x \in B)\right\}\\
&=\left\{x\mid (x\in A\lor x \not\in A) \land (x\in A\lor x \in B) \land (x\not\in B\lor x \not\in A) \land (x\not\in B\lor x \in B)\right\}\\
&=\left\{x\mid (x\in A\lor x \in B) \land (x\not\in B\lor x \not\in A) \right\}\\
&=\left\{x\mid (x\in A\lor x \in B) \land \lnot(x\in B\land x \in A) \right\}\\
(A\setminus B)\cup (B\setminus A) &= (A\cup B) \setminus (A\cap B)
\end{array}$$
A: $(A \setminus B) ∪ (B \setminus A) = (A ∩ B') ∪ (B ∩ A') = (A ∪ B) ∩ (A ∪ A') ∩ (B' ∪ B) ∩ (B' ∪ A') = (A ∪ B) ∩ (A ∩ B)' = (A ∪ B) \setminus (A ∩ B)$.
Where $X'$ is the complement of $X$ (in some implicit universe e.g. universal class).
A: Here is another answer which may add some more insight, by separating the set theory part from the logic part.
$
\newcommand{\calc}{\begin{align} \quad &}
\newcommand{\calcop}[2]{\\ #1 \quad & \quad \text{"#2"} \\ \quad & }
\newcommand{\endcalc}{\end{align}}
\newcommand{\Tag}[1]{\text{(#1)}}
\newcommand{\true}{\text{true}}
$Using the traditional definition of $\;\Delta\;$, the original statement can be rewritten as follows:
$$\calc
\tag 0
A \Delta B \;=\; (A \cup B) \setminus (A \cap B)
\calcop\equiv{set extensionality}
\langle \forall x :: x \in A \Delta B \;\equiv\; x \in (A \cup B) \setminus (A \cap B) \rangle
\calcop\equiv{definitions of $\;\Delta,\setminus,\cup,\cap\;$}
\langle \forall x :: (x \in A \land x \not\in B) \lor (x \not\in A \land x \in B)
\\&\phantom{\langle \forall x ::}
\;\equiv\; (x \in A \lor x \in B) \land \lnot (x \in A \land x \in B) \rangle
\calcop\equiv{logic: DeMorgan}
\tag 1
\langle \forall x :: (x \in A \land x \not\in B) \lor (x \not\in A \land x \in B)
\\&\phantom{\langle \forall x ::}
\;\equiv\; (x \in A \lor x \in B) \land (x \not\in A \lor x \not\in B) \rangle
\endcalc$$
Now we see the essential shape of the last line:
$$
\tag 2
(P \land \lnot Q) \lor (\lnot P \land Q) \;\equiv\; (P \lor Q) \land (\lnot P \lor \lnot Q)
$$
This law of logic can be proved in essentially the same way amWhy did:
$$\calc
(P \land \lnot Q) \lor (\lnot P \land Q)
\calcop\equiv{$\;\lor\;$ distributes over $\;\land\;$, three times}
(P \lor \lnot P) \land (P \lor Q) \land (\lnot Q \lor \lnot P) \land (\lnot Q \lor Q)
\calcop\equiv{simplify the first and last conjuncts}
\true \land (P \lor Q) \land (\lnot Q \lor \lnot P) \land \true
\calcop\equiv{simplify and reorder}
(P \lor Q) \land (\lnot P \lor \lnot Q)
\endcalc$$
This proves $\Tag 2$, and therefore  $\Tag 1$, and therefore  $\Tag 0$.
