Documentation

CslibFrontier.Computability.Complexity.Gradel

Grädel's characterization of polynomial time #

Grädel's theorem says that SO∃-Horn logic captures polynomial time on ordered structures with successor. On the library's canonically ordered finite structures (Fin n with n ≥ 2), this module proves the full equivalence between HornDefinable and native P over the source-only binary structure encoding encStructure:

It also places HornDefinable inside ordered ESO definability: the SO∃-Horn sentence translates into an existential second-order sentence with the same meaning (ESO.Horn.Sentence.toESO).

Main results #

References #

SO∃-Horn definable queries are in polynomial time. This is the upper bound of Grädel's theorem, for the existing source-only structure encoding.

Every native polynomial-time ordered query is SO∃-Horn definable. This is the converse direction of Grädel's theorem: the deterministic polynomial-time tableau is expressed as an SO∃-Horn sentence over Fin (M.size ^ k), pulled back along the full-tuple power interpretation, and lowered to quantifier-free guards over succLanguage L.

Grädel's theorem (SO∃-Horn = P): an ordered query is SO∃-Horn definable if and only if its source-only encoded language is decidable in native polynomial time.

A query defined by an SO∃-Horn sentence over the ordered vocabulary is ESO definable.

SO∃-Horn definability is a special case of ESO definability. Successor is eliminated from the guards first, so the ESO sentence uses only the ordered vocabulary.