The Tseitin transformation of a proposition #
Tseitin's transformation Tseitin turns a proposition into a formula in
conjunctive normal form of linear size by naming subformulas. Here every subformula B of A
that is not an atom gets the variable Sum.inr B of CNF (Atom ⊕ Proposition Atom), and an atom
x is its own variable Sum.inl x (Proposition.tseitinVar). Equal subformulas share a
variable. For every subformula B = op(C, D) the definitional clauses say that the variable of
B carries op of the variables of C and D; for B = ⊥ they say that its variable is false
(Proposition.tseitinDefs). The formula Proposition.tseitinCNF A adds the unit clause asserting
the variable of A.
This is not the Tseitin formula of a graph (Cslib.Logic.PL.CNF.tseitinFormula), a parity
formula from the same paper. Cslib.Circuits.Boolean.tseitinCNF is the same construction for De
Morgan gate lists, where wires play the role of subformulas.
The two formulas have the same models up to the fresh variables
(Proposition.eval_tseitinCNF_eq_true_iff): an assignment σ satisfies A.tseitinCNF exactly
when its restriction σ ∘ Sum.inl to the atoms satisfies A and σ gives every fresh variable
in the formula the value of its subformula, that is, σ agrees with the extension
Proposition.tseitinExtend (σ ∘ Sum.inl) on the variables of the formula. So every model of A
extends to a model of A.tseitinCNF (Proposition.eval_tseitinCNF_tseitinExtend), uniquely on
the variables of the formula (Proposition.eq_of_eval_tseitinCNF), and the two are equisatisfiable
(Proposition.satisfiable_tseitinCNF_iff).
Source and conventions. Tseitin [Tseitin1983, §1, p. 467] gives the three clauses defining
the variable of a conjunction, a disjunction and an implication, and tests whether a formula is a
tautology by adding the unit clause of the negated variable of the whole formula. Here the
variable of the formula is asserted positively instead, so that the transformation is satisfiable
exactly when the formula is; a tautology test applies it to ¬A. CSLib's propositions have no
negation connective, ¬A being A → ⊥, so negation goes through the implication clauses, and ⊥
gets the unit clause making its variable false.
The fresh variables keep the formula short: A.tseitinCNF has at most 3 · A.size + 1 clauses
(Proposition.length_tseitinCNF_le), each with at most three literals
(Proposition.length_le_three_of_mem_tseitinCNF).
Main definitions #
Cslib.Logic.PL.Proposition.tseitinVar: the variable of a subformula.Cslib.Logic.PL.Proposition.tseitinDefs: the definitional clauses of the subformulas.Cslib.Logic.PL.Proposition.tseitinCNF: the Tseitin transformation.Cslib.Logic.PL.Proposition.tseitinExtend: an assignment of the atoms, extended to the fresh variables by evaluation.Cslib.Logic.PL.Proposition.size: the number of nodes of a proposition.
Main results #
Cslib.Logic.PL.Proposition.eval_tseitinCNF_eq_true_iff: the models ofA.tseitinCNF.Cslib.Logic.PL.Proposition.eval_tseitinCNF_tseitinExtend: every model ofAextends.Cslib.Logic.PL.Proposition.eq_of_eval_tseitinCNF: uniquely on the variables of the formula.Cslib.Logic.PL.Proposition.satisfiable_tseitinCNF_iff: equisatisfiability.Cslib.Logic.PL.Proposition.length_tseitinCNF_le,Cslib.Logic.PL.Proposition.length_le_three_of_mem_tseitinCNF: linear size.
References #
- G. S. Tseitin, On the complexity of derivation in propositional calculus, §1, p. 467 of the 1983 reprint
The variable of a subformula in the Tseitin transformation: an atom is its own variable and any other subformula is a fresh variable.
The definitional clauses of the subformulas of a proposition: for B = op(C, D), three
clauses saying that the variable of B is op of the variables of C and D, and for B = ⊥
the unit clause saying that its variable is false.
The Tseitin transformation Tseitin: the definitional clauses of the
subformulas of A, and the unit clause asserting the variable of A.
An assignment of the atoms, extended to the fresh variables by giving the variable of every subformula its value.
The number of nodes of a proposition: atoms and ⊥ have size one.
Semantics #
The definitional clauses hold under the extension of any assignment of the atoms.
Under an assignment satisfying the definitional clauses, the variable of A carries the
value of A at the atoms.
Under an assignment satisfying the definitional clauses of A, the variables of those
clauses and the variable of A carry the values of the extension of the assignment's atoms.
The models of the Tseitin transformation: an assignment satisfies A.tseitinCNF exactly
when its restriction to the atoms satisfies A and it agrees, on the variables of the formula,
with the extension of that restriction.
Every model of A extends to a model of A.tseitinCNF: the value of the Tseitin
transformation under the extension of an assignment is the value of A.
Models of the Tseitin transformation are determined by the atoms: two models that agree on the atoms agree on every variable of the formula.
The Tseitin transformation preserves satisfiability.
The definitional clauses of a list of propositions hold under the Tseitin extension of any atom assignment.
Under an assignment satisfying the definitional clauses of fs, every variable of those
clauses carries the value of the extension of the assignment's atoms.
Two assignments that satisfy the definitional clauses of fs and agree on the atoms agree on
every variable of those clauses.
Size #
The definitional clauses of a list of propositions have linearly many clauses in total.
The Tseitin transformation has linearly many clauses.
Every definitional clause of A has at most three literals.
Every clause of the Tseitin transformation has at most three literals.