Proof explanation $A\setminus B = A \setminus B \cap A$

$A\setminus B = A \setminus B \cap A$

Proof $A\setminus B \subseteq A \setminus B \cap A$:

$x\in A\setminus B \to x\in A \land x \notin B$

$x\in A \land (x \notin B \color{red}{\lor x\notin A})$

$x \in A \land (x\notin B \cap A)$

$x \in A\setminus B\cap A$

Proof $A \setminus B \cap A \subseteq A\setminus B$:

$x \in A \setminus B \cap A \to x\in A \land x\notin B \cap A$

$x \in A \land (x\notin B \color{red}{\lor x\notin A})$

$x \in A \land x \notin B$

$x \in A \setminus B$

Therefore $A\setminus B = A \setminus B \cap A$

I am confused how the stuff in the red is formed. Can we add an or statement to anything and ignore if its true or not if the first part of the or is true?

• You can't use A for the left side of your equality because A is is a member of the left side – StuartMN Oct 14 '17 at 20:30

I'd write the proof in this way

$x\in A\setminus B \Rightarrow x\in A \land x\notin B\Rightarrow x\in A \land (x\notin A\lor x\notin B)\\\Rightarrow x\in A\land \neg(x\in A\land x\in B)$ by De Morgan's law

$x\in A\land x\notin A\cap B\Rightarrow x\in A\setminus(A\cap B) \Rightarrow A\setminus B \subseteq A \setminus (B \cap A)$

$x\in A \setminus (B \cap A)\Rightarrow x\in A \land x\notin (A\cap B) \Rightarrow x\in A \land \neg (x\in A \land x\in B)\\ \Rightarrow x\in A \land x\notin A \lor x\notin B$ again for De Morgan's

$x\in A \land x\notin B\Rightarrow x\in A\setminus B\Rightarrow A \setminus (B \cap A)\subseteq A\setminus B$

Therefore

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

Sure if a statement abbreviated K is true then then the statement " K or ( any statement )" holds true because the 'or" means one at least one of its components is true -namely in this case 'K".

Since $A \setminus B = A \cap B^C$, we have that:

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

$$A \cap (B \cap A)^C=$$

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

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

$$(A \cap B^C) \cup \emptyset =$$

$$A \cap B^C=$$

$$A \setminus B$$