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 #
Cslib.Circuits.Boolean.FormalComplexityMeasure: the source's measure axioms.Cslib.Circuits.Formula.IsConstantFree: De Morgan formulas without nullary constants.
Main results #
Cslib.Circuits.Boolean.FormalComplexityMeasure.le_leafSize: the formula lower bound.Cslib.Circuits.Boolean.FormalComplexityMeasure.card_le_four_mul_card: at least a quarter of all Boolean functions have measure at least one quarter of a given function's measure.
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.
- measure : BooleanFunction n → ℕ
The measure of a Boolean function.
Positive literals have measure at most one.
Negative literals have measure at most one.
- and_le (f g : BooleanFunction n) : (self.measure fun (x : BitString n) => f x && g x) ≤ self.measure f + self.measure g
Conjunction is subadditive.
- or_le (f g : BooleanFunction n) : (self.measure fun (x : BitString n) => f x || g x) ≤ self.measure f + self.measure g
Disjunction is subadditive.
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.
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.