Proof of relative complement identity I often see this identity for set theory,
$A-B=A\cap B^c$
It is easy to believe this identity by considering the venn diagram for a relative complement,
If we consider $B^c$ informally as the space not inside $B$ then the space of set $A$ not intersectiong with set $B$ would be included in $B^c$. So logically, $A\cap B^c$ would be the shaded area, which is the same space as $A-B$.
But how would one go about proving this identity purely from set theory and symbolic logic?

Let $A = \{x\in U\mid p(x)\,\text{is true}\}$ and $B = \{x\in U\mid q(x)\,\text{is true}\}$, where $U$ is the universe of discourse.
Thus we have that
\begin{align*}
A - B & = \{x\in U\mid (x\in A)\wedge(x\not\in B)\}\\\\
& = \{x\in U \mid x\in A\}\cap\{x\in U \mid x\not\in B\} = A\cap B^{c}
\end{align*}
where we have used the definitions of difference, complement and intersection.
More precisely, given $X\subseteq U$ and $Y\subseteq U$, one has that
\begin{align*}
X^{c} & := \{x\in U \mid x\not\in X\}\\\\
X\cap Y & := \{x\in U \mid (x\in X)\wedge(x\in Y)\}
\end{align*}
Hopefully this helps!
