Documentation

Complexity.Computability.Circuit.Monotone.Formula

Monotone formulas #

A monotone formula is a formula over the monotone basis, Formula Monotone.signature n, evaluated under Monotone.interpretation: a tree of AND and OR gates of fan-in two whose leaves are inputs and Boolean constants (Monotone.const, Monotone.and, Monotone.or). Every function it computes is monotone (monotone_eval), and every monotone function has one: the disjunction, over the inputs z where the function is true, of the conjunction of the bits that are one in z (exists_computes_of_monotone). Unlike De Morgan formulas, monotone formulas thus compute only some Boolean functions, so the least depth of a monotone formula for f is extended-valued: eformulaDepth f, the least depth with constants free (Formula.minDepthWith for binaryCost), is ⊤ when no monotone formula computes f, that is, when f is not monotone (eformulaDepth_ne_top_iff). A monotone formula is a De Morgan formula (Formula.mapOp along toDeMorgan), so the De Morgan formula depth is at most the monotone one (formulaDepth_le_eformulaDepth).

Main definitions #

Main results #

References #

Constructors #

The constant monotone formula.

Instances For

    The conjunction of two monotone formulas.

    Instances For

      The disjunction of two monotone formulas.

      Instances For
        @[simp]
        theorem Cslib.Circuits.Monotone.depthWith_const {n : ℕ} (cost : Op → ℕ) (b : Bool) :
        Formula.depthWith cost (const b) = cost (Op.const b)
        @[simp]
        theorem Cslib.Circuits.Monotone.depthWith_and {n : ℕ} (F G : Formula signature n) (cost : Op → ℕ) :
        @[simp]
        theorem Cslib.Circuits.Monotone.depthWith_or {n : ℕ} (F G : Formula signature n) (cost : Op → ℕ) :

        Monotone functions #

        Monotone formulas compute monotone functions.

        Every monotone function has a monotone formula: the disjunction, over the inputs z where it is true, of the conjunction of the bits that are one in z.

        A Boolean function has a monotone formula exactly when it is monotone.

        Depth #

        @[reducible, inline]

        The least depth of a monotone formula computing f, with constants free, or ⊤ if no monotone formula computes f: the least depth with costs binaryCost (Formula.minDepthWith), whose API applies to it.

        Instances For

          The monotone formula depth of a function is finite exactly when the function is monotone.

          A monotone formula is a De Morgan formula of the same depth, so De Morgan formulas are at most as deep as monotone ones.