Documentation

CslibFrontier.Foundations.BooleanAnalysis.OrDegree

The degree of OR over a ring #

A polynomial p over a nontrivial commutative ring R, multilinear or not, that agrees with OR on the cube {0, 1}ⁿ has total degree at least n (card_le_totalDegree_of_eval_eq_or). If its degree D were smaller, its values on the cube would lie in the span of the monomials of at most D coordinates (lowDegree_eq_map_restrictTotalDegree), so their subset Möbius transform would vanish on the set of all coordinates (subsetMobius_eq_zero_of_mem_lowDegree). For OR that transform is -(-1)ⁿ ≠ 0: OR = 1 - [x = 0], the constant contributes nothing at a nonempty set, and the indicator of the zero point contributes (-1)ⁿ. The bound is attained by 1 - ∏ᵢ (1 - xᵢ) (orPoly, totalDegree_orPoly).

Over GF(q) = ZMod q, q prime, this is Exercise 6 of Chapter 13 of Arora and Barak, draft of 2007-01-08 (le_totalDegree_of_eval_eq_or_zmod). The proof uses no property of the ring beyond 0 ≠ 1.

Main definitions #

Main results #

References #

theorem Cslib.BitString.card_le_totalDegree_of_eval_eq_or {ι : Type u_1} {R : Type u_2} [Fintype ι] [CommRing R] [Nontrivial R] {p : MvPolynomial ι R} (hp : ∀ (x : ι → Bool), (MvPolynomial.eval (bitPoint x)) p = bitVal R (decide (∃ (i : ι), x i = true))) :

OR has degree n on the cube [AroraBarak07, Chapter 13, Exercise 6]: over a nontrivial commutative ring, every polynomial, multilinear or not, that agrees with OR on {0, 1}ⁿ has total degree at least n.

noncomputable def Cslib.BitString.orPoly (ι : Type u_1) (R : Type u_2) [Fintype ι] [CommRing R] :

The polynomial 1 - ∏ᵢ (1 - Xᵢ), which computes OR on the cube.

theorem Cslib.BitString.eval_orPoly {ι : Type u_1} {R : Type u_2} [Fintype ι] [CommRing R] (x : ι → Bool) :
(MvPolynomial.eval (bitPoint x)) (orPoly ι R) = bitVal R (decide (∃ (i : ι), x i = true))

1 - ∏ᵢ (1 - Xᵢ) agrees with OR on the cube.

1 - ∏ᵢ (1 - Xᵢ) has total degree at most the number of variables.

The bound is attained: over a nontrivial commutative ring, 1 - ∏ᵢ (1 - Xᵢ) has total degree exactly the number of variables.

theorem Cslib.BitString.le_totalDegree_of_eval_eq_or_zmod {q n : ℕ} [Fact (Nat.Prime q)] {p : MvPolynomial (Fin n) (ZMod q)} (hp : ∀ (x : Fin n → Bool), (MvPolynomial.eval (bitPoint x)) p = bitVal (ZMod q) (decide (∃ (i : Fin n), x i = true))) :

OR over GF(q) [AroraBarak07, Chapter 13, Exercise 6]: for a prime q, every polynomial over ZMod q in n variables, not necessarily multilinear, that agrees with OR on {0, 1}ⁿ has total degree at least n; orPoly attains n (totalDegree_orPoly).