Documentation

CslibFrontier.Logics.SecondOrder.Horn.Ordered

SO∃-Horn definability of ordered queries #

An ordered query is HornDefinable when one SO∃-Horn sentence with quantifier-free guards defines it on every canonical ordered structure. The guards are formulas of the ordered vocabulary extended by a primitive successor, language (succLanguage L): they may use the input relations, =, ≤, BIT, successor and the constants 0, 1 and max.

Grädel's characterization of polynomial time by SO∃-Horn logic is stated for structures with successor. Successor must be primitive in the quantifier-free syntax because from ≤ alone, y = x + 1 needs the universal quantifier of Cslib.Logic.FO.Ordered.successor. Conversely, Cslib.Logic.ESO.Horn.Sentence.elimGuards eliminates first-order quantifiers from guards over language (succLanguage L) by iterating universal quantifiers along successor from 0 to max. Combining guard elimination with Cslib.Logic.FO.Ordered.elimSucc shows that HornDefinable coincides with definability by an SO∃-Horn sentence over language L with arbitrary first-order guards (hornDefinable_iff_exists_sentence). Quantifier-free SO∃-Horn over ≤ and BIT without successor is a weaker syntactic fragment and is not used as the definition of HornDefinable.

Every SO∃-Horn sentence is equivalent to one FO(LFP) sentence on canonical ordered structures, so HornDefinable queries are LFPDefinable. Successor is first removed from the guards with Cslib.Logic.FO.Ordered.elimSucc. The resulting guards are no longer quantifier-free, which the FO(LFP) translation allows. The translation packs the relation variables into one fixed point with one-hot tags. It takes the numeric constants 0 and 1 as the two distinct tag values, which exist because canonical ordered structures have at least two elements.

Main definitions #

Main results #

References #

Replace each successor atom in every guard by its first-order definition from ≤ (Cslib.Logic.FO.Ordered.elimSucc). Quantifier-free guards become guards with one universal quantifier per eliminated atom.

On canonical structures Fin n with 2 ≤ n, successor elimination preserves truth.

An ordered query is SO∃-Horn definable when one SO∃-Horn sentence with quantifier-free guards defines it on every canonical ordered structure. Guards are formulas of the ordered vocabulary with a primitive successor, as in Grädel's successor structures. Successor cannot be omitted: a quantifier-free guard over ≤ cannot express y = x + 1.

SO∃-Horn sentences define FO(LFP) queries. A query defined by an SO∃-Horn sentence over the ordered vocabulary is LFPDefinable. The guards may be arbitrary first-order formulas. The fixed-point translation uses the distinct constants 0 and 1 as its tag values.

A HornDefinable query is defined by an SO∃-Horn sentence over the ordered vocabulary, with successor eliminated from the guards.

Any ordered query defined by an SO∃-Horn sentence over language (succLanguage L) with arbitrary first-order guards is HornDefinable.

Any ordered query defined by an SO∃-Horn sentence over language L with arbitrary first-order guards is HornDefinable: guards lift along succInclusion L and quantifiers are eliminated along successor.

Ordered SO∃-Horn definability coincides with arbitrary-guard SO∃-Horn over language L. Combining successor elimination (elimSucc) with successor-iteration guard elimination (elimGuards) equates quantifier-free SO∃-Horn over language (succLanguage L) with arbitrary-guard SO∃-Horn over language L.

SO∃-Horn definable queries are FO(LFP) definable.