Given a function $f : A \rightarrow B$ and subsets $W, X \subseteq A$ , prove $f(W \cup X) = f(W) \cup f(X)$ . Given a function $f : A \rightarrow B$ and subsets $W, X \subseteq A$ , prove $f(W \cup X) = f(W) \cup f(X)$.
My approach:
$f(W \cup X) = \{f(a) : a \in W \cup X\} = \{f(a) : (a \in W) \lor (a \in X)\} = \{f(a) : a \in W\} \cup \{f(a) : a \in X\} = f(W) \cup f(X)$.
My question:
Is this correct? What confuses me is that I can do the same proof for $f(W \cap X) = f(W) \cap f(X)$, which is of course wrong in general. See:
$f(W \cap X) = \{f(a) : a \in W \cap X\} = \{f(a) : (a \in W) \land (a \in X)\} = \{f(a) : a \in W\} \cap \{f(a) : a \in X\} = f(W) \cap f(X)$.
Thanks in advance!
 A: I would advise you to prove this kind of equalities with a double inclusion. Take one element in the first set, and show that it belongs to the second one ; and take one element in the second set, and show that it belongs to the first one.
Example of such a proof in the case of your question :
If $x \in f(W \cup X)$, then there exists $y \in W \cup X$ such that $x = f(y)$. Then either $y \in W$, so $x \in f(W)$, so $x \in f(W) \cup f(X)$ ; either $y \in X$, so $x \in f(X)$, so $x \in f(W) \cup f(X)$. In both cases, $x \in f(W) \cup f(X)$. This show that $f(W \cup X) \subset f(W) \cup f(X)$.
Conversely, let's suppose that $x \in f(W) \cup f(X)$. First case, $x \in f(W)$ : therefore, there exists $y \in W$ such that $x=f(y)$. Of course $y \in W \cup X$, so $x \in f(W \cup X)$. Second case, $x \in f(X)$ : therefore, there exists $y \in X$ such that $x=f(y)$. Of course $y \in W \cup X$, so $x \in f(W \cup X)$. In both cases, $x \in f(W \cup X)$. This shows that $f(W) \cup f(X) \subset f(W \cup X)$.
You have proved this way that $f(W \cup X) = f(W) \cup f(X)$.
Try to prove the $\cap$-case this way, you will see that only one of the two inclusions works.
