Documentation

Complexity.Computability.Complexity.Problems.TQBF.Closed

Closedness of a quantified Boolean formula in polynomial time #

The free variables of a formula are computed by one scan of its tokens from right to left, with a stack holding the free variables of the subformulas read so far (Cslib.Logic.PL.QBF.freeVarStep): a variable pushes itself, a constant pushes nothing, a binary connective joins the two lists on top of the stack, and a quantifier removes its variable from the list on top. On the tokens of a formula the scan ends with the list of its free variables (Cslib.Logic.PL.QBF.foldl_freeVarStep_tokens), so a formula is closed exactly when that list is empty (Cslib.Logic.PL.QBF.isClosed_tokens), and closedness is decided in polynomial time (Cslib.Complexity.TQBF.computableInPolyTime_decide_closed).

Main definitions #

Main results #

Free variables by a scan of the tokens #

The free variables of a formula, with multiplicity.

Instances For

    The elements of freeVarList φ are the free variables of φ.

    A formula is closed exactly when its list of free variables is empty.

    One step of the scan of the tokens from right to left, for a token of kind k and variable v, on the stack of the lists of free variables of the subformulas read so far.

    Instances For

      One step of the scan of the tokens from right to left.

      Instances For

        The scan of the tokens of a formula pushes the list of its free variables.

        Whether the scan of a list of tokens finds no free variable.

        Instances For

          The scan decides closedness.