# Simplifying a set theory expression

I'm learning the different laws used to simplify set theory expressions and I'm stuck at a more difficult task. I want to simplify the following expression:

\begin{align} (A \cup B) \setminus (A \setminus (A \cap B)) & = (A \cup B) \cap (A \setminus (A \cap B))' \\ & = (A \cup B) \cap (A \cap (A \cap B)')' \\ & = (A \cup B) \cap (A' \cup (A \cap B)) \\ & = ? \end{align}

What I wonder is how I proceed from here; I feel stuck.

Thanks in advance; and sorry I could not get the MathJaX to work, I'll learn it until next time.

• I know it's not rigorous at all but Venn diagram is very very good way of visualising what set should be especially if there are only two sets you are considering Commented Sep 8, 2014 at 15:00
• Yup, you're right. And I've found out it's simplified to B; however, I want to be able to solve these in a fine way, and some help with this expression would really help me. Commented Sep 8, 2014 at 15:01

$$(A \cup B) \cap (A' \cup (A \cap B))$$ $$(A \cup B) \cap ((A' \cup A) \cap (A' \cup B))$$ $$(A \cup B) \cap (\text{"All"} \cap (A' \cup B))$$ $$(A \cup B) \cap (A' \cup B)$$ $$(A \cup A') \cap B$$ $$\text{"All"} \cap B$$ $$B$$
• Checking your solution got me thinking; how come $(A \cup A') \cap B$ is equal to $(A \cap A') \cup B$ Commented Sep 8, 2014 at 15:36
• It's because of the particular case with $A$ and $A'$ giving All or Nothing if you take the union or intersection. So you take the intersection of B with All or the union with Nothing. Commented Sep 8, 2014 at 15:42