Two different definitions of General Measurable Function I've noticed two different kinds of definitions for a Measurable Function.
In Folland's Real Analysis Modern Techniques:

If $(X, \mathcal {M})$ and $(Y, \mathcal {N})$ are measurable spaces, a mapping $f: X \to Y$ is called $(\mathcal {M}, \mathcal {N})$-measurable, or just measurable when $\mathcal {M}$ and $\mathcal {N}$ are understood, if $f^{-1}(E) \in \mathcal {M}$ for all $E \in \mathcal {N}$.

In Halmos' Measure Theory:

Suppose now that in addition to the set $X$ we are given also a $\sigma$-ring $\mathcal {S}$ of subsets of $X$ so that $(X, \mathcal {S})$ is a measurable space. For every real valued (and also for every extended real valued) function $f$ on $X$ we shall write $$N(f) = \{x: f(x) \ne 0 \};$$
  if a real valued function $f$ is such that, for every Borel subset $M$ of the real line the set $N(f) \cap f^{-1}(M)$ is measurable, then $f$ is called a measurable function.

I think both kinds of Measurable Function above are talking about a more general edition compared with Lebesgue measurable function. Basically, the difference between them two general measurable functions is whether singling $0$ out of codomain. Why does Halmos do such a removal? Or it is just a evolving process of measure theory from Halmos to Folland coz Folland's book comes out much later?
 A: Gyu Eun Lee is rigt in his comment. Halmos develops measure theory using σ-rings and Folland using σ-algebras.
Please note that if we limit ourselves to measurable spaces $(X,\mathcal S)$ where $\mathcal S$ is a $\sigma$-algebra, then a real (or extended real) valued function is measurable according to Halmos definition if and only if it measurable according to Foland's definition.
Why Halmos exclude the pre-image of $0$? Halmos does it because, if  $(X,\mathcal S)$ is a measurable space where $ \mathcal S$ is a $\sigma$ -ring  but not a   $\sigma$ -algebra then for any real valued function $f$ from $(X,\mathcal S)$, $f^{-1}(\mathbb{R})$ is not measurable. So, if the pre-image of $0$ were not excluded there would NOT be ANY measurable function from $(X,\mathcal S)$.
The key point is that Halmos develops the notion of measurable and integrable functions using $\sigma$-rings, which is a slightly broader approach than using only $\sigma$-algebras, but it makes necessary to deal with additional complexity.
Please also note that in Halmos $\S$39, Halmos defines measurable TRANSFORMATION in the same way as Folland (but always considering $\sigma$-rings) and explains the "inconsistence" between his definition of measurable function and  his definition of measurable transformation.
As I wrote to answer another question some time ago:
Measure Theory using $\sigma$-rings will lead to a more complex notion of measurable function, with some non-intuitive results.
Let $\Omega$ be a set and let $\Sigma$ be a $\sigma$-algebra. Let $f$ be a function from $\Omega$ to $\mathbb{R}$. We say that $f$ is measurable if for every Borel set $B$ in $\mathbb{R}$, $f^{-1}(B)\in \Sigma$.
Now, suppose that $\Sigma$ is a  $\sigma$-ring and we try to use the same definition. Then, since $\Omega=f^{-1}(\mathbb{R})$, either $\Sigma$ is a  $\sigma$-algebra or there will be no measurable function from $(\Omega,\Sigma)$.
So, when working with $\sigma$-rings, we need a slightly different definition (as we find in Halmos' book). We say that $f$ is measurable if for every Borel set $B$ in $\mathbb{R}$, $[f\neq 0]\cap f^{-1}(B)\in \Sigma$.
This second definition allows the existence of measurable functions even if $\Sigma$ is just a $\sigma$-ring and not a $\sigma$-algebra. However, it leads to a few non-intuitive results. For instance: assume $\Sigma$ is just a $\sigma$-ring and not a $\sigma$-algebra. Then any non-zero constant function is NOT mensurable. As a consequence, if $f$ is measurable, then it is easy to prove, for instance, that $f+1$ is NOT measurable.
So, the theory of measurable and integrable functions is more naturally developed by using $\sigma$-algebras, instead of just $\sigma$-rings.
