To prove a map from a measurable space to a set with a $\sigma$-algebra generated by a family of subsets. Suppose $(X,m)$ is a measurable space and $Y$ is a set. Given $\mathscr{S}\subset P(X)$, a family of subsets of $Y$, we can construct a smallest $\sigma$-algebra $\sigma (\mathscr{S})$ containing  $\mathscr{S}$, which is the intersection of all the $\sigma$-algebra containing $\mathscr{S}$. 
Claim: $f:(X,m)\to (Y,\sigma (\mathscr{S}))$ is measurable iff $f^{-1}(S)\in m$ for any $S\in \mathscr{S}$.
Whether the claim is correct?
Note that in a similar case in general topology, it only suffices to prove the preimage of all the set in a basis is open, if we want to prove a map form a topogoly space to a set with a topology generated by a basis.
In the case of  measurable space, the definition of $\sigma (\mathscr{S})$ is rather abstract and its members don't have specific relation with $\mathscr{S}$. However, as we all know, when it comes to a topology  generated by a family ofsubsets, its members are clear, which is union of the subsets.
I don't know how to use the definition of $\sigma (\mathscr{S})$ to prove the claim. Any help would be appreciated.
 A: Let $\mathscr{F}$ be the collection $V\in \sigma(\mathscr{S})$ such that $f^{-1} (V) \in m$. Then it's clear that $\mathscr{F}$ is a $\sigma$-algebra that contains $\mathscr{S}$ and thus $\sigma(\mathscr{S}) \subseteq \mathscr{F}$. Hence, $f$ is measurable
A: If $f$ is measurable  and  $S \in \mathcal S$ then it is obvious that $f^{-1}(S) \in m$. For the converse let $\mathcal G=\{B \in \sigma(\mathcal S): f^{-1}(B) \in m\}$. A simple verification shows that this is a sigma algbera. If $f^{-1}(S) \in m$ for all $S \in \mathcal S$ then  $ \mathcal S \subset \mathcal G$ and hence $ \sigma(\mathcal S) \subset \mathcal G$. This proves that $f$ is measurable. 
A: Let $X,Y$ be sets, let $f:X\to Y$ be a function and let $\mathscr S$ be a subcollection of powerset $\wp(Y)$.

A very nice general truth (put it in your math-luggage!) in this context is the following:$$f^{-1}(\sigma(\mathscr S))=\sigma(f^{-1}(\mathscr S))\tag1$$
This can be applied immediately: if $f^{-1}(\mathscr S)\subseteq m$ where $m\subseteq\wp(X)$ is a $\sigma$-algebra then we are allowed to conclude that: $$\sigma(f^{-1}(\mathscr S))\subseteq m$$
which according to $(1)$ is exactly the same as: $$f^{-1}(\sigma(\mathscr S))\subseteq m$$
For a proof of $(1)$ see this answer.
