I am trying to go through some proofs and exercises about measure theory.
In particular, I have the following exercise to solve:
Let $f: \mathbb{R} \to \mathbb{R}$ be given by $f(x) = \min\{|x|, 1\}$. Show that the inverse image of an arbitrary Borel set $B \in \mathbb{R}$ is given by: $$ f^{-1}(B) = \begin{cases} \{x: |x| \in B \cap [0,1)\} & \text{if $1 \notin B$}\\ \{x: |x| \in B \cap [0,1)\} \cup \{1\} & \text{if $1 \in B$}. \end{cases} \tag{1}\label{eq:1} $$
To show that Eq. $\eqref{eq:1}$ holds, we need to prove that the r.h.s. matches with $f^{-1}(B) = \{x: \min\{|x|,1 \} \in B\}$ (from the definition of inverse image).
This entails that $f^{-1}(B) = \{x: \{|x| \in B\}\text{ or }\{1 \in B\}\}$.
However, I am struggling showing that.
Can someone give me some help here?