Union of preimages and preimage of union

Solution 1:

It is a general fact that for any mapping of sets $f: X \rightarrow Y$, $\bigcup f^{-1}(U_i) = f^{-1}\left(\bigcup U_i\right)$ and $\bigcap f^{-1}(U_i)=f^{-1}\left( \bigcap U_i\right)$. Try proving this by elementary set theory, i.e. take an element of $\bigcup f^{-1}(U_i)$ and show that it is an element of $f^{-1}\left(\bigcup U_i\right)$ and conversely.