I am reading lecture notes on Measure theory and Integration and I ran into the following definition and lemma which confuses me a lot.
Definition 1: Let $(X,\mathcal{M},\mu)$ be a $\sigma$-finite measure space. Let $f:X\to \mathbb{R}$ be a measurable function which takes on only finitely many values and any non-zero value is achieved on the set of finite measure. Then function $f(x)$ is called simple.
Definition 1': The function $f(x)$ is simple, if $$f(x)=\sum \limits_{k=1}^{n}c_k\chi_{E_k}(x),$$ where $E_k\in \mathcal{M}$, $E_k\cap E_j=\varnothing$ for $k\neq j$ and $\mu(E_k)<\infty$ for $c_k\neq 0$.
Remark: We note that any simple function can be written in the form $$f(x)=\sum \limits_{i=1}^{m}a_i\chi_{F_i}(x)$$ $a_1<a_2<\dots<a_m$ and $\sqcup_{i=1}^{m}F_i=X$. This is called canonical representation of simple function.
Definition 2: Let $f:X\to \mathbb{R}$ is a simple function and $$f(x)=\sum \limits_{i=1}^{m}a_i\chi_{F_i}(x)$$ is the canonical representation of $f(x)$. In this case we define Lebesgue integral of simple function $f(x)$ as follows: $$(L)\int \limits_{X}f(x)d\mu=\int \limits_{X}f(x)d\mu:=\sum \limits_{i=1}^{m}a_i\mu(F_i) \qquad \qquad(*)$$ (here we formally assume that $0\times \infty=0$).
Lemma 1(unchanged). The value of Lebesgue integral of simple function $f(x)$ does not depend on representation of $f(x)$ in the form $(*)$.