fixed-point logic
{{Short description|Concept in mathematical logic}}
In mathematical logic, fixed-point logics are extensions of classical predicate logic that have been introduced to express recursion. Their development has been motivated by descriptive complexity theory and their relationship to database query languages, in particular to Datalog.
Least fixed-point logic was first studied systematically by Yiannis N. Moschovakis in 1974,{{Cite journal |last=Moschovakis |first=Yiannis N. |author-link=Yiannis N. Moschovakis |date=1974 |title=Elementary Induction on Abstract Structures |url=http://dx.doi.org/10.1016/s0049-237x(08)x7092-2 |journal=Studies in Logic and the Foundations of Mathematics |volume=77 |doi=10.1016/s0049-237x(08)x7092-2 |isbn=9780444105370 |issn=0049-237X}} and it was introduced to computer scientists in 1979, when Alfred Aho and Jeffrey Ullman suggested fixed-point logic as an expressive database query language.{{Cite journal|last1=Aho|first1=Alfred V.|last2=Ullman|first2=Jeffrey D.|date=1979|title=Universality of data retrieval languages|journal=Proceedings of the 6th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages - POPL '79|pages=110–119|location=New York, New York, USA|publisher=ACM Press|doi=10.1145/567752.567763|s2cid=3242505|doi-access=free}}
Partial fixed-point logic
For a relational signature X, FO[PFP](X) is the set of formulas formed from X using first-order connectives and predicates, second-order variables as well as a partial fixed point operator used to form formulas of the form , where is a second-order variable, a tuple of first-order variables, a tuple of terms and the lengths of and coincide with the arity of .
Let {{mvar|k}} be an integer, be vectors of {{mvar|k}} variables, {{mvar|P}} be a second-order variable of arity {{mvar|k}}, and let {{mvar|φ}} be an FO(PFP,X) function using {{mvar|x}} and {{mvar|P}} as variables. We can iteratively define such that and (meaning {{mvar|φ}} with substituted for the second-order variable {{mvar|P}}). Then, either there is a fixed point, or the list of s is cyclic.Ebbinghaus and Flum, p. 121
is defined as the value of the fixed point of on {{mvar|y}} if there is a fixed point, else as false.Ebbinghaus and Flum, p. 121 Since {{mvar|P}}s are properties of arity {{mvar|k}}, there are at most values for the s, so with a polynomial-space counter we can check if there is a loop or not.Immerman 1999, p. 161
It has been proven that on ordered finite structures, a property is expressible in FO(PFP,X) if and only if it lies in PSPACE.{{Cite book|last1=Abiteboul|first1=S.|last2=Vianu|first2=V.|title=[1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science |chapter=Fixpoint extensions of first-order logic and datalog-like languages |chapter-url=http://dx.doi.org/10.1109/lics.1989.39160|year=1989|pages=71–79|publisher=IEEE Comput. Soc. Press|doi=10.1109/lics.1989.39160|isbn=0-8186-1954-6|s2cid=206437693}}
Least fixed-point logic
Since the iterated predicates involved in calculating the partial fixed point are not in general monotone, the fixed-point may not always exist.
FO(LFP,X), least fixed-point logic, is the set of formulas in FO(PFP,X) where the partial fixed point is taken only over such formulas {{mvar|φ}} that only contain positive occurrences of {{mvar|P}} (that is, occurrences preceded by an even number of negations). This guarantees monotonicity of the fixed-point construction (That is, if the second order variable is {{mvar|P}}, then always implies ).
Due to monotonicity, we only add vectors to the truth table of {{mvar|P}}, and since there are only possible vectors we will always find a fixed point before iterations. The Immerman-Vardi theorem, shown independently by Immerman{{Cite journal|last=Immerman|first=Neil|year=1986|title=Relational queries computable in polynomial time|journal=Information and Control|language=en|volume=68|issue=1–3|pages=86–104|doi=10.1016/s0019-9958(86)80029-8|doi-access=free}} and Vardi,{{Cite book|last=Vardi|first=Moshe Y.|chapter=The complexity of relational query languages (Extended Abstract) |title=Proceedings of the fourteenth annual ACM symposium on Theory of computing - STOC '82|date=1982|publisher=ACM|isbn=978-0897910705|location=New York, NY, USA|pages=137–146|citeseerx=10.1.1.331.6045|doi=10.1145/800070.802186|s2cid=7869248}} shows that FO(LFP,X) characterises P on all ordered structures.
The expressivity of least-fixed point logic coincides exactly with the expressivity of the database querying language Datalog, showing that, on ordered structures, Datalog can express exactly those queries executable in polynomial time.Ebbinghaus and Flum, p. 242
Inflationary fixed-point logic
Another way to ensure the monotonicity of the fixed-point construction is by only adding new tuples to at every stage of iteration, without removing tuples for which no longer holds. Formally, we define as where .
This inflationary fixed-point agrees with the least-fixed point where the latter is defined. Although at first glance it seems as if inflationary fixed-point logic should be more expressive than least fixed-point logic since it supports a wider range of fixed-point arguments, in fact, every FO[IFP](X)-formula is equivalent to an FO[LFP](X)-formula. Yuri Gurevich and Saharon Shelah, Fixed-pointed extension of first order logic, Annals of Pure and Applied Logic 32 (1986) 265--280.
Simultaneous induction
While all the fixed-point operators introduced so far iterated only on the definition of a single predicate, many computer programs are more naturally thought of as iterating over several predicates simultaneously. By either increasing the arity of the fixed-point operators or by nesting them, every simultaneous least, inflationary or partial fixed-point can in fact be expressed using the corresponding single-iteration constructions discussed above.Ebbinghaus and Flum, pp. 179, 193
Transitive closure logic
Rather than allow induction over arbitrary predicates, transitive closure logic allows only transitive closures to be expressed directly.
FO[TC](X) is the set of formulas formed from X using first-order connectives and predicates, second-order variables as well as a transitive closure operator used to form formulas of the form , where and are tuples of pairwise distinct first-order variables, and tuples of terms and the lengths of , , and coincide.
TC is defined as follows: Let {{mvar|k}} be a positive integer and be vectors of {{mvar|k}} variables. Then is true if there exist {{mvar|n}} vectors of variables such that , and for all
Over ordered structures, FO[TC] characterises the complexity class NL.{{Cite book|last=Immerman|first=Neil|title=Proceedings of the fifteenth annual ACM symposium on Theory of computing - STOC '83 |chapter=Languages which capture complexity classes |date=1983|chapter-url=http://dx.doi.org/10.1145/800061.808765|pages=347–354|location=New York, New York, USA|publisher=ACM Press|doi=10.1145/800061.808765|isbn=0897910990|s2cid=7503265}} This characterisation is a crucial part of Immerman's proof that NL is closed under complement (NL = co-NL).{{Cite journal|last=Immerman|first=Neil|date=1988|title=Nondeterministic Space is Closed under Complementation|url=http://dx.doi.org/10.1137/0217058|journal=SIAM Journal on Computing|volume=17|issue=5|pages=935–938|doi=10.1137/0217058|issn=0097-5397}}
Deterministic transitive closure logic
FO[DTC](X) is defined as FO(TC,X) where the transitive closure operator is deterministic. This means that when we apply
We can suppose that
Over ordered structures, FO[DTC] characterises the complexity class L.
Iterations
The fixed-point operations that we defined so far iterate the inductive definitions of the predicates mentioned in the formula indefinitely, until a fixed point is reached. In implementations, it may be necessary to bound the number of iterations to limit the computation time. The resulting operators are also of interest from a theoretical point of view since they can also be used to characterise complexity classes.
We will define first-order with iteration,
In this section we will write
We can now define
\mathsf{FO}[(\log n)^i] is equal to FO-uniform ACi, and in fact\mathsf{FO}[t(n)] is FO-uniform AC of deptht(n) .Immerman 1999, p. 82\mathsf{FO}[(\log n)^{O(1)}] is equal to NC.Immerman 1999, p. 84\mathsf{FO}[n^{O(1)}] is equal to PTIME. It is also another way to write FO(IFP).Immerman 1999, p. 58\mathsf{FO}[2^{n^{O(1)}}] is equal to PSPACE. It is also another way to write FO(PFP). Immerman 1999, p. 161
Notes
{{reflist}}
References
- {{Cite book|last1=Ebbinghaus|first1=Heinz-Dieter|last2=Flum|first2=Jörg|date=1999|title=Finite Model Theory|edition=2|series=Perspectives in Mathematical Logic|publisher=Springer|doi=10.1007/978-3-662-03182-7|isbn=978-3-662-03184-1}}
- {{Cite book|last=Neil|first=Immerman|url=http://worldcat.org/oclc/901297152|title=Descriptive complexity|date=1999|publisher=Springer|isbn=0-387-98600-6|oclc=901297152}}
{{Mathematical logic}}