Documentation

Complexitylib.Circuits.Monotone

Monotone Boolean formulas #

MonotoneFormula N is a typed formula tree over N variables using only conjunction and disjunction. Its syntax makes monotonicity structural rather than a side condition on a formula with negations.

The public results prove exact compatibility with BoolFormula, semantic monotonicity, locality, and two elementary lower bounds: distinct variables and essential variables are both bounded by the number of formula leaves.

theorem Complexity.MonotoneFormula.eval_toBoolFormula {N : } (formula : MonotoneFormula N) (input : BitString N) :
BoolFormula.eval input.toTotal formula.toBoolFormula = eval input formula

Erasing finite-index proofs preserves evaluation.

Erasing finite-index proofs preserves total tree size.

Erasing finite-index proofs preserves the leaf count.

Erasing finite-index proofs preserves depth.

theorem Complexity.MonotoneFormula.eval_monotone {N : } (formula : MonotoneFormula N) :
IsMonotoneBoolFun fun (input : BitString N) => eval input formula

Every formula in the structurally monotone syntax computes a monotone Boolean function.

theorem Complexity.MonotoneFormula.eval_eq_of_agree {N : } (formula : MonotoneFormula N) {x y : BitString N} (agree : indexformula.vars, x index = y index) :
eval x formula = eval y formula

Evaluation depends only on variables that occur in the formula.

The number of distinct variables is at most the number of leaves.

A depth-d binary formula has at most 2 ^ d leaves.

theorem Complexity.MonotoneFormula.essentialInputs_subset_vars {N : } (formula : MonotoneFormula N) :
(essentialInputs fun (input : BitString N) (x : Fin 1) => eval input formula) formula.vars

Every essential input of the computed one-bit function occurs in the formula.

theorem Complexity.MonotoneFormula.card_essentialInputs_le_leaves {N : } (formula : MonotoneFormula N) :
(essentialInputs fun (input : BitString N) (x : Fin 1) => eval input formula).card formula.leaves

The number of essential inputs is at most the formula's leaf count.

theorem Complexity.MonotoneFormula.card_essentialInputs_le_leaves_of_computes {N : } (formula : MonotoneFormula N) (function : BitString NBool) (computes : formula.Computes function) :
(essentialInputs fun (input : BitString N) (x : Fin 1) => function input).card formula.leaves

A formula computing function needs at least one leaf per essential input of function.