# If $A,B \subseteq X$, Show that $B=(A\cap B)\cup (B\setminus A)$

If $A,B \subseteq X$, Show that $B=(A\cap B)\cup(B\setminus A)$

My advances

$B=(A\cap B)\cup (B\setminus A)$

$=(A \cap B)\cup (B \cap\overline{A})$

$=(A\cap B)\cup (B\cap X)$

$=(A \cap B)\cup (B)$

## 4 Answers

In your proof you can add this $$(B\cap A)\cup(B\cap \overline A)=B\cap(A\cup \overline A)=B$$

Another way:
Clearly if $x\in(A\cap B)\cup(B\setminus A)$, then $x\in B$

If $x\in B$, we have two cases:

• $x\in A$. In this case $x\in(A\cap B)$

• $x\notin A$. In this case $x\in(B\setminus A)$

$$(B\cap A)\cup(B\cap \overline A)=(B \cap B)\cap(A\cup \overline A)=B$$


Since this problem looks like a simplification problem, we start by investigating which $\;x\;$ are elements of the right hand side set, and work towards the left hand side: $$\calc x \in (A\cap B)\cup (B\setminus A) \op=\hint{definitions of \;\cup,\cap,\setminus\;} (x \in A \land x \in B) \lor (x \in B \land x \not\in A) \op=\hints{logic: \;\land\; distributes over \;\lor\;} \hint{-- since we want to end up with a single \;B\;} (x \in A \lor x \not\in A) \land x \in B \op=\hint{logic: excluded middle} \true \land x \in B \op=\hint{logic: simplify} x \in B \endcalc$$ So, by set extensionality, we've proved the original statement.