# Proof that sets are equal

I want to prove that $$(A\setminus B)\setminus(A \setminus C)=(A \cap C)\setminus B$$, so I did this:

$$x \in (A \setminus B)\setminus(A \setminus C) \iff$$

$$(x \in A \setminus B) \wedge (x \notin A \setminus C) \iff$$

$$(x \in A \wedge x \notin B) \wedge (x \notin A \vee x \in C) \iff$$

$$(x \in A \wedge x \notin B \wedge x \notin A) \vee (x \in A \wedge x \notin B \wedge x \in C) \iff$$

(Now, the statement in the first bracket is always false, so the truth value of the whole disjunction in the line above depends only on the second bracket)

$$x \in A \wedge x \notin B \wedge x \in C \iff$$
$$x \in (A \cap C) \setminus B$$

Is the method correct? Thanks in advance.

• Looks good to me. Oct 7 '19 at 20:29
• I can't find any errors. Oct 7 '19 at 20:32

It's correct. A (not so) different way could be to set $$U=A\cup B\cup C$$ and denoting complementation with respect to $$U$$ by $$X^c$$: \begin{align} (A\setminus B)\setminus(A\setminus C) &=(A\cap B^c)\cap(A\cap C^c)^c \\ &=(A\cap B^c)\cap(A^c\cup C)\\ &=(A\cap B^c\cap A^c)\cup(A\cap B^c\cap C)\\ &=\emptyset\cup(A\cap B^c\cap C)\\ &=(A\cap C)\cap B^c\\ &=(A\cap C)\setminus B \end{align} One could also go in a different direction: $$(A\setminus B)\setminus(A\setminus C)=(A\cap B^c\cap C)=(A\setminus B)\cap C$$