simple function
A simple function is the measure-theoretic analogue of a staircase: it takes only finitely many distinct values, and on each constant piece it sits over a measurable set. Picture a function whose graph is a few flat plateaus at different heights, the floor under each plateau being a measurable set. Simple functions are deliberately the easiest functions to integrate.
Precisely, a measurable function s on a measure space is simple if its range is a finite set of values c_1, ..., c_n, attained on measurable sets E_1, ..., E_n that partition the space. The standard representation writes s = sum over k of c_k times the characteristic function of E_k. The integral of such a simple function (when the c_k are non-negative) is simply sum over k of c_k times mu(E_k) — a finite weighted sum of measures, with no limiting process at all.
Simple functions are the building blocks of the entire Lebesgue integral. The pivotal approximation theorem states that every non-negative measurable function is the pointwise limit of an increasing sequence of non-negative simple functions; one then defines the integral of a general function as the supremum of the integrals of the simple functions below it. So although simple functions look almost trivial, they are precisely the elementary pieces from which the powerful theory is assembled.
On [0, 3], define s(x) = 2 for x in [0, 1), s(x) = 5 for x in [1, 2), s(x) = 0 for x in [2, 3]. Then s is simple, and its integral is 2 times 1 + 5 times 1 + 0 times 1 = 7, just a weighted sum of the lengths.
Finitely many heights over measurable floors; the integral is a finite sum.
Beware a clash of names: a simple function need not be a step function in the elementary sense. A step function is constant on intervals; a simple function is constant on measurable sets, which can be far more intricate — for instance the characteristic function of the rationals is simple but not a step function.