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 #
Cslib.BitString.sum_powersetCard_monomial: the sum of ther-element monomials is the binomial coefficient of the number of true bits.Cslib.BitString.sum_powersetCard_monomial_mem_lowDegree: it has degree at mostr.