Documentation

CslibFrontier.Foundations.BooleanAnalysis.LowDegree.Choose

Binomial coefficients of the number of true bits #

The number of r-element sets of true positions is a sum of monomials: for s a finite set of positions, ∑_{S ⊆ s, #S = r} ∏_{i ∈ S} x_i = C(#{i ∈ s | x_i}, r) (Cslib.BitString.sum_powersetCard_monomial). It is a function of degree at most r (Cslib.BitString.sum_powersetCard_monomial_mem_lowDegree). Modulo a prime p, the case r = p ^ i reads the i-th base-p digit of the number of true bits (Nat.pow_dvd_iff_forall_dvd_choose), which is how MOD_m gates become polynomials of degree below m [BeigelTarui1994, Lemma 2.1].

Main results #

References #

theorem Cslib.BitString.sum_powersetCard_monomial {R : Type u_1} [CommRing R] {ι : Type u_2} (s : Finset ι) (r : ℕ) (x : ι → Bool) :
∑ S ∈ Finset.powersetCard r s, monomial R S x = ↑({i ∈ s | x i = true}.card.choose r)

The r-element monomials count the r-element sets of true bits. Over s, the sum of the monomials of the r-element subsets of s is C(#{i ∈ s | x i}, r).

theorem Cslib.BitString.sum_powersetCard_monomial_mem_lowDegree {R : Type u_1} [CommRing R] {ι : Type u_2} (s : Finset ι) (r : ℕ) :
(fun (x : ι → Bool) => ∑ S ∈ Finset.powersetCard r s, monomial R S x) ∈ lowDegree R ι r

The sum of the r-element monomials over s has degree at most r.