There is an exercise that I faced in the context of a measure theory and integration course for which I might have a solution, yet I am not entirly sure it's the right one.
Let $B := \{ (0,\infty), (-1,1), (-\frac{1}{2}, \frac{1}{2}), (-\frac{1}{3}, \frac{1}{3}), ... \}$ and let $\mathfrak{A}$ be the $\sigma$-algebra generated by the set $B$.
Now, in the first part I have to decide whether the interval $(-\infty, 0)$ belongs to $\mathfrak{A}$. I would affirm that since $(0, \infty) \in \mathfrak{A}$ and thus, by definition of a $\sigma$-algebra, its complement as well. Is that right?
In the second (and more challenging) part I have to explain whether or not the function $$ f: \mathbb{R} \to \mathbb{R},\, f(x) = \left\{\begin{array}{ll} 1, & \text{falls}\, x > 0 \\ 0, & \text{falls}\, x = 0 \\ -1, & \text{falls}\, x < 0 \end{array}\right. $$
is measurable with respect to $\mathfrak{A}$. The first thing that I don't understand: Is $\mathfrak{A}$ the $\sigma$-algebra for both preimage and image space? Or does it have to be? There is no more information given than the one I gave above.
According to the definition of measurable functions, the preimage $f^{-1}(A) \in \mathfrak{A}$ for every set A in the $\sigma$-algebra of the image space. In case the answer to the first question above is positive, i.e. $\mathfrak{A}$ is also the $\sigma$-algebra of the image space, then I have only to examine whether $f^{-1}(1)$,$f^{-1}(-1)$ and $f^{-1}(0)$ lies in $\mathfrak{A}$. But this is the case for 0 since it is the countably union of a sets in $\mathfrak{A}$ and similarly for -1 and 1. Is that right?