Content deleted Content added
→Example: the previous example was not about uninterpreted functions. This edit replaces it. Tag: references removed |
m WP:ADOPTYPO boolean -> Boolean |
||
(20 intermediate revisions by 13 users not shown) | |||
Line 1:
{{Short description|Type of function in mathematical logic}}
In [[mathematical logic]], an '''uninterpreted function'''<ref>
The '''theory of uninterpreted functions''' is also sometimes called the '''free theory''', because it is freely generated, and thus a [[free object]], or the '''empty theory''', being the [[theory (mathematical logic)|theory]] having an empty set of [[sentence (mathematical logic)|sentences]] (in analogy to an [[initial algebra]]). Theories with a non-empty set of equations are known as [[equational theory|equational theories]]. The [[satisfiability]] problem for free theories is solved by [[syntactic unification]]; algorithms for the latter are used by interpreters for various computer languages, such as [[Prolog]]. Syntactic unification is also used in algorithms for the satisfiability problem for certain other equational theories, see [[
==Example==
<syntaxhighlight lang="text" line="1">
(declare-fun f (Int) Int)
(assert (= (f 10) 1))
</syntaxhighlight>
the SMT solver would return "This input is satisfiable
<syntaxhighlight lang="text" line="1">
▲This is satisfiable: <code>f</code> is an uninterpreted function. All that is known about <code>f</code> is its signature, so it is possible that <code>f(10) = 1</code>.
(declare-fun f (Int) Int)
(assert (= (f 10) 1))
(assert (= (f 10) 42))
</syntaxhighlight>
the SMT solver would return "This input is unsatisfiable
▲This is unsatisfiable: although <code>f</code> has no interpretation, it is impossible that it returns different values for the same input.
==Discussion==
The [[decision problem]] for free theories is particularly important,
Free theories can be solved by searching for [[common subexpression]]s to form the [[congruence closure]].{{clarify|reason=Indicate about solving which problem in free theories the sentence is supposed to speak. E.g. to solve the satisfiability problem of conjunctions of equations, the Martelli-Montanari syntactic unification algorithm suffices, neither common subexpressions nor congruence closures are needed. Maybe, satisfiability of arbitrary
== See also ==
Line 35 ⟶ 28:
* [[Initial algebra]]
* [[Term algebra]]
* [[Theory of pure equality]]
==Notes==
Line 40 ⟶ 34:
==References==
{{reflist}}
[[Category:Specification languages]]▼
{{Mathematical logic}}
{{Formalmethods-stub}}▼
▲[[Category:Specification languages]]
▲{{Formalmethods-stub}}
|