Satisfiability
In mathematical logic, a formula is satisfiable if it is true under some assignment of values to its variables. For example, the formula is satisfiable because it is true when and , while the formula is not satisfiable over the integers. The dual concept to satisfiability is validity; a formula is valid if every assignment of values to its variables makes the formula true. For example, is valid over the integers, but is not.
Formally, satisfiability is studied with respect to a fixed logic defining the syntax of allowed symbols, such as firstorder logic, secondorder 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 in a formula such as . Formally, we define an interpretation (or model) to be an assignment of values to the variables and an assignment of meaning to all other nonlogical symbols, and a formula is said to be satisfiable if there is some interpretation which makes it true.^{[1]} While this allows nonstandard interpretations of symbols such as , one can restrict their meaning by providing additional axioms. The satisfiability modulo theories problem considers satisfiability of a formula with respect to a formal theory, which is a (finite or infinite) set of axioms.
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 firstorder 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
Reduction of validity to satisfiability
For classical logics with negation, it is generally possible to reexpress 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
Propositional satisfiability for classical logic
In the case of
Satisfiability in firstorder logic
For
Satisfiability in model theory
In
 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
Finite satisfiability
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 firstorder logic formula obtained as the conjunction of the following sentences, where and are constants:
The resulting formula has the infinite model , but it can be shown that it has no finite model (starting at the fact and following the chain of atoms that must exist by the second axiom, the finiteness of a model would require the existence of a loop, which would violate the third and fourth axioms, whether it loops back on or on a different element).
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
applied to the negation of the formula.Numerical constraints
Numerical constraints^{[clarify]} 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 ) 
NPcomplete (see integer programming )

Polynomial  decidable through e.g. Cylindrical algebraic decomposition  undecidable (Hilbert's tenth problem) 
Table source: Bockmayr and Weispfenning.^{[5]}^{: 754 }
For linear constraints, a fuller picture is provided by the following table.
Constraints over:  rationals  integers  natural numbers 

Linear equations  PTIME  PTIME  NPcomplete 
Linear inequalities  PTIME  NPcomplete  NPcomplete 
Table source: Bockmayr and Weispfenning.^{[5]}^{: 755 }
See also
 2satisfiability
 Boolean satisfiability problem
 Circuit satisfiability
 Karp's 21 NPcomplete problems
 Validity
 Constraint satisfaction
Notes
 ^ Boolos, Burgess & Jeffrey 2007, p. 120: "A set of sentences [...] is satisfiable if some interpretation [makes it true].".
 ISBN 0521779200.
 ^ Baier, Christel (2012). "Chapter 1.3 Undecidability of FOL". Lecture Notes — Advanced Logics. Technische Universität Dresden — Institute for Technical Computer Science. pp. 28–32. Archived from the original (PDF) on 14 October 2020. Retrieved 21 July 2012.
 ISBN 0521587131.
 ^ . (Elsevier) (MIT Press).
References
 Boolos, George; Burgess, John; Jeffrey, Richard (2007). Computability and Logic (5th ed.). Cambridge University Press.
Further reading
 .
 A. Biere; M. Heule; H. van Maaren; T. Walsh, eds. (2009). Handbook of Satisfiability. IOS Press. .