deepdream of
          a sidewalk
Show Question
Math and science::Analysis::Tao::07. Series

Fubini's theorem for finite series

Let X and Y be finite sets, and let f:X×YR be a function. Then
xX(yYf(x,y))=(x,y)X×Yf(x,y)=(y,x)Y×Xf(x,y)=yY(xXf(x,y))

The proof isn't too involved. Most of the work is done by the lemma:

Lemma

Let X and Y be finite sets, and let f:X×YR be a function. Then
xX(yYf(x,y))=(x,y)X×Yf(x,y)
Proof

Let n be the number of elements in X. We will induce on n. Let P(n) be the assertion that the lemma is true for any set X with n elements, and any finite set Y and any function f:X×YR. We wish to prove that P(n) is true for all natural numbers n.

The base case, P(0), is easy; it follows from the proposition that the sum over an empty set is zero.

Now suppose that P(k) is true for some kN; we consider P(k+1).

Let X be a set with k+1 elements. Write X as X=X{x0}, where x0 is an element of X. Using the 5th of the 9 propositions on sums over finite sets:

xX(yYf(x,y))=(xX(yYf(x,y)))+(yYf(x0,y))By the induction hypothesis:=(x,y)X×Yf(x,y)+(yYf(x0,y))By the substitution proposition for sums over finite sets:=(x,y)X×Yf(x,y)+((x,y){x0}×Yf(x,y))by the proposition of sums over disjoint finite sets:=(x,y)X×Yf(x,y)

Proving Fubini's theorem

The above lemma means we already know that both:

xX(yYf(x,y))=(x,y)X×Yf(x,y)

and

yY(xXf(x,y))=(y,x)Y×Xf(x,y)

So it suffices to show that:

(x,y)X×Yf(x,y)=(y,x)Y×Xf(x,y)

But this follows from the substitution proposition for sums over finite sets by choosing the bijection h:X×YY×X defined by h(x,y)=(y,x).