Existential second-order Horn sentences as least fixed points #
Every SO∃-Horn sentence is equivalent to one FO(LFP) sentence over the same base vocabulary,
uniformly over all structures in which two closed terms c₀ and c₁ denote distinct elements.
The construction is the classical simultaneous-induction argument, specialized to Horn programs.
The least model of the definite clauses is the least fixed point of their immediate-consequence
operator (ESO.Horn.Sentence.leastModel). The finitely many relation variables, of possibly
different arities, are packed into a single fixed-point relation. A tuple x for the relation
variable i becomes a tagged tuple of width t + a, where t enumerates the relation
variables and a bounds their arities: a one-hot tag (c₁ in coordinate i, c₀ elsewhere)
followed by x, padded with c₀. Distinctness of c₀ and c₁ makes the tagging injective,
and Mathlib's rolling rule for least fixed points (OrderHom.map_lfp_comp) identifies the packed
least fixed point with the tagged least model. Goal clauses are then checked outside the
fixed-point binder, as allowed by ESO.Horn.Sentence.realize_iff_leastModel.
The translation needs no restriction on the guards: they are carried over as first-order subformulas.
Main results #
Cslib.Logic.ESO.Horn.Sentence.exists_lfp_realize_iff: every SO∃-Horn sentence has an equivalent FO(LFP) sentence on all structures wherec₀andc₁are distinct.
References #
- E. Grädel, Finite Model Theory and Descriptive Complexity, Theorem 3.2.17 (pp. 147–148), for the upper bound of the SO∃-Horn characterization of polynomial time. The textbook proof grounds the sentence to a propositional Horn formula; this module instead goes through FO(LFP), which reuses the library's native FO(LFP) model checker.
- E. Grädel, Capturing complexity classes by fragments of second-order logic, the original source. Section and theorem locators are unverified.
- N. Immerman, Descriptive Complexity, Chapter 4, for FO(LFP) and simultaneous inductions.
Packing several relations into one tagged relation #
Definability of the packed operator #
The equivalent FO(LFP) sentence #
SO∃-Horn sentences are FO(LFP) sentences. For closed terms c₀ and c₁ of the base
vocabulary, one checked FO(LFP) sentence is equivalent to Φ on every structure in which c₀ and
c₁ denote distinct elements. Two distinct elements are needed for the one-hot tags that pack
the relation variables into a single fixed point; on the canonical ordered structures, which
have at least two elements, the numeric constants 0 and 1 serve.