Show that $(A_1\times B_1)\setminus(A_2\times B_2)=[(A_1\cap A_2)\times (B_1\setminus B_2)]\cup [(A_1\setminus A_2)\times B_1]$ I want to verify the above.
I can prove by picking an $(x,y)\in (A_1\times B_1)\setminus (A_2\times B_2)$ that then
$$(x,y)\in (A_1\times B_1)\wedge (x,y)\notin (A_2\times B_2)
\\iff\ x\in A_1 \wedge y\in B_1\wedge \ \neg(x\in A_2 \wedge y\in B_2)$$
....
Which gives 
$$(x,Y)\in [(A_1\setminus A_2)\times B_2 ]\cup [A_1\times (B_1\setminus B_2)]$$
But I cant see how I could get the right expression above. How can I do this?
Thanks in advance!
 A: Begin by showing the following two results. If $X,W$ are subsets of the same set, and $Y,W$ are subsets of the same set, then
$$
(X\times Y)^c=(X^c\times Y^c)\cup(X^c\times Y)\cup (X\times Y^c),\tag{1}\\
$$
and
$$
(X\times Y)\cap (Z\times W)=(X\cap Z)\times (Y\cap W),\tag{2}
$$
and
$$
X\times (Y\cup W)=(X\times Y)\cup (X\times W).\tag{3}
$$
Then the left-hand side can be written as
$$
\begin{align}
(A_1\times B_1)\setminus(A_2\times B_2)&=(A_1\times B_1)\cap(A_2\times B_2)^c\\
&=(A_1\times B_1)\cap \left[(A_2^c\times B_2^c)\cup (A_2^c\times B_2)\cup(A_2\times B_2^c)\right]\\
\end{align}
$$
using $(1)$. By the distributive law this equals
$$
\left[(A_1\times B_1)\cap (A_2^c\times B_2^c)\right]\cup\left[(A_1\times B_1)\cap (A_2^c\times B_2)\right]\cup\left[(A_1\times B_1)\cap (A_2\times B_2^c)\right],
$$
on which we use $(2)$ to arrive at
$$
\left[(A_1\cap A_2^c)\times(B_1\cap B_2^c)\right]\cup\left[(A_1\cap A_2^c)\times(B_1\cap B_2)\right]\cup\left[(A_1\cap A_2)\times(B_1\times B_2^c)\right].
$$
Use $(3)$ to simplify this as
$$
\left[(A_1\cap A_2^c)\times B_1\right]\cup\left[(A_1\cap A_2)\times (B_1\cap B_2^c)\right]
$$
which is we wanted.
A: Here is a way to prove this which doesn't require any real insight upfront, just using the laws of logic to simplify.
$
\newcommand{\calc}{\begin{align} \quad &}
\newcommand{\calcop}[2]{\\ #1 \quad & \quad \text{"#2"} \\ \quad & }
\newcommand{\endcalc}{\end{align}}
\newcommand{\Tag}[1]{\text{(#1)}}
$We start at the most complex side of this equality, the right hand side, and calculate which $\;x\;$ it contains by expanding the definitions.  When we arrive at $\Tag{*}$ we use logic to simplify to $\Tag{**}$.  Finally, we use the definitions again to reach the left hand side of our original equality.
$$\calc
x \in \big((A_1 \cap A_2) \times (B_1 \setminus B_2)\big) \;\cup\; \big((A_1 \setminus A_2) \times B_1\big)
\calcop\equiv{definition of $\;\cup\;$}
x \in (A_1 \cap A_2) \times (B_1 \setminus B_2) \;\lor\; x \in (A_1 \setminus A_2) \times B_1
\calcop\equiv{definition of $\;\times\;$, twice, merging the two $\;\exists p,q\;$ quantifications}
\langle \exists p,q : x = (p,q) : \big(p \in (A_1 \cap A_2) \land q \in (B_1 \setminus B_2)\big)
\\&\phantom{\langle \exists p,q : x = (p,q) :}
\;\lor\; \big(p \in (A_1 \setminus A_2) \land q \in B_1\big) \rangle
\calcop\equiv{definitions of $\;\cap\;$ and of $\;\setminus\;$ twice}
\tag{*} \langle \exists p,q : x = (p,q) : \big(p \in A_1 \land p \in A_2 \land q \in B_1 \land q \not \in B_2\big)
\\&\phantom{\langle \exists p,q : x = (p,q) :}
\;\lor\; \big(p \in A_1 \land p \not\in A_2 \land q \in B_1\big) \rangle
\calcop\equiv{logic: simplify by extracting common $\;p \in A_1 \land q \in B_1\;$}
\langle \exists p,q : x = (p,q) : p \in A_1 \land q \in B_1 \land \big((p \in A_2 \land q \not \in B_2) \;\lor\; p \not\in A_2\big) \rangle
\calcop\equiv{logic: simplify by using negation of $\;p \not\in A_2\;$ on other side of $\;\lor\;$}
\langle \exists p,q : x = (p,q) : p \in A_1 \land q \in B_1 \land (q \not \in B_2 \lor p \not\in A_2) \rangle
\calcop\equiv{logic: DeMorgan to get a more symmetrical shape}
\tag{**} \langle \exists p,q : x = (p,q) : (p \in A_1 \land q \in B_1) \;\land\; \lnot (p \in A_2 \;\land\; q \in B_2) \rangle
\calcop\equiv{definition of $\;\times\;$, twice}
x \in A_1 \times B_1 \;\land\; \lnot (x \in A_2 \times B_2)
\calcop\equiv{definition of $\;\setminus\;$}
x \in (A_1 \times B_1) \setminus (x \in A_2 \times B_2)
\endcalc$$
By set extensionality, this proves the equality.
