A standard technique for proving facts about integrals is to argue through each stage of the integral's definition. For example:
Let $(\Omega, \mathcal{F}, \mu)$ be a measure space. Suppose one wants to prove that the integral is linear. That is, for measurable $f$ and $g$, and $\alpha, \beta \in \mathbb{R}$ we have
$$\int (\alpha f + \beta g) d\mu = \alpha \int f d \mu + \beta \int g d\mu.$$
One first considers the case in which $f$ and $g$ are indicator functions. One then considers simple $f$ and $g$ and uses the integral's linearity. One then considers $f,g \geq 0$, approximates by simple functions and uses the monotone convergence theorem. And, finally, one proves the general case by decomposing $f$ and $g$ into positive and negative parts.
This sort of argument is so ubiquitous that David Williams, in his book Probability with Martingales, refers to it as the "standard machine". (It is used in the proofs of many other classical results. Two that come to mind now are the change of variable theorem and Fubini's theorem.)
Question: Is there a general theorem that one can appeal to instead of making the standard machine argument again and again?
(If so, and this is not a mathematical question so much as a sociological one, why do textbooks prefer to repeat the standard machine argument instead of appealing to the general theorem?)
I believe I can partially explain why the argument works. For example, the collection of measurable functions is exactly the set of simple functions, closed under pointwise limits; the simple functions are dense in $L^{p}$ space; etc. But, still, it would be nice to have a theorem that covers all (or most) cases in which one is tempted to argue with the standard machine, and I don't know of one.
It is a nice question.
Let us explore the answer in more detail. A good way to do it is by trying to have a "standard machine" theorem to replace the usage of the "standard machine" argument.
Consider the following "standard machine" theorem:
This theorem is correct and it can be proved in a standard way (using the "standard machine" argument).
BUT, it is NOT as useful as it may seem at a first sight. To understand this point, consider, for instance, proving that the integral is linear. The theorem does not apply because the integral is not defined on the set of all measurable functions (consider, in the Real line Lebesgue measurable space, the function $f= -1\chi_{(-\infty,0)}+ 1\chi_{[0,\infty)}$).
What went wrong? When we apply the "standard machine" argument to prove that the integral is linear, the conclusion we get is the the integral is linear on the set of measurable functions with finite integrals. So we restrict ourselves to a certain class of measurable functions, namely those of finite integrals. This restriction of having finite integral makes the proof work.
Of course, the class of measurable functions to which we need to restrict the "standard machine" argument depends on what we want to prove. It may be the class of measurable functions "having finite integral" or "being finite a.e." or "being bounded" or etc...
Now we face two paths: either we have maybe six or seven slightly different versions of the "standard machine" theorem or we write a version "restricted" to a generic class $C$ of measurable functions. Let us try the second path.
Now, we can use this "theorem" to prove the linearity of the integral. Let $C$ be the set of measurable functions with finite integral and let $S$ be a maximal subset of $C$ such that the integral is linear on $S$. We prove that $S$ satisfies conditions 1 to 4 and we get the conclusion $S=C$, which means that the integral is linear on $C$.
Unfortunately, "Theorem 2" is not a theorem, it is not true. Consider the Real line Lebesgue measurable space. Let $C$ to be the set of measurable functions which are either linear or has the form $\alpha\chi_{[0,1]}$ (where $\alpha \in \mathbb{R}$). Let $S$ be the set measurable functions of the form $\alpha\chi_{[0,1]}$ (where $\alpha \in \mathbb{R}$). We have that $S\subseteq C$ and the four conditions hold but it is not true that $S=C$.
We clearly that the issue in "Theorem 2" is that there was no condition imposed on class $C$. "Theorem 2" was too general to be true. If we want to correct it we need now to find the adequate restrictions that need to be imposed. Those restriction should be enough weak to preserve results like theorem 1 and other cases where we correctly apply the "standard machine" argument, but must also be enough strong to rule out the pathological counterexample (as the one just presented above).
Anyway, the final result will be a theorem more complex to use than the "standard machine" argument, because in the theorem you would first have to define $C$ and $S$, prove the $C$ satisfies the restrictions, and prove that $S$ satisfies the 4 conditions. Then, you could evoke the theorem to get the result.
Conclusion: The "standard machine" argument is a schema of proof with several small variations on the conditions. Capturing all those variations would result either in several theorems or having to define a complex condition to cover all the variations where we use to apply the the "standard machine" argument.
That is why in the books the authors prefer to have the "standard machine" argument as a proof schema and not capture it as general theorem.