Show that f is surjective So im having a little trouble proving this. Can anyone help me out? 
Let $A$, $B \subseteq E$.
Moreover, let $$f: \mathscr{P}(E) \to \mathscr{P}(A) \times \mathscr{P}(B)$$ be defined by 
$$f: X \mapsto (A \cap X, B \cap X)$$
Show that $f$ is surjective iff $A \cap B = \emptyset$.
I've tried for a while to work out a proof, but I seem to be getting nowhere. 
I'm new to set theory
 A: Suppose that $A\cap B\neq \emptyset$. Then there exists $x\in  A\cap B$. If $f(X)=(A,\emptyset)$, $X\cap B=\emptyset$, so $x\not\in X$. But $X\cap A=A$ so $A\subseteq X$ and $x\in  X$. This is a contradiction.
For the other direction, assume that $A\cap B=\emptyset$. Let $(C,D)\in P(A)\times P(B).$ Then if $X=C\cup D$, $f(X)=(C,D).$
A: Hint: Prove the contrapositive.
For example, if $A \cap B \neq \emptyset$, then it is impossible to get $(A_1, \emptyset)$ for some $A_1 \subset A$ with $A_1$ non-empty.
Explicitly, take $E = \{1,2,3\}$ and $A = \{1,2\}$ and $B=\{2,3\}$. Then there is no $X \in \mathscr{P}(E)$ so that $f(X) = (\{2\}, \emptyset)$. Recall that for any set $R$, $\emptyset \in \mathscr{P}(R)$ by default. 
If $A \cap B = \emptyset$, it is clear that $f$ is surjective. Surely take $(A_1,B_1) \in \mathscr{P}(A) \times \mathscr{P}(B)$, then let $ X = A_1 \cup B_1 \in \mathscr{P}(E)$, and $$f(A_1 \cup B_1) = (A_1 \cap (A_1 \cup B_1), B_1 \cap (A_1 \cup B_1))$$ and using the fact that $A \cap B = \emptyset$ as well as the rule $$A_1 \cap (A_1 \cup B_1) = (A_1 \cap A_1) \cup (A_1 \cap B_1),$$  we see that this is precisely $(A_1,B_1)$.
