Solution: Day 4, problem 2


Many proofs of this are known. A standard one proves the slightly stronger assertion with "integral" instead of "rational" by noting that the integral of e2πi(x+y)e^{2πi(x+y)} over each of the smaller rectangles into which RR is decomposed vanishes, so that the integral over RR also vanishes, from which the integrality of one of the sides follows immediately.

My own proof goes as follows.
Place RR into the first quadrant of R2\mathbb{R}^{2} with one vertex at the origin. Associate to each corner of one of any rectangle in the given decomposition an invariant ±1 or 0 as follows:
the value of the invariant is 0 unless both coordinates are rational numbers, in which case it is + if the corner is lower-left or upper-right and -1 in the opposite two cases.
The sum of the invariants in any small rectangle is zero (if the rectangle has a rational height, then the invariants of the two left corners have opposite values and so do those of the two right corners, and similarly if the width is rational), so the sum of all the invariants vanishes.
But the sum of the invariants at any interior or any edge point is also 0. Hence the sum of the invariants
of the four corners of RR must also vanish, so at least one corner other than (0,0) has rational coordinates.