Question:

Let be a rectangle in . Let . Consider the characteristic function of S on Q given by if , and otherwise. Prove that is integrable if and only if bd(S) has measure 0.

I don't see how this can be true. Take Q to be the unit interval [0,1], and let S be the set of irrationals in [0,1]. bd(S) is the set of rationals in [0,1], which has measure 0, but the integral of doesn't exist, because for any partition P the upper sum is 1 and the lower sum is 0. Am I correct in my thinking?