If for all , then f is constant.

Suppose f is not constant. Then there exists an a,b such that , or for some . Choose a positive integer n such that . Define x,y such that and

Now, by construction, , for the last term of the summation. Now we have two cases:

Case 1: so f does not meet the hypothesis for the choice n,x,y as prescribed.

Case 2: or, the terms for counterbalanced to put the whole sum back under 1.

More rigorously, . WLOG, suppose . Then . So f does not meet the hypothesis for the choice n-1,x,y as prescribed.

Ergo, by contrapositive, the theorem is true.