The definition of simple function. Which definiton should I choose? I'm studying Lebesgue integral theory and I came across the concept of Simple function. And there are some definitions of simple function.
I wonder which definition of simple function I should recognize.
In this page https://en.wikipedia.org/wiki/Simple_function, it is said that $f$ is a simple function if
there exist a sequence of Lebesgue-measurable sets $\{ E_k \}_{k=1}^{N}$ and a sequence of real numbers $\{ a_k \}_{k=1}^N$ s.t.
\begin{align}
&\cdot f= \displaystyle\sum_{k=1}^N a_k \chi_{E_k} (x).  \\
&\cdot E_i \cap E_j =\phi \ \text{for }i\neq j.\\
\end{align}
But in my class, I learned the definition of simple function as below.
$f$ is a simple function $\iff$ There exist a sequence of Lebesgue-measurable sets $\{ E_k \}_{k=1}^{N}$ and a sequence of real numbers $\{ a_k \}_{k=1}^N$ s.t.
\begin{align}
&\cdot f= \displaystyle\sum_{k=1}^N a_k \chi_{E_k} (x). \\
&\cdot m(E_k)<\infty.
\end{align}
Moreover, according to another website,
$f: X \to \mathbb{R}$ is a simple function if there exist a sequence of Lebesgue-measurable sets $\{ E_k \}_{k=1}^{N}$ and a sequence of real numbers $\{ a_k \}_{k=1}^N$ s.t.
\begin{align}
&\cdot f= \displaystyle\sum_{k=1}^N a_k \chi_{E_k} (x). \\
&\cdot X=\bigcup_{k=1}^N E_k. \\
&\cdot E_i \cap E_j =\phi. \\
\end{align}
Is each definition correct or equivalent to each other? I wonder which definition I should choose.

The definitions are not equivalent in general. Definition 1 and 3 equivalently say that $f: X \to ℝ$ takes only finitely many values and is measurable. Definition 2 additionally demands that preimages of all values but $0$ have finite measure (which is trivial if $X$ has finite measure) – to ensure that it is integrable.
The extra condition also ensures that simple functions form an algebra (you can add, substract and multiply them, and also multiply them by a scalar). This together with the simple observation that every characteristic function of a set of finite measure is simple actually proves the equivalence of the definitions.
