# Is there a logic without induction that captures much of P?

The Immerman-Vardi theorem states that PTIME (or P) is precisely the class of languages that can be described by a sentence of First-Order Logic together with a fixed-point operator, over the class of ordered structures. The fixed-point operator can be either least fixed-point (as considered by Immerman and by Vardi), or inflationary fixed-point. (Stephan Kreutzer, Expressive equivalence of least and inflationary fixed-point logic, Annals of Pure and Applied Logic 130 61–78, 2004).

Yuri Gurevich conjectured that there is no logic capturing PTIME (Logic and the Challenge of Computer Science, in Current Trends in Theoretical Computer Science, ed. Egon Boerger, 1–57, Computer Science Press, 1988), while Martin Grohe has stated he is less sure (The Quest for a Logic Capturing PTIME, FOCS 2008).

The fixed-point operator is meant to capture the power of recursion. Fixed-points are powerful, but it isn't obvious to me that they are necessary.

Is there an operator X that is not based on fixed-points, such that FOL+X captures a (large) fragment of PTIME?

Edit: As far as I understand, linear logic can only express statements about structures that have quite restrictive form. I would ideally like to see a reference to, or a sketch of, a logic that can express properties of arbitrary sets of relational structures, while still avoiding fixed points. If I am wrong about the expressive power of linear logic then a pointer or hint would be welcome.

• With "logic" I mean what Grohe means: a decidable set of sentences over the vocabulary, and a relation "is a model of" between finite structures and sentences, with the property that the set of models of a sentence is always closed under isomorphism. – András Salamon Sep 3 '10 at 8:29
• See also cstheory.stackexchange.com/questions/174/… for the question of whether there is a logic that captures PTIME. – András Salamon Sep 3 '10 at 8:41
• Linear logic is a propositional logic which contains classical propositional logic. It can be extended to allow quantifiers. But if I remember correctly the relation between linear logic (propositional) and complexity classes is different from what Grohe has in his mind, at least I don't see how to relate linear logic to queries over finite structures. – Kaveh Sep 27 '10 at 21:00
• There are set theories built on linear logic, such as Terui's Light Affine Set Theory, which have the property that a function can be proved total in it, if and only if the function is computable in polynomial time. See citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.99.730 – Neel Krishnaswami Oct 15 '10 at 12:06
• Kaveh, this is why I awarded the bounty to slimton. A more detailed answer would still be nice. – András Salamon Sep 27 '11 at 9:19

## 5 Answers

You want to have a look at what some people call Grädel's Theorem. You can find it in Papadimitriou's book "Computational Complexity" (it's Theorem 8.4 in page 176) or in Grädel's original paper.

In a nutshell, Grädel's Theorem is to P what Fagin's Theorem is to NP. It states that on the class of finite structures with a successor relation, the collection of polynomial-time decidable properties coincides with those expressible in the Horn-fragment of existential second-order logic. These are the sentences of second-order logic of the form $$(\exists R)(\forall x)(\phi)$$ where $R$ is a sequence of second-order relation variables, $x$ is a sequence of first-order variables, and $\phi$ is a quantifier-free formula that, when written in CNF form, is a conjunction of $R$-Horn clauses (i.e. clauses that have at most one non-negated atom involving the variables in $R$).

• Oops, now that I read your question again I realize that it is a bit different from the previous version. Now you ask for an operator X so that FOL+X captures a large fragment of P. In that case you should have a look at Dawar's <a href="logcom.oxfordjournals.org/content/5/2/…>. He shows that if there is a logic for P, then there is one by extending FOL with generalized quantifiers. – slimton Sep 27 '10 at 18:05
• I should add that the Horn-fragment of existential second-order logic on naked structures is rather weak: a proper subset of LFP on naked structures. We need the successor to get Grädel's theorem. Dawar's result is for naked structures. – slimton Sep 27 '10 at 18:07
As far as I understand, linear logic can only express statements about structures that have quite restrictive form. I would ideally like to see a reference to, or a sketch of, a logic that can express properties of arbitrary sets of relational structures, while still avoiding fixed points. If I am wrong about the expressive power of linear logic then a pointer or hint would be welcome.

This isn't right: all residuated commutative monoidal lattices are models of linear logic. Here's an easy way to create such a lattice from finite graphs. Start with the set

$$M = \{(g, n) \;|\; g\mbox{ is a finite graph and }n \subseteq \mathrm{nodes}(g)\}$$

So our forcing relation will be $(g,n) \models \phi$, and the intuition is that $n$ is the set of nodes "owned" by the formula $\phi$. There is a partial operation $(\cdot) : M \times M \to M$, defined as: $$(g,n) \cdot (g',n') = \left\{\begin{array}{ll} (g, n \uplus n') & \mbox{when } g = g' \land n \cap n' = \emptyset \\ \mathrm{undefined} & \mbox{otherwise} \end{array}\right.$$

This combines two elements by mergining their owned sets, if the graphs are equal and the owned sets are disjoint.

Now, we can give a model of linear logic as follows:

$$\begin{array}{lcl} (g,n) \models I & \iff & n = \emptyset \\ (g,n) \models \phi \otimes \psi & \iff & \exists n_1,n_2.\; n = n_1 \uplus n_2 \mbox{ and } (g,n_1) \models \phi \mbox{ and } (g,n_2) \models \psi \\ (g,n) \models \phi \multimap \psi & \iff & \forall n'.\; \mbox{if } n \cap n' = \emptyset \mbox{ and } (g,n') \models \phi \mbox{ then } (g,n \uplus n') \models \psi \\ (g, n) \models \top & \iff & \mbox{always} \\ (g,n) \models \phi \land \psi & \iff & (g,n) \models \phi \mbox{ and } (g,n) \models \psi \end{array}$$

This model is actually a variant of the ones used in separation logic, which is widely used in the verification of heap-manipulating programs. (If you like, think of the graph as the pointer structure of the heap, and the analogy is exact!)

This isn't really the right way to think about linear logic, though: its real intuitions are proof-theoretic, and the connection to complexity comes via the computational complexity of the cut-elimination theorem. The model theory of linear logic is the shadow cast by its proof theory.

• What role does the graph structure play in the above model? The above definition seems to work fine if we say that g ranges over the discrete graphs. – Charles Stewart Sep 26 '13 at 12:05
• Since any (partial) commutative monoid can be used to give a model of BI/linear logic, the graph structure is not used to interpret the $\otimes$ and $\multimap$ connectives -- it only matters for the atomic propositions. For example, in separation logic, there is a "points-to" atomic proposition $n \mapsto n'$, which we use the pointer structure to interpret. – Neel Krishnaswami Sep 26 '13 at 14:37

There are recent exciting results concerning the search for a logic capturing PTIME. The famous example by Cai, Fürer and Immerman showing that LFP+C does not capture PTIME was based on a seemingly artificial class of graphs, though. Of course, it was constructed for the particular task of demonstrating the restrictions of LFP+C. Only recently it was shown by Dawar that the class is not artificial at all. It can rather be seen as an example for the fact that LFP+C cannot solve linear equation systems!

Hence Dawar, Grohe, Holm and Laubner extended logics by operators from linear algebra, for example by an operator to define the rank of a definable matrix. The resulting logic LFP+rank can express strictly more than LFP+C, in fact, there is no known PTIME property that LFP+rank cannot express.

Even FO+rk is surprisingly powerful, it can express deterministic and symmetric transitive closure. It is still open whether it can express the general transitive closure of a graph.

• Note that Anderson/Dawar/Holm recently showed that FP+C can express linear programming (arxiv.org/abs/1304.6870). This undermines an interpretation of Dawar's earlier result along the lines of "FP+C cannot solve linear equation systems"; Dawar only claimed that some "natural problems involving systems of linear equations are not definable in this logic" with which he seems to have meant rank computations. – András Salamon Sep 25 '13 at 19:06

Depending on what you mean by "capture," Soft Linear Logic and Polynomial Time by Yves Lafont may be of interest. There is a 1-1 correspondence to proofs in this logic and PTIME algorithms that take a string as input and output 0 or 1.

The Wikipedia article on Linear Logic is here. It's not a fixpoint logic. The intuition of "classical logic over $C^*$ algebras instead of boolean algebras" is the easiest for me to grasp.

• I think András wants a logic in the sense of descriptive complexity. – Kaveh Sep 2 '10 at 15:46

Some older work on this problem, again in the Linear Logic vein is, Jean-Yves Girard, Andre Scedrov, and Philip Scott. Bounded linear logic: A modular approach to polynomial-time computability. Theoretical Computer Science, 97(1):1–66, 1992.

More recent work includes Bounded Linear Logic, Revisited by Ugo Dal Lago and Martin Hofmann.