I'm studying measure theory using the book "Introduction to Measure and Integration", from S.J. Taylor. There, in section 1.5 Classes of subsets, he defines a Semi-ring as: "A class $\mathcal{G}$ of subsets that
(i) $ \emptyset \in \mathcal{G} $
(ii) $ A, B \in \mathcal{G} \Rightarrow A\cap B \in \mathcal{G}$
(iii)$ A, B \in \mathcal{G} \Rightarrow A \setminus B = \cup_{i=1}^{n}E_{i}$, where the $E_{i}$ are disjoint sets in $\mathcal{G}$.
Now, in the exercises of that section, Exercise 10 (which contains various questions in it) asks to "Give an example of a mapping $f:X\to Y$ and a semi-ring $\mathcal{G}$ in $Y$ such that $f^{-1}(\mathcal{G})$ is not a semi-ring." Basically, that the pre-image of a semi-ring is not necessarily a semi-ring. Here $f^{-1}(\mathcal{G})$ denotes the class of subsets of $X$ of the form $f^{-1}(A), A \in \mathcal{G}$.
I am stuck trying to find think an example for this (basically $f$ and $\mathcal{G}$). Any help/hint is greatly appreciated.
You are likely having a difficult time with this exercise because it is not true.
Suppose $\mathcal{G}$ is indeed a semi-ring on $Y$. Recall that $f^{-1}(\mathcal{G}) = \{f^{-1}(U) \mid U \in \mathcal{G}\}$.
Now note that $\emptyset = f^{-1}(\emptyset)$ and that $\emptyset \in \mathcal{G}$. Therefore, $\emptyset \in f^{-1}(\mathcal{G})$.
Suppose $A, B \in f^{-1}(\mathcal{G})$. Write $A = f^{-1}(C)$ and $B = f^{-1}(D)$ for some $C, D \in \mathcal{G}$.
Then $A \cap B = f^{-1}(C \cap D)$ and $C \cap D \in \mathcal{G}$, so $A \cap B \in \mathcal{G}$.
And $A \setminus B = f^{-1}(C \setminus D) = f^{-1}(\bigcup\limits_{i = 1}^n E_i) = \bigcup\limits_{i = 1}^n f^{-1}(E_i)$. Note that each $f^{-1}(E_i)$ is in $f^{-1}(\mathcal{G})$.