Satisfiability of CNF structures #
A formula in conjunctive normal form is given as a finite structure for the vocabulary cnf of
two binary relation symbols cnf.pos and cnf.neg. Every element c names a clause and a
variable: the clause named by c has the positive literal x when pos(c, x) holds and the
negative literal ¬x when neg(c, x) holds. An element related to nothing names the empty clause.
A structure is satisfiable (cnf.Satisfiable) when some assignment of truth values to the
elements satisfies every clause, that is, when it satisfies the existential second-order sentence
∃ S, ∀ c, ∃ x, (pos(c, x) ∧ S x) ∨ (neg(c, x) ∧ ¬ S x). It is a 3-CNF structure
(cnf.IsThreeCNF) when every clause has at most three literals.
Descriptive complexity presents satisfiability as a class of finite structures in this way
Immerman, Chapter 7; the conventions above are fixed here. A formula with m
clauses over n variables is presented by a structure with max m n elements: the clauses and the
variables are numbered from the same elements, and the elements naming no clause of the formula
name the tautology x ∨ ¬x of their own variable. The empty structure presents the empty
formula, which is satisfiable. The machine-level problem, on formulas of
Cslib.Logic.PL.CNF ℕ encoded as lists, is Cslib.Complexity.SAT.
The classes cnf.SAT and cnf.ThreeSAT of satisfiable structures and of satisfiable 3-CNF
structures are existential second-order definable, hence closed under isomorphism, and they are
invariant under disjoint copies, so that tagged interpretations reduce to them. The vocabulary
cnf.vocabulary lists the table of pos before that of neg in encoded structures.
Main definitions #
Cslib.Logic.FO.cnf: the vocabulary of CNF structures, withcnf.posandcnf.neg.Cslib.Logic.FO.cnf.literals: the literals of the clause named by an element.Cslib.Logic.FO.cnf.ClauseSatisfied,Cslib.Logic.FO.cnf.Satisfies,Cslib.Logic.FO.cnf.Satisfiable: satisfied clauses, satisfying assignments and satisfiability.Cslib.Logic.FO.cnf.IsThreeCNF: every clause has at most three literals.Cslib.Logic.FO.cnf.SAT,Cslib.Logic.FO.cnf.ThreeSAT: the classes SAT and 3SAT.Cslib.Logic.FO.cnf.satSentence,Cslib.Logic.FO.cnf.threeCNFSentence: their defining existential second-order and first-order sentences.Cslib.Logic.FO.cnf.vocabulary: the vocabulary of encoded CNF structures.
Main results #
Cslib.Logic.FO.cnf.realize_satSentence,Cslib.Logic.FO.cnf.realize_threeCNFSentence: the semantics of the defining sentences.Cslib.Logic.FO.cnf.definable_SAT,Cslib.Logic.FO.cnf.definable_ThreeSAT: SAT and 3SAT are existential second-order definable.Cslib.Logic.FO.cnf.isoClosed_SAT,Cslib.Logic.FO.cnf.copyInvariant_SATand their 3SAT versions.Cslib.Logic.FO.cnf.clauseSatisfied_iff_of_templates: the clauses of a CNF structure interpreted by templates.
References #
The vocabulary #
The vocabulary of CNF structures, with two binary relation symbols.
Instances For
pos(c, x): the variable x occurs positively in the clause c.
Instances For
neg(c, x): the variable x occurs negatively in the clause c.
Instances For
Satisfiability #
Satisfiability is invariant under isomorphism.
Every clause of a satisfiable CNF structure is nonempty.
3-CNF structures #
The classes SAT and 3SAT #
SAT: the class of satisfiable CNF structures.
Instances For
3SAT: the class of satisfiable 3-CNF structures.
Instances For
3SAT is closed under isomorphism.
The empty structure is satisfiable.
The empty structure is a 3-CNF structure.
Every structure with at most one element is a 3-CNF structure.
Copies #
3SAT is invariant under copies.
CNF structures interpreted by templates #
In a CNF structure interpreted by templates, the literals of a polarity of a clause are the elements related to it by the templates of that polarity.
In a CNF structure interpreted by templates, an assignment satisfies a clause when a template of a polarity applies to its coordinates and relates it to a variable with that truth value.
Defining sentences #
The relation variable S of the satisfiability sentence, the set of true variables.
Instances For
The first-order part of the satisfiability sentence:
∀ c, ∃ x, (pos(c, x) ∧ S x) ∨ (neg(c, x) ∧ ¬ S x).
Instances For
The satisfiability sentence ∃ S, ∀ c, ∃ x, (pos(c, x) ∧ S x) ∨ (neg(c, x) ∧ ¬ S x).
Instances For
The satisfiability sentence holds exactly in the satisfiable CNF structures.
SAT is existential second-order definable.
The 3-CNF sentence: no clause has four distinct literals.
Instances For
The 3-CNF sentence holds exactly in the 3-CNF structures.
The sentence saying that no clause is empty: ∀ c, ∃ x, pos(c, x) ∨ neg(c, x).
Instances For
The sentence nonemptyClausesSentence holds exactly when no clause is empty.
3-CNF structures form a first-order definable class.
3SAT is existential second-order definable.