I am learning about pre-images (inverse image) of functions and have come across the following proposition:
Suppose that $f : X \to Y $ is a map, $B \subseteq Y$ and for some indexing set $I$ there is a family $\{A_{i}: i \in I\}$ of subsets of $X$ with $X = \cup_I A_{i}$. Then \begin{equation} f^{-1}(B) = \bigcup_I(f|A_{i})^{-1}B. \end{equation}
What does $(f|A_{i})^{-1}(B)$ mean?
$f\mid A_i$, or also $f\mid_{A_i}$, represents the function $f$ restricted to $A_i$ in its domain, i.e. $f\mid_{A_i}:A_i\to Y$ where
$$f\mid_{A_i}(x)=f(x)\text{ for any }x\in A_i$$
So, $(f\mid_{A_i})^{-1}(B)$ for some $B\subseteq Y$ is the preimage of $B$ under this function $f\mid_{A_i}$, i.e.
$$(f\mid_{A_i})^{-1}(B)=\{x\in A_i\mid f\mid_{A_i}(x)\in B\}=\{x\in A_i\mid f(x)\in B\}$$
where the last equality follows as $f\mid_{A_i}$ is only the restriction of $f$.