On equivalence of PFP-operator and PFP-quantifier

In this paper we consider two different logic languages. Both of them are extensions of first order logic. The first semantics is obtained by adding a partial fixed point operator. The second semantics is based on considering a partial fixed point as a non-standard quantifier. For this two semantics we demonstrate that they have an equal expressive power. For this purpose we show how to express an arbitrary formula of one logic with a formula of another.


Introduction
The theory of logic languages is a field of mathematical logic. Various methods of mathematical logic are widely used to investigate problems of computer sciences. The field of logic languages is one of the most tightly related to computer sciences. For example, logic languages are used in database theory. They are used to extracting information from databases. The typical database model is a relational one. This model was proposed by E. Codd in [1]. Let us note that first order logic does not allow to express many simple properties, which have large practical value (see [2]). The transitive closure is a such one. Note that the transitive closure is a formalization of many practically important problems. For example: is there a path between two different points? Consequently, the impossibility of the transitive closure expression is a significant lack of first order logic.
For this reason first order logic and its various extensions are permanently studied. For example, in the article [3] a fragment of fixed point logic with counting is studied that only allows polylogarithmically many iterations of the fixed point operators. Fixed point operators are among the most common extensions of first order logic. There are several types of such operators: inflationary fixed point, least fixed point, and partial fixed point. The most common of these operators is the partial fixed point operator (PFP-operator). Note that this operator was proposed by Y. Gurevich and S. Shelah in the work [4]. The book [5] contains a detailed description of PFP-operator properties for finite structures. The partial fixed point logic captures the class of PSPACE queries over an arbitrary finite structure. In the article [6] the authors introduce a variant of index logic with partial fixed point operators. There was proved this logic captures the complexity class of polylogarithmic space. So, the partial fixed point logic is actively investigated. In the current paper we continue to study the expressive capabilities of the partial fixed point operator. This investigation is begun in the works [7] and [8].
Elements of any real database are elements of some universe. Such a universe can be numbers, strings, etc. Let us note that database operations can be performed not only on elements of the database itself but also on arbitrary elements of the universe. Such operations can also increase the expressiveness of the first order language, but only slightly (see [9] 2 database query execution plan may contain an evaluation of a partial fixed point operator for an infinite structure. So, it is necessary to define fixed point operators over infinite structures. The definitions of the inflationary fixed point and the least fixed point operators can be generalized to the infinite structures without any difficulties (see [10]). But for the PFP-operator there are various non-equivalent generalizations.
Several natural semantics were introduced for partial fixed point over infinite structures. For instance, it was done in the works [11,8]. Constructing a partial fixed point operator we obtain a sequence of sets. The semantics differ in how this sequence is used. One of this semantics assumes the formula to be true for a given tuple if and only if almost all sets in the sequence contain this tuple. The second semantics assumes the formula to be true if and only if this tuple belongs to sets from the sequence infinitely often. In [8] we have established that both semantics have the same expressive power.
In the current paper we introduce another way to use partial fixed point. We consider the sequence of sets as the non-standard quantifier (PFP-quantifier). The question appears: how do this semantic relate to the previous ones. To answer this question we express formulas of different PFP-logic through each other. Our main result is the next. Logics expanded with the PFP-operator and with the PFP-quantifier have the same expressive power.

Definitions and main result
The basic definitions of partial fixed point logic can be found in [5].
Let us denote by ϕ(x) the formula ϕ with free variablesx. Let us denote by (ψ) t s the formula that obtained from the formula ψ by replacing each occurrence of the subformula t with the subformula s.
First, we give definitions of the partial fixed point operator syntax.
Definition 1 (see [5]). A partial fixed point logic formula is defined like a first order logic formula and with the partial fixed point operator PFP. Let ϕ(x,ȳ) be a formula that contains a non-language predicate symbol Q. Here a length ofȳ must be equal to the arity of Q. Then, PFP Q(ȳ) (ϕ) is a formula of an original language, this formula also contains two tuples of free variablesx andȳ.
Now we define the value of a partial fixed point operator over finite structures.
Definition 2 (see [5]). Let A be a structure, ϕ(x,ȳ) be a formula that contains a new predicate symbol Q, wherex andȳ are tuples of variables. Let us fix values of the variablesx asd ∈ |A|. The value of the formula PFP Q(ȳ) (ϕ) is defined as it is described in the following. Let us construct the sequence of sets The steps of this sequence construction is called Q-steps. The value of partial fixed point is ∅ if Qd n = Qd n+1 for all n.
Consider an example of the partial fixed point operator.
Example 1. Let us consider the finite graph G = (V, E), where V is a set of vertices of the graph G and E is a set of edges. We consider this graph G as a structure, where V is the domain and E (2) is the unique binary predicate symbol. The formula E(x, y) means that there is an edge At the first step the predicate Q contains only the vertex v, that is Q 1 = {v}. For all following steps the equality holds. It means that the predicate Q i+1 contains a vertex x if and only if the vertex x belongs to the set Q i or there is an edge to the vertex x from some vertex that belongs to the set Q i . Therefore, the predicate Q i+1 contains vertices that is reachable from the vertex v in no more than i steps.
Now we show how to generalize Definition 2 to infinite structures. There are several inequivalent semantics of partial fixed point for infinite structures. We define three of them below. First and second of these semantics was proposed in [8].
Definition 3 (see [8]). Let A be a structure and ϕ(x,ȳ) be a formula that contains a new predicate symbol Q. The length of tupleȳ must be equal to the arity of Q. Let us fix values of the variablesx asd ∈ |A|. Let the sequence of sets Qd i be constructed as in Definition 2.
Then, the value of the partial fixed point PFP ∀ is the following set Qd ∀ . A tupleȳ belongs to the set Qd ∀ if and only if the formula Q j (ȳ) is true for almost every j. In the other words, there is some natural number i such that the formula Q j (ȳ) is true for all natural numbers j > i. Therefore, for theseȳ the formula Now we give an example of the PFP ∀ -operator.
Example 2. Let us consider a theory of one successor. We consider the structure, where the domain is the set of integers, and there is the unique unary functional symbol s (1) that means the increment. Then, the formula PFP ∀ Only the vertex v belong to the predicate Q at the first step, that is Q 1 = {v}. For all following steps the equality holds. It means that the predicate Q i+1 contains a number x if and only if the number x belongs to the set Q i or x is greater by one than some number of the set Q i . Therefore, the predicate Now we give a definition of second semantics of partial fixed point.
Definition 4 (see [8]). Let A be a structure and ϕ(x,ȳ) be a formula that contains a new predicate symbol Q. The length of the tupleȳ must be equal to the arity of Q. Let us fix values of the variablesx asd ∈ |A|. Let the sequence of sets Qd i be constructed as in Definition 2.
The value of the partial fixed point PFP ∃ is the following set Qd ∃ . A tupleȳ belongs to the set Qd ∃ if and only if the tupleȳ belongs to sets Qd i infinitely often. That is, there are infinitely many i such that the formula Qd i (ȳ) is true. Therefore, for theseȳ the formula PFP ∃ Q(ȳ) (ϕ)(d,ȳ) is true.
Consider an example of using the PFP ∃ -operator.
At the first step the predicate Q contains only the tuple (a, v), that is Q 1 = {(a, v)}. For all following steps the equality holds. It means that the predicate Q i+1 contains a tuple (a, x) if and only if there is an edge to x from some vertex u that the tuple (a, u) belongs to Q i . If there is no such vertex, then the equality In the previous article [8] we demonstrate that PFP ∀ -logic and PFP ∃ -logic have the same expressive power.
In the definition of the value of a partial fixed point operator (Definition 2) we obtain the sequence of sets (1). This sequence of sets can be used to construct a non-standard quantifier. We first define the syntax of a PFP-quantifier.
Definition 5. The formula of PFP-quantifier logic is defined by induction similar to the first order logic formula and with an additional rule for induction step. Let ϕ(x,ȳ) be a formula with two tuples of free variablesx andȳ, ψ(x,ȳ) be a formula with the same two tuples of free variables and with a non-language predicate symbol Q. In this case, the length ofȳ must be equal to the arity of Q. Then, PFP Q(ȳ) (ψ) ϕ is also a formula of the original language. This formula contains free variablesx, the variablesȳ become bounded.
We now describe how to define the value of partial fixed point quantifier.
Definition 6. Let A be a structure, ψ(x,ȳ) and ϕ(x,ȳ) be formulas. Here the formula ψ contains a new predicate symbol Q. The length of the tupleȳ must be equal to the arity of Q. Let us fix values of the variablesx asd ∈ |A|. Let the sequence of sets Qd i be constructed as in Definition 2. The Consider an example of using the PFP-quantifier.
holds. It means that the predicate Q i+1 contains a vertex x if and only if there is an edge to x from some vertex that belongs to the set Q i . Therefore, the predicate Q i+1 contains vertices that is reachable from the vertex v in i steps exactly. If at some step there is no vertex in Q i , then the process starts again.
Our main result is the next theorem.
Theorem 1. PFP ∀ -logic and PFP-quantifier logic have the same expressive power.
Proof. The proof of this theorem follows directly by Theorem 2 and Theorem 5.

Definition PFP-quantifier formula by PFP ∀ -operator
The main result of this part of the article is that by given a PFP-quantifier formula we can construct an equivalent PFP ∀ -logic formula.
Theorem 2. Let ϕ(x,ȳ) and ψ(x,ȳ) be arbitrary formulas, where the formula ψ contains the predicate symbol Q, and a length of the tupleȳ is the arity of Q. Then, the formula is equivalent to the formula The formula θ(u, a, b,ȳ) is constructed below.
We introduce a new predicate symbol P . The arity of the predicate P is w + 1, where w is the arity of the predicate Q. Let u, a, b be new variables, and ψ P (a,ȳ) ≡ (ψ) Here in the formula ψ we replace each occurrence Q(t) with P (a,t) for all tuplest. The predicate P is used to construct the predicate Q with the first argument taking one of the values a, b in turn.
We define an auxiliary formula η as The formula η means that constructing P we obtain the set described by the formula ϕ. Therefore, the formula θ is Note that conditions of the implications (4)-(6) are pairwise incompatible.
To establish Theorem 2 we prove auxiliary lemmas. In the first lemma we consider the case when the formula η is true at some P -step. In the second lemma we consider the case when there is no such P -step. Lemma 3. Let i 0 be the least P -step number such that the formula η is true. Then, constructing PFP Q(ȳ) (ψ) and PFP ∀ P (u,ȳ) (θ) for all tuplesȳ and any natural number i ≤ i 0 the following statements hold: ȳ) and ¬P i (a,ȳ) for even i.
Proof. We use induction on i.
For i = 0 the equalities P 0 = ∅ and Q 0 = ∅ hold. Hence, the formula P i (b,ȳ) is true if and only if the formula Q i (ȳ) is true for all tuplesȳ.
Suppose the lemma holds for i, and i + 1 ≤ i 0 . Since i 0 is the least step number such that the formula η is true, the formula ¬η is true at all previous steps including i (the previous step). There are two cases to consider: i + 1 is odd and it is even.
Let i + 1 be an odd number. Then, i is an even number. Hence, by induction we have that the statement (ii) holds. So, we can use the implication (4) and for all tuplesȳ we have that the formula P i+1 (b,ȳ) is false and Here the equivalence (a) is satisfied by the definition of the PFP ∀ -operator, and the equivalence (b) is satisfied by the definition of ψ P and induction. The equivalence (c) is satisfied by the definition of the PFP-quantifier. Hence, for all tuplesȳ the equivalence Q i (ȳ) ≡ P i (a,ȳ) holds and the formula P i (b,ȳ) is false. Therefore, the lemma holds for i + 1, where i + 1 is an odd number.
Let i + 1 be an even number. Then, i is an odd number. Hence, by induction we have that the statement (i) holds. So, we can use the implication (5) and for all tuplesȳ we have that the formula P i+1 (b,ȳ) is false and Here the equivalences are satisfied similar to the previous case. Hence, for all tuplesȳ the equivalence Q i (ȳ) ≡ P i (b,ȳ) holds and the formula P i (a,ȳ) is false. Therefore, the lemma holds for i + 1, where i + 1 is an even number. Lemma 4. Let us suppose that there is no i 0 such that the formula η is true. Then, constructing PFP Q(ȳ) (ψ) and PFP ∀ P (u,ȳ) (θ) for all tuplesȳ and any natural number i the following statements hold at any P -step: ȳ) and ¬P i (a,ȳ) for even i.
Proof. In this case the reasoning of the previous lemma proof can be continued infinitely. Therefore, the statements hold for all natural numbers.
Proof of Theorem 2. It is necessary to consider two cases: the formula [PFP Q(ȳ) (ψ)]ϕ is true and it is not true.
Consider the first case, where the formula [PFP Q(ȳ) (ψ)]ϕ is true. Then, by the PFP-quantifier definition there is the least natural number i 0 such that Hence, the formula (∀ȳ)(ϕ(ȳ) ↔ Q(ȳ)) is true at this step. By Lemma 3 the formula η is true at step i 0 . Thus, if the step number is odd, then by the implication (6) +1 (a,ȳ) is satisfied if and only if the formula P i 0 (a,ȳ) is true. Otherwise, if the step number is even, then the formula P i 0 +1 (a,ȳ) is satisfied if and only if the formula P i 0 (b,ȳ) is true. Then, the equivalence P j ≡ P i 0 +1 holds for all j ≥ i 0 + 1. Hence, by the definition of the PFP ∀ -operator the next formula is true Therefore, the formula (3) is true in this case. Consider the second case, where the formula [PFP Q(ȳ) (ψ)]ϕ is false. Then, by the PFPquantifier definition there is no natural number i 0 such that the equivalence is true. Hence, the formula η is not satisfied at any P -step. So, by Lemma 4 there is no natural number j such that the sets P j and P j+1 intersect because the variables a, b are interleaved. Then, from the definition of PFP ∀ -operator and the construction of the formula θ it follows that the value of the operator PFP ∀ P (u,ȳ) (θ) is empty set. Therefore, the formula (3) is false in this case.

Definition PFP ∀ -operator formula by PFP-quantifier
In this section of the article we prove the theorem that is opposite to the previous one.
Theorem 5. Let ϕ(x,ȳ) be an arbitrary formula, where the formula ϕ contains the predicate symbol Q, and a length of the tupleȳ is the arity of Q. Then, the formula is equivalent to the formula (∃a, b, c) PFP P (u,z) (θ 1 ) (u = c).
We introduce new predicate symbols P and R. The arity of the predicate P and the predicate R is w + 1, where w is the arity of Q. Let u, a, b, c, and e be new variables, and ϕ P (a,ȳ) ≡ (ϕ) Here the formula ϕ P are obtained from ϕ by replacing each occurrence Q(t) with P (a,t) for all tuplest. And the formula ϕ R are obtained from ϕ by replacing each occurrence Q(t) with R(a,t) for all tuplest.
Note that the conditions of the implications (9)-(12) are pairwise incompatible and the conditions of the implications (13)-(16) are pairwise incompatible.
The first argument of the predicate P is used as follows: • P j (a,z) is equivalent to some Q i (z), • P i (b,z) means that constructing P we have reached a step such that P i−1 (a,ȳ) is satisfied in the previous P -step, • P i (c,z) means that constructing P after the step described in the previous item we have reached a step such that the formula [PFP R(u,z) (θ 2 )](u = c) is true.
The first argument of the predicate R is used as follows: • R i (a,z) is equivalent to Q i (z), • R i (b,z) means that during the construction of R we have reached the R-step such that the value of R coincides with the value of P , • R i (c,z) means that constructing R after the step described in the previous item we reached step with number i − 1 such that the formula R i−1 (a,ȳ) is false.
The formula [PFP R(u,z) (θ 2 )](u = c) means that in the construction of the predicate R we have reached the two next R-steps.
(i) The first step is such that the value of the predicate R is equal to the current value of the predicate P . (ii) The second step, which is after the first one, is such that the formula R(a,ȳ) is not true.
Let us suppose that i 0 is the least number of the R-step such that it is equal or greater than number of the step (i), and the formula Q i 0 (ȳ) is false. That means the step (ii) is reached firstly. Then the equivalence R i (a,z) ≡ Q i (z) is satisfied for allz and for all i ≤ i 0 .
If such i 0 doesn't exist, then the previous claim holds for all i.
Proof. We use induction on i. For i = 0 the equalities R 0 = ∅ and Q 0 = ∅ hold. Hence, the formula Q i (z) is true if and only if the formula R i (a,z) is true for all tuplesz. Suppose the lemma holds for i. It means that there is a corresponding natural number j i . Let us prove our claim for the Q-step i + 1 ≤ i 0 . At the P -step j i the conditions of the implications (13), (14), or (15) may be satisfied. The implication condition (16) cannot be satisfied since this contradicts to the inequality i + 1 ≤ i 0 . In all cases we have Here the equivalence (a) is satisfied by the definition of the PFP-quantifier and the equivalence (b) is satisfied by the definition of ϕ P and induction. The equivalence (c) is satisfied by the definition of the PFP ∀ -operator. Therefore, the equivalence R i+1 (a,z) ≡ Q i+1 (z) is satisfied for all tuplesz and for all natural numbers i ≤ i 0 . Let us suppose that i 0 is the least number of the Q-step after which the tupleȳ never disappears from the predicate Q. Then, for all natural numbers i ≤ i 0 there is a natural number j i such that the equivalence P j i (a,z) ≡ Q i (z) is true for all tuplesz. And vice versa, for each j ≤ j i 0 there exists i such that j = j i .
If such i 0 doesn't exist, then the previous claim holds for all i.
Proof. We use induction on i. For i = 0 the equality Q 0 = ∅ holds, and there is j i = 0 such that P j 0 = ∅. Hence, the formula Q i (z) is true if and only if the formula P j i (a,z) is true for all tuplesz.
Suppose the lemma holds for i. It means that there is a corresponding natural number j i . Let us prove our claim for the Q-step i + 1 ≤ i 0 . By Lemma 6 we have P j i (a,z) ≡ Q i (z) ≡ R i (a,z). Due to the inequality i + 1 ≤ i 0 there exists i > i such that the formula Q i (ȳ) is false. By Corollary 7 the formula [PFP R(u,z) (θ 2 )](u = c) is true. So, the implication condition (12) cannot be satisfied. Thus, the P -step j i the conditions of the implications (9), (10), and (11) may be satisfied. If one of the conditions (9), (11) is satisfied, then there exists the required j i+1 equal to j i + 1 since Here the equivalence (a) is satisfied by the definition of the PFP-quantifier and the equivalence (b) is satisfied by the definition of ϕ P and induction. The equivalence (c) is satisfied by the definition of the PFP ∀ -operator. If the condition (10) is satisfied, then the formula P j i +1 (b,z) is true for all tuplesz. In addition, the formula P j i +1 (a,z) is satisfied if and only if the formula P j i (a,z) is true. Such a P -step cannot be performed more than once since it adds tuples of the form (b,z) to the predicate P . Hence, the next P -step is (11) or (12). The first case was analyzed above and then we get j i+1 = j i + 2. The second case is impossible as we have noted earlier.
Proof of Theorem 5. It is necessary to consider two cases: the formula PFP ∀ Q(ȳ) (ϕ)(ȳ) is true and it is not true.
Consider the first case, where the formula PFP ∀ Q(ȳ) (ϕ)(ȳ) is satisfied. Then, by the definition of the PFP ∀ -operator there is a natural number i 0 such that the formula Q i (ȳ) is satisfied for all i ≥ i 0 . According to Lemma 8 there is a natural number j such that the formula P j (a,z) is true if and only if the formula Q i 0 (z) is true.
By Lemma 6 the tuples of the form (b,z) are added to the predicate R at R-step i 0 , that is, the formula R i 0 (a,z) is true if and only if the formula Q i 0 (z) is satisfied. The formula 10 Q i 0 (z) is true if and only if the formula P j (a,z) is satisfied. At all R-steps those numbers are equal or greater than i 0 the formula R(a,ȳ) is true by Lemma 6. By Corollary 7 the formula [PFP R(u,z) (θ 2 )](u = c) is not true. Hence, the implication condition (12) is satisfied. Therefore, the formula (8) is true.
Consider the second case, where the formula PFP ∀ Q(ȳ) (ϕ)(ȳ) is not satisfied. Hence, by the definition of PFP ∀ -operator there is no natural number i 0 such that the formula Q i (ȳ) is satisfied for all natural numbers i ≥ i 0 . Then, it is necessary to consider two subcases: there is no Qstep such that the predicate Q i containsȳ and this Q-step exists. In the first subcase by the implication (10) the predicate P never contains tuples of the form (b,z). Hence, the implication condition (12) is not true. Therefore, the formula (8) is not satisfied. In the second subcase the formula [PFP R(u,z) (θ 2 )](u = c) is always true because necessarily there exists a step such that the tupleȳ disappears. Hence, the premise of the implication (12) is never true. Therefore, the formula (8) is not satisfied.

Conclusion
We have demonstrated that the expansion of first order logic with PFP-operator and PFPquantifier lead to the same expressive power. We are interesting in the following questions: • To search for other natural semantics of partial fixed point.
• When PFP ∀ -operator and PFP-quantifier are expressed through each other, their arity increases. It is known that unary and binary operators of inflationary fixed point have different properties [12]. Hence, the question appears is it possible to express PFP ∀ -operator and PFP-quantifier through each other without increasing the arity. • When expressing the PFP ∀ -operator in terms of the PFP-quantifier in Theorem 5, nested PFP-quantifiers used. It is of interest to investigate the possibility of such expressing without nested PFP-quantifiers.