Proof of Set Theory Algebra using Logic Let A, B and C be sets.  I am trying to prove that
$$A\cup(B \setminus C)=(A\cup B)\setminus(C\setminus A)$$ 
And I am supposed to use logic to work through this problem, so first I let 
A={x|P}, B={x|Q}, and C={x|R}
Then I did 
$$x \in (A\cup(B \setminus C)) \iff x \in \{y| P \lor (Q \land  \neg R\} $$
I have done algebra on it to come to a lot of different things but none of them seem to be getting me in the right direction.  I will list a few of the different places I have gotten if somebody wants to go from there, but besides distributing the P, I don't know what to do.


*

*$x \in \{y |(P\lor Q) \land (P\lor \neg R\}$

*$x \in \{y| ((P\land P)\lor (P \land \neg R)) \lor ((Q \land P) \lor (Q \land \neg R))$

*$x \in \{y|((P \lor P) \land (P \lor Q)) \lor ((P \lor Q) \land \neg R)\}$
Obviously, my goal would be to get to $x \in \{ y|(P \lor  Q) \land \neg(R \land \neg P)\}$, I could finish from there, but not from where I am.  Thank you to anyone who helps!
 A: $
\newcommand{\calc}{\begin{align} \quad &}
\newcommand{\calcop}[2]{\\ #1 \quad & \quad \unicode{x201c}\text{#2}\unicode{x201d} \\ \quad & }
\newcommand{\endcalc}{\end{align}}
\newcommand{\ref}[1]{\text{(#1)}}
\newcommand{\true}{\text{true}}
\newcommand{\false}{\text{false}}
\newcommand{\empty}{\varnothing}
\newcommand{\diff}{\mathbin \triangle}
$Here is how I would approach a problem like this: start at the most complex side of the equality, and calculate the elements of that set by expanding the definitions, and using the laws of logic to simplify.

In this case, we start with the right hand side of the statement, and calculate for all $\;x\;$ as follows:
$$\calc
x \in (A \cup B) \setminus (C \setminus A)
\calcop\equiv{definition of $\;\setminus\;$}
x \in A \cup B \;\land\; \lnot (x \in C \setminus A)
\calcop\equiv{definitions of $\;\cup\;$ and $\;\setminus\;$}
(x \in A \lor x \in B) \;\land\; \lnot (x \in C \land x \not\in A)
\calcop\equiv{logic: DeMorgan}
(x \in A \lor x \in B) \;\land\; (x \not\in C \lor x \in A)
\calcop\equiv{logic: factor out $\;x \in A\;$, using the fact that $\;\lor\;$ distributes over $\;\land\;$}
x \in A \;\lor\; (x \in B \land x \not\in C)
\calcop\equiv{definitions of $\;\setminus\;$ and $\;\cup\;$}
x \in A \cup (B \setminus C)
\endcalc$$
By set extensionality, this proves the statement.

Note how we make things easy for ourselves by starting with the most complex side, since it is simpler to simplify then to introduce complexity: you have less choice when trying to simplify, so you have less options to consider. That often makes it more straightforward to complete your proof.
A: Your goal is to show that
$$x \in \{ y|(P \lor  Q) \land \neg(R \land \neg P)\}=\{ y|(P \lor  Q) \land (P \lor \neg R)\},$$ where we have used $\neg(R \land \neg P)=P \lor \neg R.$
But note that you have shown
$$x \in \{y| P \lor (Q \land  \neg R\}=\{y| (P \lor Q) \land (P \lor \neg R)\},$$
and so you are done.
