Although is not a step function on J for the case stated above, it can be approximated by a sequence of step functions with right endpoints arbitrarily approching d. Based on this idea, We can construct a generating sequence so that with the same integral value. Let .
Generally speaking, if does not implies . But if a.e. on I, does hold. Suppose generates f on I, define as does the book, then generates f on I. On let's define (when n is sufficiently large. Set for small n's). Then we can verify the following one by one: is a step function on , increasing (because so is ), (ignore the possible first finite terms being 0), so a.e. on I'. In addition, which is bounded above, so exists. This proves with being the generating sequence.
Next, it is clear that if and , because we can define the value arbitarily at b for each member of the generating sequence of f on I' to get a generating sequence of f on I, without changing the value of integral of the step functions.
Let's return to the proof of the textbook. To ensure that is still a step function on J, the following condition must be met: if lies over J, that is, the (a,b) of the defining interval of intersects interior of J, then the endpoint of J lying in [a,b] must be closed. So we first assume the common endpoint of and (namely c) is closed for both and , then the proof works correctly and the theorem holds. But if is open at c, it may not true that is still a step function on . Now suppose is the same subinterval as except being closed at c (that is, ), then we already have . Since by hypothesis, from the above analysis we have too, and , hence we obtain , as required.