# How to prove this statement $x \not\in D$ then $x \in B$

I am quite a beginner writing proofs, that's why I am asking such a simple question.

I have an exercise:

Suppose A\B ⊆ C ∩D and x ∈ A. Prove (by using proof techniques) that if $x \notin D$ then x ∈ B

which, I think, I have proved using contrapositive:

Initial givens:

$A \setminus B \subset C \cap D$

$x \in A$

If $x \not\in D \rightarrow x \in B$

which I reversed to:

$\neg(x \in B) \rightarrow x \in D$

Now my givens are:

$A \setminus B \subset C \cap D$

$x \in A$

$\neg(x \in B)$

and we want to prove that $x \in D$

So we can say that $x \in A \land x\not\in B$, which is a subset of $C \cap D$, so $x \in C \land x \in D$, so $x \in D$, if $x \not\in B$, which is the contrapositive of the initial statement...

Is this a valid proof?

• Yes, this is valid. It might might need some formulations revised though. For instance, you say "$x \in A \land x\not\in B$, which is a subset of $C \cap D$." But $x \in A \land x\not\in B$ is not a "subset" of anything, it's a statement. It would be better to say "$x \in A\setminus B$, which is a subset of..." (where "which" now refer to $a\setminus B$, not the whole statement). – Arthur Oct 29 '14 at 17:11
• @Arthur Ok, thanks ;) – nbro Oct 29 '14 at 17:17

Yes, this is valid. It might might need some formulations revised though. For instance, you say "$x\in A\land x\notin B$, which is a subset of $C\cap D$." But $x\in A\land x\notin B$ is not a "subset" of anything, it's a statement. It would be better to say "$x\in A\setminus B$, which is a subset of..." (where "which" now refer to $a\setminus B$, not the whole statement).