- Source: Fixed-point 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, 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.
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
PFP
{\displaystyle \operatorname {PFP} }
used to form formulas of the form
[
PFP
x
→
,
P
φ
]
t
→
{\displaystyle [\operatorname {PFP} _{{\vec {x}},P}\varphi ]{\vec {t}}}
, where
P
{\displaystyle P}
is a second-order variable,
x
→
{\displaystyle {\vec {x}}}
a tuple of first-order variables,
t
→
{\displaystyle {\vec {t}}}
a tuple of terms and the lengths of
x
→
{\displaystyle {\vec {x}}}
and
t
→
{\displaystyle {\vec {t}}}
coincide with the arity of
P
{\displaystyle P}
.
Let k be an integer,
x
,
y
{\displaystyle x,y}
be vectors of k variables, P be a second-order variable of arity k, and let φ be an FO(PFP,X) function using x and P as variables. We can iteratively define
(
P
i
)
i
∈
N
{\displaystyle (P_{i})_{i\in N}}
such that
P
0
(
x
)
=
f
a
l
s
e
{\displaystyle P_{0}(x)=false}
and
P
i
(
x
)
=
φ
(
P
i
−
1
,
x
)
{\displaystyle P_{i}(x)=\varphi (P_{i-1},x)}
(meaning φ with
P
i
−
1
{\displaystyle P_{i-1}}
substituted for the second-order variable P). Then, either there is a fixed point, or the list of
(
P
i
)
{\displaystyle (P_{i})}
s is cyclic.
[
PFP
P
,
x
φ
(
y
)
]
{\displaystyle [\operatorname {PFP} _{P,x}\varphi (y)]}
is defined as the value of the fixed point of
(
P
i
)
{\displaystyle (P_{i})}
on y if there is a fixed point, else as false. Since Ps are properties of arity k, there are at most
2
n
k
{\displaystyle 2^{n^{k}}}
values for the
P
i
{\displaystyle P_{i}}
s, so with a polynomial-space counter we can check if there is a loop or not.
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.
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 φ that only contain positive occurrences of 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 P, then
P
i
(
x
)
{\displaystyle P_{i}(x)}
always implies
P
i
+
1
(
x
)
{\displaystyle P_{i+1}(x)}
).
Due to monotonicity, we only add vectors to the truth table of P, and since there are only
n
k
{\displaystyle n^{k}}
possible vectors we will always find a fixed point before
n
k
{\displaystyle n^{k}}
iterations. The Immerman-Vardi theorem, shown independently by Immerman and Vardi, 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.
Inflationary fixed-point logic
Another way to ensure the monotonicity of the fixed-point construction is by only adding new tuples to
P
{\displaystyle P}
at every stage of iteration, without removing tuples for which
P
{\displaystyle P}
no longer holds. Formally, we define
IFP
(
ϕ
P
,
x
)
{\displaystyle \operatorname {IFP} (\phi _{P,x})}
as
PFP
(
ψ
P
,
x
)
{\displaystyle \operatorname {PFP} (\psi _{P,x})}
where
ψ
(
P
,
x
)
=
ϕ
(
P
,
x
)
∨
P
(
x
)
{\displaystyle \psi (P,x)=\phi (P,x)\vee P(x)}
.
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.
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.
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
TC
{\displaystyle \operatorname {TC} }
used to form formulas of the form
[
TC
x
→
,
y
→
φ
]
s
→
t
→
{\displaystyle [\operatorname {TC} _{{\vec {x}},{\vec {y}}}\varphi ]{\vec {s}}{\vec {t}}}
, where
x
→
{\displaystyle {\vec {x}}}
and
y
→
{\displaystyle {\vec {y}}}
are tuples of pairwise distinct first-order variables,
t
→
{\displaystyle {\vec {t}}}
and
s
→
{\displaystyle {\vec {s}}}
tuples of terms and the lengths of
x
→
{\displaystyle {\vec {x}}}
,
y
→
{\displaystyle {\vec {y}}}
,
s
→
{\displaystyle {\vec {s}}}
and
t
→
{\displaystyle {\vec {t}}}
coincide.
TC is defined as follows: Let k be a positive integer and
u
,
v
,
x
,
y
{\displaystyle u,v,x,y}
be vectors of k variables. Then
T
C
(
ϕ
u
,
v
)
(
x
,
y
)
{\displaystyle {\mathsf {TC}}(\phi _{u,v})(x,y)}
is true if there exist n vectors of variables
(
z
i
)
{\displaystyle (z_{i})}
such that
z
1
=
x
,
z
n
=
y
{\displaystyle z_{1}=x,z_{n}=y}
, and for all
i
<
n
{\displaystyle i
,
ϕ
(
z
i
,
z
i
+
1
)
{\displaystyle \phi (z_{i},z_{i+1})}
is true. Here, φ is a formula written in FO(TC) and
ϕ
(
x
,
y
)
{\displaystyle \phi (x,y)}
means that the variables u and v are replaced by x and y.
Over ordered structures, FO[TC] characterises the complexity class NL. This characterisation is a crucial part of Immerman's proof that NL is closed under complement (NL = co-NL).
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
DTC
(
ϕ
u
,
v
)
{\displaystyle \operatorname {DTC} (\phi _{u,v})}
, we know that for all u, there exists at most one v such that
ϕ
(
u
,
v
)
{\displaystyle \phi (u,v)}
.
We can suppose that
DTC
(
ϕ
u
,
v
)
{\displaystyle \operatorname {DTC} (\phi _{u,v})}
is syntactic sugar for
TC
(
ψ
u
,
v
)
{\displaystyle \operatorname {TC} (\psi _{u,v})}
where
ψ
(
u
,
v
)
=
ϕ
(
u
,
v
)
∧
∀
x
(
x
=
v
∨
¬
ϕ
(
u
,
x
)
)
{\displaystyle \psi (u,v)=\phi (u,v)\wedge \forall x(x=v\vee \neg \phi (u,x))}
.
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,
F
O
[
t
(
n
)
]
{\displaystyle {\mathsf {FO}}[t(n)]}
; here
t
(
n
)
{\displaystyle t(n)}
is a (class of) functions from integers to integers, and for different classes of functions
t
(
n
)
{\displaystyle t(n)}
we will obtain different complexity classes
F
O
[
t
(
n
)
]
{\displaystyle {\mathsf {FO}}[t(n)]}
.
In this section we will write
(
∀
x
P
)
Q
{\displaystyle (\forall xP)Q}
to mean
(
∀
x
(
P
⇒
Q
)
)
{\displaystyle (\forall x(P\Rightarrow Q))}
and
(
∃
x
P
)
Q
{\displaystyle (\exists xP)Q}
to mean
(
∃
x
(
P
∧
Q
)
)
{\displaystyle (\exists x(P\wedge Q))}
. We first need to define quantifier blocks (QB), a quantifier block is a list
(
Q
1
x
1
,
ϕ
1
)
.
.
.
(
Q
k
x
k
,
ϕ
k
)
{\displaystyle (Q_{1}x_{1},\phi _{1})...(Q_{k}x_{k},\phi _{k})}
where the
ϕ
i
{\displaystyle \phi _{i}}
s are quantifier-free FO-formulae and
Q
i
{\displaystyle Q_{i}}
s are either
∀
{\displaystyle \forall }
or
∃
{\displaystyle \exists }
. If Q is a quantifiers block then we will call
[
Q
]
t
(
n
)
{\displaystyle [Q]^{t(n)}}
the iteration operator, which is defined as Q written
t
(
n
)
{\displaystyle t(n)}
time. One should pay attention that here there are
k
∗
t
(
n
)
{\displaystyle k*t(n)}
quantifiers in the list, but only k variables and each of those variable are used
t
(
n
)
{\displaystyle t(n)}
times.
We can now define
F
O
[
t
(
n
)
]
{\displaystyle {\mathsf {FO}}[t(n)]}
to be the FO-formulae with an iteration operator whose exponent is in the class
t
(
n
)
{\displaystyle t(n)}
, and we obtain the following equalities:
F
O
[
(
log
n
)
i
]
{\displaystyle {\mathsf {FO}}[(\log n)^{i}]}
is equal to FO-uniform ACi, and in fact
F
O
[
t
(
n
)
]
{\displaystyle {\mathsf {FO}}[t(n)]}
is FO-uniform AC of depth
t
(
n
)
{\displaystyle t(n)}
.
F
O
[
(
log
n
)
O
(
1
)
]
{\displaystyle {\mathsf {FO}}[(\log n)^{O(1)}]}
is equal to NC.
F
O
[
n
O
(
1
)
]
{\displaystyle {\mathsf {FO}}[n^{O(1)}]}
is equal to PTIME. It is also another way to write FO(IFP).
F
O
[
2
n
O
(
1
)
]
{\displaystyle {\mathsf {FO}}[2^{n^{O(1)}}]}
is equal to PSPACE. It is also another way to write FO(PFP).
Notes
References
Ebbinghaus, Heinz-Dieter; Flum, Jörg (1999). Finite Model Theory. Perspectives in Mathematical Logic (2 ed.). Springer. doi:10.1007/978-3-662-03182-7. ISBN 978-3-662-03184-1.
Neil, Immerman (1999). Descriptive complexity. Springer. ISBN 0-387-98600-6. OCLC 901297152.
Kata Kunci Pencarian:
- Arsitektur ARM
- Protokol kriptografi
- Salafiyah
- Logika pemrograman
- Fixed-point logic
- Fixed point (mathematics)
- Fixed-point combinator
- Descriptive complexity theory
- Least fixed point
- Fixed-point theorem
- Logic of graphs
- Fixed-point arithmetic
- Modal μ-calculus
- Brouwer fixed-point theorem