In mathematical logic, a formula is satisfiable if it is true under some assignment of values to its variables. For example, the formula
x+3=y
x=3
y=6
x+1=x
x+3=3+x
x+3=y
Formally, satisfiability is studied with respect to a fixed logic defining the syntax of allowed symbols, such as first-order logic, second-order logic or propositional logic. Rather than being syntactic, however, satisfiability is a semantic property because it relates to the meaning of the symbols, for example, the meaning of
+
x+1=x
+
Satisfiability and validity are defined for a single formula, but can be generalized to an arbitrary theory or set of formulas: a theory is satisfiable if at least one interpretation makes every formula in the theory true, and valid if every formula is true in every interpretation. For example, theories of arithmetic such as Peano arithmetic are satisfiable because they are true in the natural numbers. This concept is closely related to the consistency of a theory, and in fact is equivalent to consistency for first-order logic, a result known as Gödel's completeness theorem. The negation of satisfiability is unsatisfiability, and the negation of validity is invalidity. These four concepts are related to each other in a manner exactly analogous to Aristotle's square of opposition.
The problem of determining whether a formula in propositional logic is satisfiable is decidable, and is known as the Boolean satisfiability problem, or SAT. In general, the problem of determining whether a sentence of first-order logic is satisfiable is not decidable. In universal algebra, equational theory, and automated theorem proving, the methods of term rewriting, congruence closure and unification are used to attempt to decide satisfiability. Whether a particular theory is decidable or not depends whether the theory is variable-free and on other conditions.[1]
For classical logics with negation, it is generally possible to re-express the question of the validity of a formula to one involving satisfiability, because of the relationships between the concepts expressed in the above square of opposition. In particular φ is valid if and only if ¬φ is unsatisfiable, which is to say it is false that ¬φ is satisfiable. Put another way, φ is satisfiable if and only if ¬φ is invalid.
For logics without negation, such as the positive propositional calculus, the questions of validity and satisfiability may be unrelated. In the case of the positive propositional calculus, the satisfiability problem is trivial, as every formula is satisfiable, while the validity problem is co-NP complete.
See main article: Propositional satisfiability. In the case of classical propositional logic, satisfiability is decidable for propositional formulae. In particular, satisfiability is an NP-complete problem, and is one of the most intensively studied problems in computational complexity theory.
For first-order logic (FOL), satisfiability is undecidable. More specifically, it is a co-RE-complete problem and therefore not semidecidable.[2] This fact has to do with the undecidability of the validity problem for FOL. The question of the status of the validity problem was posed firstly by David Hilbert, as the so-called Entscheidungsproblem. The universal validity of a formula is a semi-decidable problem by Gödel's completeness theorem. If satisfiability were also a semi-decidable problem, then the problem of the existence of counter-models would be too (a formula has counter-models iff its negation is satisfiable). So the problem of logical validity would be decidable, which contradicts the Church–Turing theorem, a result stating the negative answer for the Entscheidungsproblem.
In model theory, an atomic formula is satisfiable if there is a collection of elements of a structure that render the formula true.[3] If A is a structure, φ is a formula, and a is a collection of elements, taken from the structure, that satisfy φ, then it is commonly written that
A ⊧ φ [a]
If φ has no free variables, that is, if φ is an atomic sentence, and it is satisfied by A, then one writes
A ⊧ φ
In this case, one may also say that A is a model for φ, or that φ is true in A. If T is a collection of atomic sentences (a theory) satisfied by A, one writes
A ⊧ T
A problem related to satisfiability is that of finite satisfiability, which is the question of determining whether a formula admits a finite model that makes it true. For a logic that has the finite model property, the problems of satisfiability and finite satisfiability coincide, as a formula of that logic has a model if and only if it has a finite model. This question is important in the mathematical field of finite model theory.
Finite satisfiability and satisfiability need not coincide in general. For instance, consider the first-order logic formula obtained as the conjunction of the following sentences, where
a0
a1
R(a0,a1)
\forallxy(R(x,y) → \existszR(y,z))
\forallxyz(R(y,x)\wedgeR(z,x) → y=z))
\forallx\negR(x,a0)
The resulting formula has the infinite model
R(a0,a1),R(a1,a2),\ldots
R(a0,a1)
R
a0
The computational complexity of deciding satisfiability for an input formula in a given logic may differ from that of deciding finite satisfiability; in fact, for some logics, only one of them is decidable.
For classical first-order logic, finite satisfiability is recursively enumerable (in class RE) and undecidable by Trakhtenbrot's theorem applied to the negation of the formula.
often appear in the field of mathematical optimization, where one usually wants to maximize (or minimize) an objective function subject to some constraints. However, leaving aside the objective function, the basic issue of simply deciding whether the constraints are satisfiable can be challenging or undecidable in some settings. The following table summarizes the main cases.
Constraints | over reals | over integers | |
---|---|---|---|
Linear | PTIME (see linear programming) | NP-complete (see integer programming) | |
Polynomial | undecidable (Hilbert's tenth problem) |
Table source: Bockmayr and Weispfenning.[4]
For linear constraints, a fuller picture is provided by the following table.
Constraints over: | rationals | integers | natural numbers | |
---|---|---|---|---|
PTIME | PTIME | NP-complete | ||
PTIME | NP-complete | NP-complete |
Table source: Bockmayr and Weispfenning.