Documentation

CslibFrontier.Foundations.BooleanAnalysis.IncidenceExpansion

Expanding a product of local functions on the cube by incidences #

Let every factor g i of a product of functions on the cube ι → Bool depend only on the coordinates in a scope I i. Expand each factor in the monomials of its scope, with the subset Möbius transform c i = subsetMobius (T ↦ g i 1_T) as coefficients. Summing the product over the cube then gives a sum over the choices of one set S i ⊆ I i for every factor (Cslib.BitString.sum_prod_eq_incidenceSum): $$\sum_x \prod_i g_i(x) = \sum_{S_i \subseteq I_i} \Big(\prod_i c_i(S_i)\Big) \prod_v \begin{cases} 1 & v \in \bigcup_i S_i \\ 2 & \text{otherwise.} \end{cases}$$ The weight (Cslib.BitString.incidenceWeight) is the cube sum of the monomial of the union: a coordinate in some S i must be 1, and any other coordinate is free.

A choice (S i)_i is a set of incidences (i, v) with v ∈ S i ⊆ I i. The incidence sum (Cslib.BitString.incidenceSum) adds only the choices with at most K incidences. This is the monomial expansion of the incidence polynomial in the proof of Lemma D.2 of [OAI26k] (pp. 54–56). There, test i has incidence indeterminates z_{iv}, v ∈ I_i. The coefficient of the monomial z_{i,S} in the multilinear factor B̄_i is the subset inversion ∑_{T ⊆ S} (-1) ^ (|S| - |T|) B_i(1_T, V), which is c i S. The variable-group entry 2 ^ |{v : b_v = 0}| is a factor of the weight.

When the coefficients are polynomials whose V ^ j coefficient vanishes on sets of more than k (1 + 2 j) elements, a product of a of them has a nonzero V ^ t coefficient only on choices with at most k (a + 2 t) incidences (Polynomial.coeff_prod_eq_zero_of_lt). So below V ^ ℓ the incidence sum does not change once K ≥ k (a + 2 (ℓ - 1)) (Cslib.BitString.coeff_incidenceSum_eq_of_le). This is the degree bound (D.1) on p. 55.

Main definitions #

Main results #

References #

The incidence sum #

def Cslib.BitString.incidenceWeight {ι : Type u_1} {κ : Type u_2} {R : Type u_3} [CommRing R] [Fintype ι] [Fintype κ] [DecidableEq ι] (S : κ → Finset ι) :
R

The weight of a choice of incidences (S i)_i: the product over the coordinates of 1 for a coordinate in some S i and 2 for any other. It is the sum over the cube of the monomial of ⋃ i, S i (Cslib.BitString.sum_ite_forall_eq_incidenceWeight).

def Cslib.BitString.incidenceSum {ι : Type u_1} {κ : Type u_2} {R : Type u_3} [CommRing R] [Fintype ι] [Fintype κ] [DecidableEq ι] [DecidableEq κ] (I : κ → Finset ι) (c : κ → Finset ι → R) (K : ℕ) :
R

The incidence sum of coefficients c i S for scopes I i, up to K incidences: the sum over the choices of S i ⊆ I i for every i with ∑ i, #(S i) ≤ K of (∏ i, c i (S i)) * incidenceWeight S.

theorem Cslib.BitString.map_incidenceWeight {ι : Type u_1} {κ : Type u_2} {R : Type u_3} [CommRing R] [Fintype ι] [Fintype κ] [DecidableEq ι] {R' : Type u_4} [CommRing R'] (φ : R →+* R') (S : κ → Finset ι) :

A ring homomorphism fixes the weight of a choice of incidences.

theorem Cslib.BitString.map_incidenceSum {ι : Type u_1} {κ : Type u_2} {R : Type u_3} [CommRing R] [Fintype ι] [Fintype κ] [DecidableEq ι] [DecidableEq κ] {R' : Type u_4} [CommRing R'] (φ : R →+* R') (I : κ → Finset ι) (c : κ → Finset ι → R) (K : ℕ) :
φ (incidenceSum I c K) = incidenceSum I (fun (i : κ) (S : Finset ι) => φ (c i S)) K

Ring homomorphisms commute with the incidence sum.

theorem Cslib.BitString.sum_ite_forall_eq_incidenceWeight {ι : Type u_1} {κ : Type u_2} {R : Type u_3} [CommRing R] [Fintype ι] [Fintype κ] [DecidableEq ι] (S : κ → Finset ι) :
(∑ x : ι → Bool, if ∀ (i : κ), ∀ v ∈ S i, x v = true then 1 else 0) = incidenceWeight S

The weight is a cube sum: summing over the cube the indicator that every chosen set lies in the support gives the weight of the choice.

The expansion #

theorem Cslib.BitString.sum_prod_eq_incidenceSum {ι : Type u_1} {κ : Type u_2} {R : Type u_3} [CommRing R] [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] (I : κ → Finset ι) (g : κ → (ι → Bool) → R) (hg : ∀ (i : κ) (x y : ι → Bool), (∀ v ∈ I i, x v = y v) → g i x = g i y) {K : ℕ} (hK : ∑ i : κ, (I i).card ≤ K) :
∑ x : ι → Bool, ∏ i : κ, g i x = incidenceSum I (fun (i : κ) => subsetMobius fun (T : Finset ι) => g i fun (v : ι) => decide (v ∈ T)) K

The incidence expansion of a cube sum. If every g i depends only on the coordinates in I i, the sum over the cube of ∏ i, g i x is the incidence sum of the subset Möbius transforms T ↦ g i 1_T, for every K at least the total size of the scopes.

Truncation below V ^ ℓ #

theorem Cslib.BitString.coeff_incidenceTerm_eq_zero {ι : Type u_1} {κ : Type u_2} {A : Type u_4} [CommRing A] [Fintype ι] [DecidableEq ι] [Fintype κ] (c : κ → Finset ι → Polynomial A) {k t : ℕ} (hc : ∀ (i : κ) (S : Finset ι) (j : ℕ), k * (1 + 2 * j) < S.card → (c i S).coeff j = 0) {S : κ → Finset ι} (hS : k * (Fintype.card κ + 2 * t) < ∑ i : κ, (S i).card) :
((∏ i : κ, c i (S i)) * incidenceWeight S).coeff t = 0

A choice with too many incidences has no low coefficient. If the V ^ j coefficient of every c i S vanishes on sets of more than k (1 + 2 j) elements, then the term of a choice with more than k (#κ + 2 t) incidences has zero V ^ t coefficient.

theorem Cslib.BitString.coeff_incidenceSum_eq_of_le {ι : Type u_1} {κ : Type u_2} {A : Type u_4} [CommRing A] [Fintype ι] [DecidableEq ι] [Fintype κ] [DecidableEq κ] (I : κ → Finset ι) (c : κ → Finset ι → Polynomial A) {k ℓ K K' : ℕ} (hc : ∀ (i : κ) (S : Finset ι) (j : ℕ), k * (1 + 2 * j) < S.card → (c i S).coeff j = 0) (hK : k * (Fintype.card κ + 2 * (ℓ - 1)) ≤ K) (hKK' : K ≤ K') {t : ℕ} (ht : t < ℓ) :
(incidenceSum I c K').coeff t = (incidenceSum I c K).coeff t

Truncating the incidence sum below V ^ ℓ. If the V ^ j coefficient of every c i S vanishes on sets of more than k (1 + 2 j) elements, then below V ^ ℓ the incidence sum up to K' incidences equals that up to K, for k (#κ + 2 (ℓ - 1)) ≤ K ≤ K'.