Documentation

CslibFrontier.Computability.Complexity.Problems.Tautology

TAUTOLOGY is coNP-complete #

A Boolean formula is built from variables, the constants, negation, conjunction and disjunction Arora and Barak, Section 2.3. These are the quantifier-free formulas of Cslib.Logic.PL.QBF (Cslib.Logic.PL.QBF.QuantifierFree), encoded by their tokens in prefix order (Cslib.Complexity.encQBF). TAUTOLOGY is the set of quantifier-free formulas over variables numbered by natural numbers that are true under every assignment Arora and Barak, Example 2.23. A formula with a quantifier is not in TAUTOLOGY; this is a total language on QBF ℕ, not a promise problem. Restricting to formulas in conjunctive normal form would make the problem polynomial-time, so general formulas are essential.

A quantifier-free formula is evaluated by one scan of its tokens from right to left, with a stack of truth values (Cslib.Logic.PL.QBF.evalStep): a variable or a constant pushes its value, a negation negates the top value, and a binary connective combines the two values on top. On the tokens of a quantifier-free formula the scan pushes its value (Cslib.Logic.PL.QBF.foldl_evalStep), in polynomial time when the assignment is the indicator of a list of variables (Cslib.Complexity.computableInPolyTime_evalTokens). The shared scan and its polynomial-time proof live in CslibFrontier.Computability.Complexity.Problems.TQBF.QuantifierFree.

A formula is not a tautology when it has a quantifier or some assignment falsifies it, and a falsifying assignment is the set of its true variables among the variables of the formula, a subset witness (Cslib.Complexity.mem_NP_of_subsetWitness). So TAUTOLOGY ∈ coNP (Cslib.Complexity.TAUTOLOGY_mem_coNP). Negation reduces UNSAT to TAUTOLOGY (Cslib.Complexity.UNSAT_reducible_TAUTOLOGY), so TAUTOLOGY is coNP-complete by the Cook–Levin theorem (Cslib.Complexity.TAUTOLOGY_coNPComplete).

Main definitions #

Main results #

References #

TAUTOLOGY: the Boolean formulas, over variables numbered by natural numbers, that are true under every assignment Arora and Barak, Example 2.23. Formulas with quantifiers are not members.

The negation of a formula in conjunctive normal form is a tautology exactly when the formula is unsatisfiable.

TAUTOLOGY is in coNP: a non-tautology has a quantifier or a falsifying assignment, given by its true variables.