Proving equalities with sets: $A \cap (B \cup C) = (A \cap B) \cup (A \cap C)$ and $X \setminus (A \cap B) = (X \setminus A) \cup (X \setminus B)$ We got this exercise sheet and I don't really know how to solve some of the problems, thanks for any help or/and advice!
Problem a) $A,B$ and $C$ are sets. Prove that:


*

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


Problem b) Proof that for sets $A, B\subset X$ counts


*

*$X \setminus (A \cap B) = (X \setminus A) \cup (X \setminus B)$


If someone could explain how I'm supposed to write down the proof I will probably be able to solve the rest on my own, all I need is a little start help.
Thanks a lot!
 A: This is not what you want to hear, but trust me, it is written with the best intentions. Also, it is too long for a comment, and I think you need to hear (read) this.
You started math one week ago. It can be confusing, difficult, annoying and hard. Trust me, most of us on this site know this. But, sadly, we know something else: mathematics takes work. Work you need to do alone. 
Now, I believe you had some classes already. And in these classes, your professor must have explained what $A\cap B$ and $A\cup B$ means when $A$ and $B$ are sets. The exercises he provided are simple equations that are very easy to prove by simply using the definitions you must have heard. This leads me to one of two conclusions:


*

*You were not paying enough attention in classes. In this case, consider your confusion in this first week a warning. It's not going to get easier. It's going to get a lot harder, and if you did not pay enough attention to cover the comparatively simple beginnings you are faced with now, then you are in for a tough year. You need to change your approach to the classes. Listen to your professor, take notes, and ask question. When you get home, read your notes again. Repeat the examples the professor gave and attempt to repeat his method. It will take time, but there is no alternative.

*You don't have enough background in the appropriate subjects and the professor assumes knowledge you do not have. In that case, talk to him directly and ask him about recommendations for books you should read to get up to date with the classes. Also, ask your classmates (there's always one who knows a lot!) for help.



I will prove an equality you did not write in your question, so you can then practice on the question alone. Here is an example of how we prove that $$A\cup(B\cap C) = (A\cup B) \cap (A\cup C)$$
First, we prove that $$A\cup(B\cap C) \subseteq (A\cup B) \cap (A\cup C).$$
Let $x\in A\cup(B\cap C)$ be any element. Then, we know that $x$ is an element of $A$ or $x$ is an element of $B\cap C$.


*

*If $x$ is an element of $A$, then $x$ is an element of $A\cup B$ (because $A\subseteq A\cup B$). Also, $x$ is an element of $A\cup C$. Therefore, because $x$ is in both sets, it is in their intersection, so $x\in (A\cup B) \cap (A\cup C)$.

*If $x$ is an element of $B\cap C$, then $x$ is an element of $B$ and $x$ is an element of $C$ (by the definition of $B\cap C$). Then, because $x\in B$, we know that $x\in A\cup B$, and because $x\in C$, we know that $x\in A\cup C$. Again, as in the previous point, $x$ is in both sets, so $x\in $(A\cup B) \cap (A\cup C)$.


We have proven that an arbitrary element $x$ from $A\cup(B\cap C)$ is also an element of $(A\cup B) \cap (A\cup C)$, therefore, we conclude that 
$$A\cup(B\cap C) \subseteq (A\cup B) \cap (A\cup C).$$
Now, we need to prove that $$(A\cup B) \cap (A\cup C)\subseteq A\cup(B\cap C)$$
Again, let $x\in (A\cup B) \cap (A\cup C)$
Then, we know that $x\in A\cup B$ and $x\in A\cup C$, so we know that $x\in A$ or $x\in B$, and we know that $x\in A$ or $x\in C$.


*

*If $x\in A$, we know that $x\in A\cup(B\cap C)$. 

*If $x$ is not in $A$, then, because it is in either $A$ or $B$, we know that $x\in B$. Similarly, we know that $x\in C$. Therefore, we know that $x\in B\cap C$, and therefore, $x\in A\cup (B\cap C).$


That concludes our proof that $$(A\cup B) \cap (A\cup C)\subseteq A\cup(B\cap C)$$

From $X\subseteq Y$ and $Y\subseteq X$, we can conclude that $X=Y$, so in our case, we conclude $$(A\cup B) \cap (A\cup C)= A\cup(B\cap C)$$
A: As the other colleague mentioned, for these proofs you should directly use the definitions of intersection and union that you got in class, and try and land on what you need from there. Let's decompose it to the bone, for a first time.
The general pattern for showing that $ A = B$, with $A$ and $B$ sets, is to show that $A \subset B$ and $B \subset A$. Try and draw sets as circles on a piece of paper : you will see that the only way to include a set in another, and vice-versa, is to have them be equal.
Generally still, to prove that $ X \subset Y$, with $X$ and $Y$ sets, one way is to take any $x$ in $X$ and show that $x$ is also in $Y$ (call this concept number (1)). Since $x$ is any element of $X$ then this applies to all elements of $X$ and so all of $X$ is contained in Y.
So, let's do exactly that for problem a) : let $x$ be any element of $A \cap (B \cup C)$. Now we want to show that $x \in (A \cap B) \cup (A \cap C) $ right ? (This is concept (1)) Well, what does this mean ?
It means, by definition of $\cup$, that $x \in (A \cap B)$ OR $x \in (A \cap C)$ (let's call this equation (2)). We'll see if this equation (2) is true.
Now what do we know about $x$ ? Well, since $x \in A \cap (B \cup C)$, it follows  that, by definition of $\cap$, $x \in A$ AND $x \in (B \cup C)$. That first part, we'll call number (3). That last part can be rewritten as $x \in B$ OR $x \in C$ - it's gotta be one of the two.
Suppose for example that $x \in B$. Since we also know (from number (3)) that $x \in A$, it follows by definition of $\cap$ that $x \in (A \cap B)$. In this case then, we have equation (2) fulfilled.
Now suppose that $x \in B$. Again using number (3), we know that $x \in A$, and by definition of $\cap$, $x \in (A \cap C)$ and we have once again fulfilled equation (2).
So this means that in all possible cases for $x$, we have equation (2) fulfilled and true - $x$ is indeed either in $(A \cap B)$ or $A \cap C)$.
Using concept (1), we can now say that since this applies to any $x$ in $(A\cap (B\cup C))$, then $(A\cap(B\cup C)) \subset (A\cap B)\cup (A\cap C)$.
Care to try the other direction, i.e. $(A\cap B)\cup (A\cap C) \subset (A\cap(B\cup C))$ ? Then using concept (0) you will have shown that your sets are equal.
PS : I use $ \subset$ for $ \subseteq $ indifferently. The concept of $A \subsetneq B$, i.e. "$ A\subset B$ AND $A \neq B$" is not often used anyway, so confusions rarely happen.
A: This is how to prove those statements using set theory:
The first part is $$A \cap (B \cup C)$$ 
$$=\{x|\space x\in A \space\mathrm{and}\space x\in (B \cup C)\}$$ 
$$=\{x|\left(\space x\in A \space\mathrm{and}\space x\in B \right) \space\mathrm{or}\left(\space x\in A \space\mathrm{and}\space x\in C \right)\}$$
$$=\{x|\space x\in (A \cap B)  \space\mathrm{or} \space x\in (A \cap C)\}$$
$$=(A\cap B)\cup(A\cap C)$$ QED
The Second part is 
$$X \setminus (A \cap B)$$
$$=\{x|\space x\notin A \space\mathrm{and}\space x\notin B \}$$
$$=(X \setminus A) \cup (X \setminus B)$$
QED
