# Satisfiability

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Satisfiability
> Markdown URL: https://mediated.wiki/source/Satisfiability.md
> Source: https://en.wikipedia.org/wiki/Satisfiability
> Source revision: 1339635890
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Existence of values making formula true

In [mathematical logic](/source/Mathematical_logic), a [formula](/source/Well-formed_formula) is **satisfiable** if it is true under some assignment of values to its [variables](/source/Variable_(mathematics)). For example, the formula x + 3 = y {\displaystyle x+3=y} is satisfiable because it is true when x = 3 {\displaystyle x=3} and y = 6 {\displaystyle y=6} , while the formula x + 1 = x {\displaystyle x+1=x} is not satisfiable over the integers. The dual concept to satisfiability is [validity](/source/Validity_(logic)); a formula is *valid* if every assignment of values to its variables makes the formula true. For example, x + 3 = 3 + x {\displaystyle x+3=3+x} is valid over the integers, but x + 3 = y {\displaystyle x+3=y} is not.

Formally, satisfiability is studied with respect to a fixed logic defining the [syntax](/source/Syntax_(logic)) of allowed symbols, such as [first-order logic](/source/First-order_logic), [second-order logic](/source/Second-order_logic) or [propositional logic](/source/Propositional_calculus). Rather than being syntactic, however, satisfiability is a [semantic](/source/Semantics) property because it relates to the *meaning* of the symbols, for example, the meaning of + {\displaystyle +} in a formula such as x + 1 = x {\displaystyle x+1=x} . Formally, we define an [interpretation](/source/Interpretation_(logic)) (or [model](/source/Model_theory)) to be an assignment of values to the variables and an assignment of meaning to all other non-logical symbols, and a formula is said to be satisfiable if there is some interpretation which makes it true.[1] While this allows non-standard interpretations of symbols such as + {\displaystyle +} , one can restrict their meaning by providing additional [axioms](/source/Axiom). The [satisfiability modulo theories](/source/Satisfiability_modulo_theories) problem considers satisfiability of a formula with respect to a [formal theory](/source/Theory_(mathematical_logic)), 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](/source/Peano_axioms) are satisfiable because they are true in the natural numbers. This concept is closely related to the [consistency](/source/Consistency) of a theory, and in fact is equivalent to consistency for first-order logic, a result known as [Gödel's completeness theorem](/source/G%C3%B6del'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](/source/Aristotle)'s [square of opposition](/source/Square_of_opposition).

The [problem](/source/Decision_problem) of determining whether a formula in [propositional logic](/source/Propositional_logic) is satisfiable is [decidable](/source/Decidable_problem), and is known as the [Boolean satisfiability problem](/source/Boolean_satisfiability_problem), or SAT. In general, the problem of determining whether a sentence of [first-order logic](/source/First-order_logic) is satisfiable is not decidable. In [universal algebra](/source/Universal_algebra), [equational theory](/source/Equational_theory), and [automated theorem proving](/source/Automated_theorem_proving), the methods of [term rewriting](/source/Term_rewriting), [congruence closure](/source/Congruence_closure) and [unification](/source/Unification_(computer_science)) are used to attempt to decide satisfiability. Whether a particular [theory](/source/Theory_(logic)) is decidable or not depends whether the theory is [variable-free](/source/Variable-free) and on other conditions.[2]

## Reduction of validity to satisfiability

For [classical logics](/source/Classical_logic) 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](/source/List_of_logic_systems#Positive_propositional_calculus), the questions of validity and satisfiability may be unrelated. In the case of the [positive propositional calculus](/source/List_of_logic_systems#Positive_propositional_calculus), the satisfiability problem is trivial, as every formula is satisfiable, while the validity problem is [co-NP complete](/source/Co-NP-complete).

## Propositional satisfiability for classical logic

Main article: [Propositional satisfiability](/source/Propositional_satisfiability)

In the case of [classical propositional logic](/source/Classical_propositional_logic), satisfiability is decidable for propositional formulae. In particular, satisfiability is an [NP-complete](/source/NP-complete) problem, and is one of the most intensively studied problems in [computational complexity theory](/source/Computational_complexity_theory).

## Satisfiability in first-order logic

For [first-order logic](/source/First-order_logic) (FOL), satisfiability is [undecidable](/source/Undecidable_problem). More specifically, it is a [co-RE-complete](/source/RE_(complexity)#co-RE-complete) problem and therefore not [semidecidable](/source/Semidecidable).[3] 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](/source/David_Hilbert), as the so-called [Entscheidungsproblem](/source/Entscheidungsproblem). The universal validity of a formula is a semi-decidable problem by [Gödel's completeness theorem](/source/G%C3%B6del'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](/source/Entscheidungsproblem#Negative_answer), a result stating the negative answer for the Entscheidungsproblem.

## Satisfiability in model theory

In [model theory](/source/Model_theory), an [atomic formula](/source/Atomic_formula) is satisfiable if there is a collection of elements of a [structure](/source/Structure_(logic)) that render the formula true.[4] 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](/source/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](/source/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](/source/Finite_model_theory).

Finite satisfiability and satisfiability need not coincide in general. For instance, consider the [first-order logic](/source/First-order_logic) formula obtained as the [conjunction](/source/Logical_conjunction) of the following sentences, where a 0 {\displaystyle a_{0}} and a 1 {\displaystyle a_{1}} are [constants](/source/Logical_constant):

- R ( a 0 , a 1 ) {\displaystyle R(a_{0},a_{1})}

- ∀ x y ( R ( x , y ) → ∃ z R ( y , z ) ) {\displaystyle \forall xy(R(x,y)\rightarrow \exists zR(y,z))}

- ∀ x y z ( R ( y , x ) ∧ R ( z , x ) → y = z ) ) {\displaystyle \forall xyz(R(y,x)\wedge R(z,x)\rightarrow y=z))}

- ∀ x ¬ R ( x , a 0 ) {\displaystyle \forall x\neg R(x,a_{0})}

The resulting formula has the infinite model R ( a 0 , a 1 ) , R ( a 1 , a 2 ) , … {\displaystyle R(a_{0},a_{1}),R(a_{1},a_{2}),\ldots } , but it can be shown that it has no finite model (starting at the fact R ( a 0 , a 1 ) {\displaystyle R(a_{0},a_{1})} and following the chain of R {\displaystyle R} [atoms](/source/Atomic_formula) 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 a 0 {\displaystyle a_{0}} or on a different element).

The [computational complexity](/source/Computational_complexity_theory) 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](/source/Decidability_(logic)).

For classical [first-order logic](/source/First-order_logic), finite satisfiability is [recursively enumerable](/source/Computably_enumerable) (in class [RE](/source/RE_(complexity))) and [undecidable](/source/Undecidable_problem) by [Trakhtenbrot's theorem](/source/Trakhtenbrot's_theorem) applied to the negation of the formula.

## Numerical constraints

Further information: [Satisfiability modulo theories](/source/Satisfiability_modulo_theories) and [Constraint satisfaction problem](/source/Constraint_satisfaction_problem)

Numerical constraints[*[clarification needed](https://en.wikipedia.org/wiki/Wikipedia:Please_clarify)*] often appear in the field of [mathematical optimization](/source/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 integers Linear PTIME (see linear programming) NP-complete (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 NP-complete Linear inequalities PTIME NP-complete NP-complete

*Table source: Bockmayr and Weispfenning*.[5]: 755

## See also

- [2-satisfiability](/source/2-satisfiability)

- [Boolean satisfiability problem](/source/Boolean_satisfiability_problem)

- [Circuit satisfiability](/source/Circuit_satisfiability)

- [Karp's 21 NP-complete problems](/source/Karp's_21_NP-complete_problems)

- [Validity](/source/Validity_(logic))

- [Constraint satisfaction](/source/Constraint_satisfaction)

## Notes

1. **[^](#cite_ref-FOOTNOTEBoolosBurgessJeffrey2007p._120:_"A_set_of_sentences_[...]_is_''satisfiable''_if_some_interpretation_[makes_it_true]."_1-0)** [Boolos, Burgess & Jeffrey 2007](#CITEREFBoolosBurgessJeffrey2007), p. 120: "A set of sentences [...] is *satisfiable* if some interpretation [makes it true].".

1. **[^](#cite_ref-2)** [Franz Baader](/source/Franz_Baader); [Tobias Nipkow](/source/Tobias_Nipkow) (1998). [*Term Rewriting and All That*](https://books.google.com/books?id=N7BvXVUCQk8C&q=satisfiability+OR+satisfiable). Cambridge University Press. pp. 58–92. [ISBN](/source/ISBN_(identifier)) [0-521-77920-0](https://en.wikipedia.org/wiki/Special:BookSources/0-521-77920-0).

1. **[^](#cite_ref-3)** [Baier, Christel](/source/Christel_Baier) (2012). ["Chapter 1.3 Undecidability of FOL"](https://web.archive.org/web/20201014044350/http://www.inf.tu-dresden.de/index.php?node_id=404). *Lecture Notes — Advanced Logics*. Technische Universität Dresden — Institute for Technical Computer Science. pp. 28–32. Archived from [the original](https://www.inf.tu-dresden.de/content/institutes/thi/algi/lehre/SS12/AL12/skript/script120413.pdf) (PDF) on 14 October 2020. Retrieved 21 July 2012.

1. **[^](#cite_ref-4)** Wilifrid Hodges (1997). *A Shorter Model Theory*. Cambridge University Press. p. 12. [ISBN](/source/ISBN_(identifier)) [0-521-58713-1](https://en.wikipedia.org/wiki/Special:BookSources/0-521-58713-1).

1. ^ [***a***](#cite_ref-BockmayrWeispfenning2001_5-0) [***b***](#cite_ref-BockmayrWeispfenning2001_5-1) Alexander Bockmayr; Volker Weispfenning (2001). "Solving Numerical Constraints". In John Alan Robinson; Andrei Voronkov (eds.). *Handbook of Automated Reasoning Volume I*. Elsevier and MIT Press. [ISBN](/source/ISBN_(identifier)) [0-444-82949-0](https://en.wikipedia.org/wiki/Special:BookSources/0-444-82949-0). (Elsevier) (MIT Press).

## References

- Boolos, George; Burgess, John; Jeffrey, Richard (2007). *Computability and Logic* (5th ed.). Cambridge University Press.

## Further reading

- [Daniel Kroening](/source/Daniel_Kroening); [Ofer Strichman](/source/Ofer_Strichman) (2008). *Decision Procedures: An Algorithmic Point of View*. Springer Science & Business Media. [ISBN](/source/ISBN_(identifier)) [978-3-540-74104-6](https://en.wikipedia.org/wiki/Special:BookSources/978-3-540-74104-6).

- A. Biere; M. Heule; H. van Maaren; T. Walsh, eds. (2009). *Handbook of Satisfiability*. IOS Press. [ISBN](/source/ISBN_(identifier)) [978-1-60750-376-7](https://en.wikipedia.org/wiki/Special:BookSources/978-1-60750-376-7).

v t e Mathematical logic General Axiom list Cardinality First-order logic Formal proof Formal semantics Foundations of mathematics Information theory Lemma Logical consequence Model Theorem Theory Type theory Theorems (list), paradoxes Gödel's completeness – incompleteness theorems Tarski's undefinability Banach–Tarski paradox Cantor's theorem – paradox – diagonal argument Compactness Halting problem Lindström's Löwenheim–Skolem Russell's paradox Logics Traditional Classical logic Logical truth Tautology Proposition Inference Logical equivalence Consistency Equiconsistency Argument Soundness Validity Syllogism Square of opposition Venn diagram Propositional Boolean algebra Boolean functions Logical connectives Propositional calculus Propositional formula Truth tables Many-valued logic 3 finite ∞ Predicate First-order list Second-order Monadic Higher-order Fixed-point Free Quantifiers Predicate Monadic predicate calculus Set theory Set hereditary Class (Ur-)Element Ordinal number Extensionality Forcing Relation equivalence partition Set operations: intersection union complement Cartesian product power set identities Types of sets Countable Uncountable Empty Inhabited Singleton Finite Infinite Transitive Ultrafilter Recursive Fuzzy Universal Universe constructible Grothendieck Von Neumann Maps, cardinality Function/Map domain codomain image In/Sur/Bi-jection Schröder–Bernstein theorem Isomorphism Gödel numbering Enumeration Large cardinal inaccessible Aleph number Operation binary Theories Zermelo–Fraenkel axiom of choice continuum hypothesis General Kripke–Platek Morse–Kelley Naive New Foundations Tarski–Grothendieck Von Neumann–Bernays–Gödel Ackermann Constructive Formal systems (list), language, syntax Alphabet Arity Automata Axiom schema Expression ground Extension by definition conservative Relation Formation rule Grammar Formula atomic closed ground open Free/bound variable Language Metalanguage Logical connective ¬ ∨ ∧ → ↔ = Predicate functional variable propositional variable Proof Quantifier ∃ ! ∀ rank Sentence atomic spectrum Signature String Substitution Symbol function logical/constant non-logical variable Term Theory list Example axiomatic systems (list) of true arithmetic Peano second-order elementary function primitive recursive Robinson Skolem of the real numbers Tarski's axiomatization of Boolean algebras canonical minimal axioms of geometry Euclidean Elements Hilbert's Tarski's non-Euclidean Principia Mathematica Proof theory Formal proof Natural deduction Logical consequence Rule of inference Sequent calculus Theorem Systems axiomatic deductive Hilbert list Complete theory Independence (from ZFC) Proof of impossibility Ordinal analysis Reverse mathematics Self-verifying theories Model theory Interpretation function of models Model atomic equivalence finite prime saturated spectrum submodel Non-standard model of non-standard arithmetic Diagram elementary Categorical theory Model complete theory Satisfiability Semantics of logic Strength Theories of truth semantic Tarski's Kripke's T-schema Transfer principle Truth predicate Truth value Type Ultraproduct Validity Computability theory Church encoding Church–Turing thesis Computably enumerable Computable function Computable set Decision problem decidable undecidable P NP P versus NP problem Kolmogorov complexity Lambda calculus Primitive recursive function Recursion Recursive set Turing machine Type theory Related Abstract logic Algebraic logic Automated theorem proving Category theory Concrete/Abstract category Category of sets History of logic History of mathematical logic timeline Logicism Mathematical object Philosophy of mathematics Supertask Mathematics portal

v t e Metalogic and metamathematics Cantor's theorem Entscheidungsproblem Church–Turing thesis Consistency Effective method Foundations of mathematics of geometry Gödel's completeness theorem Gödel's incompleteness theorems Soundness Completeness Decidability Interpretation Löwenheim–Skolem theorem Metatheorem Satisfiability Independence Type–token distinction Use–mention distinction

---
Adapted from the Wikipedia article [Satisfiability](https://en.wikipedia.org/wiki/Satisfiability) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Satisfiability?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
