Documentation

ComplexityTheory.Foundations.BooleanFormula

Boolean formulas #

Tree syntax and semantics for Boolean formulas. Formula size counts tree nodes, so repeated subformulas are counted repeatedly rather than shared as in a Boolean circuit.

@[reducible, inline]

A total assignment maps every natural-number variable index to a truth value. It is the environment in which Boolean formulas receive their meaning.

Equations
Instances For

    Two assignments agree on a finite set when they give every variable in that set the same value. Differences outside the set are deliberately ignored.

    Equations
    Instances For

      A Boolean formula represented as a tree of variables, constants, and logical connectives. The explicit syntax lets later algorithms inspect and transform formulas rather than treating them as opaque Boolean functions.

      Instances For
        Equations
        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            The number of nodes in a formula tree. This is the formula-size measure used by later resource bounds.

            Equations
            Instances For

              The finite set of variables occurring in a formula. Variables outside this set cannot affect evaluation.

              Equations
              Instances For

                An assignment satisfies a formula exactly when evaluation returns true; in plain language, the assignment makes the formula true.

                Equations
                Instances For

                  A formula is satisfiable when some assignment satisfies it. Such an assignment is a witness to satisfiability.

                  Equations
                  Instances For

                    A formula is a tautology when every assignment satisfies it; its truth does not depend on how its variables are assigned.

                    Equations
                    Instances For

                      Every formula tree contains at least one node. There is no empty formula.

                      theorem ComplexityTheory.BooleanFormula.eval_eq_of_agree (formula : BooleanFormula) {first second : BooleanAssignment} :
                      BooleanAssignment.AgreeOn formula.vars first secondeval first formula = eval second formula

                      Assignments that agree on every variable occurring in a formula evaluate it identically. In plain language, variables absent from the formula do not matter.