# Inverse image of a union equals the union of the inverse images

I just wonder if my following solution is true.

Let $X,Y$ be sets, let $f:X\to Y$ be a function, let $\{Y_i\}_{i\in I}$ be a family of subsets of $Y$. (Note: I use equalities instead of mutual containment)

$$f^{-1}[\bigcup_{i\in I} Y_i] = \{x \in X: \mbox{there exists an}\quad i \in I\mbox{ such that } y \in Y_i,f(x)=y\} =\bigcup_{i \in I} f^{-1}[Y_i]$$

I initially do not know how to get from the left to right, but when I put both sets in set notation, they turn out to be the same, hence the one line proof. Something go ultimately wrong?

-
Do the $X_i$ serve any purpose here? Whether what is written is enough is a matter of comfort, I guess. – Dylan Moreland Jul 23 '12 at 21:15
There’s nothing wrong with your proof that $$f^{-1}\left[\bigcup_{i\in I}Y_i\right]=\bigcup_{i\in I}f^{-1}[Y_i]\;,$$ except that the $\infty$ above the $\bigcup$ is incorrect. What do the sets $X_i$ have to do with it? – Brian M. Scott Jul 23 '12 at 21:15
sorry about the $X_i$, I wrote out the whole question, and the question I posted is just part of the problems. and yes you guys are right about the infinity, that is typo – Daniel Jul 23 '12 at 21:17

The statement is true, and your argument is essentially right, but I would say that you are skipping steps to achieve that identification. (Also, you should not have those $\infty$'s on top of the union symbol). I would instead add:
\begin{align*} f^{-1}\left[\bigcup_{i\in I}Y_i\right] &= \left\{ x\in X\;\left|\; f(x)\in\bigcup_{i\in I}Y_i\right\}\right.\\ &=\Biggl\{x\in X\;\Biggm|\; \exists i\in I\text{ such that }f(x)\in Y_i\Biggr\}\\ &= \bigcup_{i\in I}\{x\in X\mid f(x)\in Y_i\}\\ &= \bigcup_{i\in I}f^{-1}[Y_i]. \end{align*} The first equality is by definition of inverse image; the second by definition of the union; the third is by definition of union; and the fourth by definition of inverse image.