Let $[E,\mathcal{E}]$ be a measurable space and let $f:\Omega\rightarrow E$. Show that $f$ is $[\sigma(f),\mathcal{E}]$-measurable. In particular, when $E=\mathbb{R}, f$ is a random variable on $[\Omega,\sigma(f)]$. Describe the $\sigma$-algebra generated by $f$ taking the two values $0$ and $1$.
Let's begin by looking at the definition of measurability of functions.
Definition: Let $(X,\mathcal{A})$ and $(Y,\mathcal{B})$ be measurable spaces. A function $f:X\rightarrow Y$ is masurable if $f^{-1}(B)\in\mathcal{A}$ for every $B\in\mathcal{B}$.
So I know now what measurable function is, but what is a $[\sigma(f),\mathcal{E]}$-measurable function? I have previously shown that the inverse images of $\sigma{f}=\{f^{-1}(B):B\in\mathcal{E}\}$ is a $\sigma$-algebra but I don't see how to proceed here.