Existential second-order Horn logic #
An SO∃-Horn sentence ∃ R₁ … Rₖ, ⋀ᵢ ∀ x̄ᵢ, Cᵢ existentially quantifies finitely many relation
variables over a conjunction of universally closed clauses. Each clause has the form
guard ∧ Rⱼ₁(ȳ₁) ∧ … ∧ Rⱼₘ(ȳₘ) → head. Here guard is a formula of the base vocabulary,
the body atoms apply relation variables to clause variables, and head is either one such
atom (a definite clause) or ⊥ (a goal clause). The Horn restriction applies only to the
quantified relation variables: base-vocabulary symbols occur in the guard with either sign.
Grädel's textbook definition allows arbitrary first-order guards. His original paper allows only
input literals in clause bodies, and the two variants are equivalent on ordered structures with
successor and endpoint constants [Gradel2007, Exercise 3.2.20]. Sentence.IsQF is the
quantifier-free restriction: a quantifier-free guard in disjunctive normal form splits a clause
into finitely many clauses whose guards are conjunctions of literals.
The least relations closed under the definite clauses form a sentence's least model. A
sentence holds exactly when its least model satisfies its goal clauses. Truth therefore comes
from one canonical least fixed point, with no search over relations. toESO maps the syntax
into ordinary existential second-order logic and preserves truth.
Main definitions #
Cslib.Logic.ESO.Horn.Atom,Cslib.Logic.ESO.Horn.Clause,Cslib.Logic.ESO.Horn.Sentence: relation-variable atoms, guarded Horn clauses and SO∃-Horn sentences.Cslib.Logic.ESO.Horn.Sentence.Realize,Cslib.Logic.ESO.Horn.Sentence.IsQF: truth and Grädel's quantifier-free restriction.Cslib.Logic.ESO.Horn.Sentence.consequence,Cslib.Logic.ESO.Horn.Sentence.leastModel: the immediate-consequence operator of the definite clauses and its least fixed point.Cslib.Logic.ESO.Horn.Sentence.mapGuards,Cslib.Logic.ESO.Horn.Sentence.toESO: guard translation and the existential second-order sentence with the same meaning.
Main results #
Cslib.Logic.ESO.Horn.Sentence.realize_iff_leastModel: truth is decided by the least model.Cslib.Logic.ESO.Horn.Sentence.closed_iff_consequence_le: closed relations are exactly the pre-fixed points of the immediate-consequence operator.Cslib.Logic.ESO.Horn.Sentence.realize_toESO: SO∃-Horn is a fragment of SO∃.Cslib.Logic.ESO.Horn.Sentence.realize_mapGuards: truth-preserving guard translation.
References #
- E. Grädel, Finite Model Theory and Descriptive Complexity, §3.2.3: Definition 3.2.12 (p. 145) for SO-HORN and its existential fragment Σ¹₁-HORN, and Exercise 3.2.20 (p. 148) for the quantifier-free variant.
- E. Grädel, Capturing complexity classes by fragments of second-order logic, the original source of the second-order Horn characterization of P. Section and theorem locators are unverified.
Atoms and clauses #
A guarded Horn clause ∀ x̄, guard ∧ body → head. Its variables are Fin width. The guard is
a base-vocabulary formula; the head is one atom (a definite clause) or ⊥ (a goal clause).
- width : ℕ
The number of universally quantified variables.
The base-vocabulary guard.
The relation-variable atoms of the body.
A clause holds under relations R when every assignment satisfying its guard and body
satisfies its head; a goal clause forbids such assignments.
Replace the guard of a clause by its image under a formula translation.
A truth-preserving guard translation preserves clause truth.
Sentences #
An existential second-order Horn sentence: finitely many relation variables and a finite conjunction of guarded Horn clauses over them.
- Var : Type
The relation variables.
The arity of each relation variable.
The clauses.
An SO∃-Horn sentence holds in M when some relations satisfy all of its clauses.
Grädel's restriction: every guard is quantifier-free.
Translate every guard, keeping the relation variables and the Horn structure.
A truth-preserving guard translation preserves sentence truth.
The immediate-consequence operator of the definite clauses: one round of rule application.
A tuple is produced for a relation variable when some definite clause has it as an instance of
its head and its guard and body hold under R.
The least relations closed under the definite clauses: the least fixed point of the immediate-consequence operator.
Truth splits into closure under the definite clauses and consistency with the goal clauses.
Closure under the definite clauses is pre-fixedness for the immediate-consequence operator.
The least model is below every closed family of relations.
The least model is closed under the definite clauses.
Least-model semantics. An SO∃-Horn sentence holds exactly when the least relations closed under its definite clauses satisfy its goal clauses. Truth is therefore decided by one least fixed point, with no search over relations.
The embedding into existential second-order logic #
An atom as an atomic formula of the base vocabulary extended by the relation variables.
A clause as its universal closure ∀ x̄, guard ∧ body → head.
The existential second-order sentence with the same relation variables, whose matrix is the conjunction of the clause formulas.
The atomic formula of an atom holds exactly when the atom does.