Prove that two sets are equal

1.1k Views Asked by At

I need to show that the relation $A-B=((A\cup B)-(A\cap B))-(B-A)$ is true for any sets A and B. I know that I can prove this through double inclusion. So here is how I did it.
(left to right) Let
x $\in A-B$
$\Leftrightarrow (x\in A) \wedge !(x \in B)$
$\Leftrightarrow x \in(A\cup B) \wedge \ !\ x\in(A \cap B) \wedge\ !\ x\in(B-A)$
$\Leftrightarrow x\in((A\cup B)-(A\cap B))-(B-A)$

(right to left) Let
$x\in((A\cup B)-(A\cap B))-(B-A)$
$\Leftrightarrow x \in ((A\cup B)-(A\cap B)) \wedge\ !\ x\in(B-A)$
$\Leftrightarrow x\in (A \cup B) \wedge \ !\ x \in (A \cap B) \wedge\ !\ x \in(B-A)$
$\Leftrightarrow (x\in A \vee x \in B) \wedge \ ! \ (x \in A \wedge x \in B) \wedge \ ! \ (x\in B \wedge\ ! \ (x \in A))$
$\Leftrightarrow x\in A \wedge \ !\ (x\in B)$
$x \in (A-B)$

Is this the right way to do it? Am I correct?

1

There are 1 best solutions below

1
On

I give you another way of proof by algebra. First \begin{align} (A\cup B)-(A\cap B)&=(A-(A\cap B))\cup (B-(A\cap B)) \\ &=(A-B)\cup (B-A) \end{align} Then \begin{align} ((A\cup B)-(A\cap B))-(B-A)&=(A-B)\cup (B-A)-(B-A) \\ &=((A-B)-(B-A))\cup((B-A)-(B-A)) \\ &=((A-B)-B)\cup((A-B)-A^c)\cup \varnothing \\ &=((A-B\cup B)\cup((A-A^c)-B) \\ &=(A-B)\cup (A-B) \\ &=A-B \end{align}