Documentation

CslibFrontier.Computability.Circuit.Boolean.FormalComplexityMeasure

Formal complexity measures #

A FormalComplexityMeasure bounds literals by one and is subadditive under conjunction and disjunction. Complement invariance is not assumed. The formula lower bound applies to Formula.IsConstantFree: nullary constants have zero input-leaf cost in the library, whereas the source axioms do not force their measure to vanish.

The source is Arora–Barak, web draft 2007-01-08, §22.1, printed pp. 437–438, PDF pp. 453–454. le_leafSize is Theorem 22.1 for constant-free De Morgan formulas, allowing negations anywhere. card_le_four_mul_card is Lemma 22.2, with all Boolean functions on a fixed number of inputs and integer inequalities clearing both denominators. The stronger near-total-density statement of Theorem 22.3 is not included.

Main definitions #

Main results #

A De Morgan formula contains no constant gates. Negation is permitted anywhere.

A nonnegative integer measure on truth tables satisfying the literal and subadditivity axioms of Arora–Barak, draft §22.1. No complement-invariance axiom is imposed.

Both polarities of a constant-free formula are bounded by its input-leaf count.

Arora–Barak, draft Theorem 22.1: a formal complexity measure lower-bounds the leaf size of a constant-free formula computing the function.

theorem Cslib.Circuits.Boolean.FormalComplexityMeasure.le_four_terms {n : ℕ} (μ : FormalComplexityMeasure n) (f g : BooleanFunction n) :
μ.measure f ≤ ((μ.measure g + μ.measure fun (x : BitString n) => !g x) + μ.measure fun (x : BitString n) => f x ^^ g x) + μ.measure fun (x : BitString n) => !(f x ^^ g x)

Decomposing a function as an exclusive or gives a four-term measure bound.

Arora–Barak, draft Lemma 22.2: if one function has measure at least c, at least a quarter of all truth tables have measure at least c / 4. The inequalities clear denominators, so no rounding or probability conventions are implicit.