TITLE: Preimage of generated $\sigma$-algebra
QUESTION [51 upvotes]: For some collection of sets $A$, let $\sigma(A)$ denote the $\sigma$-algebra generated by $A$.
Let $C$ be some collection of subsets of a set $Y$, and let $f$ be a function from some set $X$ to $Y$. I want to prove:
$$f^{-1}(\sigma(C))=\sigma(f^{-1}(C))$$
I could prove that 
$$\sigma(f^{-1}(C)) \subset f^{-1}(\sigma(C))$$ 
since complements and unions are 'preserved' by function inverse. But how do I go the other way? 
EDIT: One way to go the other way would be to argue that any set in $\sigma(C)$ must be built by repeatedly applying the complement, union and intersection operations to elements of $C$ and all these operations are preserved when taking the inverse. The problem I am facing with the approach is formalizing the word "repeatedly".
[not-homework]

REPLY [3 votes]: This is just a summary of Carl Mummert's answer in a slightly more systematic way. 
We are given $f:X \rightarrow Y$. Also, I will use lower-case letters (e.g., $x$) for members of $X$ or $Y$, upper-case letters (e.g., $A$) for subsets of $X$ or $Y$, and script font (e.g., $\mathscr{A}$) for sets of subsets of $X$ or $Y$ . 

Let's revisit the following definitions: 

$f(A) = \{ f(x) | x\in A\} \text{ for } A \subset X$.
$f^{-1}(B) = \{ x | f(x) = y \text{ and } y\in B\} \text{ for } B \subset Y$.
$f(\mathscr A) = \{ f(A) | A\in \mathscr{A} \}$,  for $\mathscr A$ a class of subsets of $X$.
$f^{-1}(\mathscr B) = \{ f^{-1}(B) | B \in \mathscr{B} \}$, for $\mathscr B$ a class of subsets of $Y$.

And let's also introduce a new definition:

$f^{*}(\mathscr A) = \{ f(A) | A \in \mathscr{A} \text{ and } f^{-1}(f(A)) \in \mathscr A \}$, for $\mathscr A$ a class of subsets of $X$. In general, $f^{*}(\mathscr A) \subset f(\mathscr A)$, but the inverse can be wrong.

We need to prove the following statements:

(3.1) If $\mathscr A$ is a $\sigma$-algebra, then so is $f^{*}(\mathscr A)$.
(3.2) If $\mathscr B$ is a $\sigma$-algebra, then so is $f^{-1}(\mathscr B)$.
(3.3) $f^{*}(f^{-1}(\mathscr B)) = \mathscr B.$
(3.4) $f^{-1}(f^{*}(\mathscr A)) \subset \mathscr A.$


Now to prove that $f^{-1}(\sigma(\mathscr B)) \subset \sigma(f^{-1}(\mathscr B))$, we can write:
$\begin{aligned}
&\mathscr A \subset \mathscr A \Rightarrow \\
\text{from (3.3):  } &\mathscr A \subset f^{*}(f^{-1}(\mathscr A)) \Rightarrow \\
\text{since } \mathscr (.) \subset \sigma((.))\text{:  } &\mathscr A \subset f^{*}(\sigma(f^{-1}(\mathscr A))) \Rightarrow \\
\text{from (3.1):  }&\sigma(\mathscr A) \subset f^{*}(\sigma(f^{-1}(\mathscr A))) \Rightarrow  \\
\text{from (3.4): }&f^{-1} (\sigma(\mathscr A)) \subset f^{-1}(f^{*}(\sigma(f^{-1}(\mathscr A)))) \subset \sigma(f^{-1}(\mathscr A)). \quad \blacksquare
\end{aligned}$