I want to show that if $(X, M,\mu)$ is a measure space, $A_1, \ldots, A_n, B_1, \ldots, B_n \in M$, $\alpha_1,\ldots, \alpha_n \in \mathbb{R}$,
$$f=\sum_{j=1}^n \alpha_j \chi_{A_j}, \ \ g=\sum_{j=1}^n \alpha_j \chi_{B_j} $$
and $f=g$ almost everywhere, then $\int f d\mu=\int g d\mu$.
Can you help me?. Thanks in advance.
Let $h=f-g$. Then $h =\sum_1 ^{n} \alpha_j \chi_{ C_j} $ where $C_j =A_j \Delta B_j$, the symmetric difference between $A_j$ and $B_j$. Assuming that $\alpha_j$ are distinct (which is what is usually done in defining integrals of simple function) we get $A_j =f^{-1} \{\alpha_j\}$ and $B_j =g^{-1} \{\alpha_j\}$ so $C_j \subset \{x ;f(x) \neq g(x)$. Hence $\mu (C_j)=0$ for each j which gives $\int h d\mu =0$ or $\int f d\mu =\int g d\mu$. The result is true even if $\alpha_j$'s are not distinct but the proof is messier.