Function sums factor into product of sums
ProvedBookSixth.sum_func_prod_eq_prod_sumcombinatoricsprobabilistic-method
Sums over Boolean-valued functions factor as products of sums. For a finite type and ,
The proof is induction on the index set, splitting functions by their value at the new point. This is the Fubini step behind every independent-coordinate expectation computation, including the calculations. Formalization Note Lean states both sums over Finset.univ with explicit Finset.sum and Finset.prod.
Preamble
import Mathlib import Definitions.Def_BookSixthRandomGraph set_option autoImplicit false
Formal statement
theorem BookSixth.sum_func_prod_eq_prod_sum (A : Type) [DecidableEq A] [Fintype A]
(F : A -> Bool -> Real) :
Finset.sum Finset.univ (fun b : A -> Bool => Finset.prod Finset.univ (fun e => F e (b e)))
= Finset.prod Finset.univ (fun e => (F e true + F e false)) := by sorrySource
Fubini step for independent-coordinate expectations; cf. Alon--Spencer, The Probabilistic Method, Chapter 1