In the book Elementary Introduction to the Lebesgue Integral by Steven Krantz, the author considers two simple functions $\varphi$ and $\psi$ and says that the sum of these two functions has the representation given in equation $(3.3.4)$. I think that in the second term on the RHS of $(3.3.4)$ (respectively third) there is no the sum $\sum_{l=1}^{m}$ (respectively $\sum_{j=1}^{k}$).
$\def\phi{\varphi}$ Suppose now that $$\phi = \sum_{j=1}^k a_j\cdot \chi E_j \qquad \text{and} \qquad \psi = \sum_{\ell=1}^mb_\ell\cdot \chi F_\ell$$ with the $E_j$ pairwise disjoint and the $F_j$ pairwise disjoint. Then $\phi+\psi$ has the representation: $$\scriptsize{\phi+\psi = \sum_{j=1}^k\sum_{\ell=1}^m(a_j+b_\ell)\cdot\chi_{ E_j\cap F_\ell} + \sum_{j=1}^k a_j\cdot \chi_{ E_j\setminus(F_1\cup\dots\cup F_m)}+ \sum_{\ell=1}^m} b_\ell\cdot\chi_{ F_\ell\setminus(E_1\cup\dots\cup E_k)} \tag{3.3.4}$$ This last representation for $\phi+\psi$ is a bit confusing since different occurences of $a_j+b_\ell$ may be equal (so that (3.3.4) is not necessarily the standard representation of simple function given the original definition). Let $c_p$, $p=1,2,\dots,r$ be the distinct numbers in the collection $\{a_j+b_\ell : j=1,\dots,k ; \ell=1,\dots,m\}$. Let $H_p$ be the union of all those seys $E_j\cap F_\ell\neq \emptyset$ so that $a_j+b_\ell=c_p$. Then $$p(H_p) = \sum_{(p)} \mu(E_j\cap F_\ell).$$
My question: I would like to know how to prove that this representation is valid.
I started to separate in cases, but I couldn't find an elegant way to write all the cases.
The reason you can write the sum in the form of $(3.3.4)$ is basic set theory in disguise. The function $\varphi + \psi$ is supported on $(\cup_j E_j) \cup (\cup_l F_l)$ since the individual pieces are supported on $\cup_j E_j$ and $\cup_l F_l$, respectively. We do not know anything about these sets, so to capture the full behavior, there are cases to consider. We know in general that for any two sets $A$ and $B$, $A = (A\cap B) \cup (A\setminus B)$ (check this via element memberships if you're not sure). Thus
$$\varphi = \sum_{j=1}^k a_j \chi_{E_j} = \sum_{j=1}^k a_j \chi_{(E_j \cap F_l) \cup (E_j \setminus F_l)}.$$
The indicator function of the union of two distinct sets (which $A\cap B$ and $A\setminus B$ are for any sets $A$ and $B$) is the sum of the indicator functions on the component pieces, i.e. $\chi_{(A\cap B)\cup(A\setminus B)} = \chi_{A \cap B} + \chi_{A\setminus B}$. Thus
$$\varphi = \sum_{j=1}^k a_j \chi_{E_j \cap F_l} + \sum_{j=1}^k a_j \chi_{E_j\setminus F_l}.$$
Repeat this process for each $F_l$. Then do the same for $\psi$ and you'll recover each piece in $(3.3.4)$ after summing them all up and combining like terms.