# Simplify $(A\cap B \cap C) \cup ((A-\bar B) \cap D) \cup ((A-C-D)-(A-B))$

$$(A\cap B \cap C) \cup ((A-\bar B) \cap D) \cup ((A-C-D)-(A-B))$$

I'm having trouble with simplifying this set after I convert all the minuses to intersections with complement.

I managed to simplify to the below equation, could it be simplified further?

$$(A\cap B) \cup (C\cap D) \cup (A \cap \bar C \cap \bar D \cap (\bar A \cup B))$$

-

Let us see what you (presumably) did:

\begin{align} & (A\cap B \cap C) \cup ((A-\bar B) \cap D) \cup ((A-C-D)-(A-B))\\ =&(A \cap B \cap C) \cup ((A \cap \bar{\bar B}) \cap D) \cup ((A \cap \bar C\cap \bar D)\cap \overline{(A \cap \bar B)})\\ =&(A \cap B \cap C) \cup (A \cap B \cap D)\cup (A \cap \bar C\cap \bar D\cap (\bar A \cup B)) \end{align}

So far, so good. But now you seem to think that: $$(A \cap B \cap C)\cup(A\cap B\cap D) = (A \cap B)\cup (C\cap D)$$ which looks a lot like a faulty application of distributivity of $\cup$ over $\cap$. Knowing that you went wrong, can you fix it?

We can also use distributivity to simplify $A \cap \bar C\cap \bar D\cap (\bar A \cup B)$:

\begin{align} A \cap \bar C\cap \bar D\cap (\bar A \cup B) &= \overbrace{(A \cap \bar C\cap \bar D\cap \bar A)}^{=\varnothing} \cup (A \cap \bar C\cap \bar D\cap B)\\ &= A \cap B \cap \bar C\cap \bar D \end{align}

Combining this with the result from the other two components, can you simplify it even further?

-