Existential projection of relation variables and guessed linear orders #
Existential second-order sentences are closed under existentially quantifying additional relation
variables: an existential second-order sentence Φ over L.sum (varLanguage ar₀) projects to an
existential second-order sentence Φ.project over L whose relation variables are ι₀ ⊕ Φ.Var,
holding in M iff some interpretation of ar₀ on M makes Φ hold (Sentence.realize_project).
In descriptive complexity on unordered structures, a standard application of Sentence.project is
guessing an arbitrary strict linear order on a finite domain Fagin, Proof of Theorem 6,
Immerman, Proof of Theorem 7.8. The language orderLanguage has a single binary
relation symbol ltSym, constrained by isStrictLinearOrderSentence to be irreflexive, transitive,
and trichotomous. On a finite structure M, the expansions satisfying isStrictLinearOrderSentence
are precisely the linear orders orderRelOfEquiv e induced by bijections e : M ≃ Fin (Nat.card M)
(realize_isStrictLinearOrderSentence).
Implementation notes #
orderLanguage is defined as varLanguage (fun _ : Unit => 2) (with strict < symbol ltSym and
isStrictLinearOrderSentence) rather than Mathlib's Language.order for two reasons:
- Existential second-order quantification (
ESO.SentenceandESO.Sentence.project) quantifies over relation blocks of the formvarLanguage arityadjoined viaLanguage.sum. DefiningorderLanguagedirectly asvarLanguage (fun _ : Unit => 2)makesSentence.withLinearOrderan immediate instance ofSentence.project. - Mathlib's
Language.orderrepresents a weak order≤(Language.IsOrdered), whereas the colexicographic tuple order in Fagin's power interpretation compares the highest differing coordinate via an irreflexive strict<relation.
Main definitions #
Cslib.Logic.ESO.varLanguage.sumAssoc: the homomorphism combining two blocks of relation variables into one.Cslib.Logic.ESO.Sentence.project: existential projection of an outer block of relation variables.Cslib.Logic.ESO.orderLanguage,Cslib.Logic.ESO.ltSym,Cslib.Logic.ESO.isStrictLinearOrderSentence: the binary relation variable for a guessed strict linear order and its first-order axioms.Cslib.Logic.ESO.orderRelOfEquiv: the binary relation onMinduced by a numberinge : M ≃ Fin n.Cslib.Logic.ESO.Sentence.withLinearOrder: existentially quantifying a strict linear order on the domain before evaluating anESO.Sentence (L.sum orderLanguage).
Main results #
Cslib.Logic.ESO.Sentence.realize_project:Φ.projectholds inMiffΦholds in some expansion ofMby relations forar₀.Cslib.Logic.ESO.realize_isStrictLinearOrderSentence_iff_irrefl_trans_trichotomous: on any domain, a binary relation satisfiesisStrictLinearOrderSentenceiff it is irreflexive, transitive, and trichotomous.Cslib.Logic.ESO.realize_isStrictLinearOrderSentence: on a finite domainM, a binary relation satisfiesisStrictLinearOrderSentenceiff it isorderRelOfEquiv efor somee : M ≃ Fin (Nat.card M).Cslib.Logic.ESO.Sentence.realize_withLinearOrder: on a finite structureM,Φ.withLinearOrderholds iffΦholds on(M, orderRelOfEquiv e)for some numberinge : M ≃ Fin (Nat.card M).Cslib.Logic.ESO.Definable.of_withLinearOrder: a class characterized on every finite structure under every numbering by a sentence overL.sum orderLanguageis existential second-order definable overL.
References #
Projection of relation variables #
The homomorphism combining two successive blocks of relation variables ar₁ and ar₂ into a
single block Sum.elim ar₁ ar₂.
Instances For
Existentially quantify an additional block of relation variables ar₀, turning an existential
second-order sentence over L.sum (varLanguage ar₀) into one over L.
Instances For
Existential projection: Φ.project holds in M exactly when Φ holds in some expansion
of M by relations for ar₀.
Guessed strict linear order #
The language of a single binary relation variable, used for an existentially guessed strict linear order on the domain.
Instances For
The binary relation symbol < of orderLanguage.
Instances For
The first-order sentence over orderLanguage asserting that ltSym is a strict linear order
(irreflexive, transitive, and trichotomous).
Instances For
On any type N (finite or not), a binary relation satisfies isStrictLinearOrderSentence iff
it is irreflexive, transitive, and trichotomous.
Every numbering e : N ≃ Fin n induces a strict linear order satisfying
isStrictLinearOrderSentence.
On a finite type N, a binary relation satisfies isStrictLinearOrderSentence iff it is
orderRelOfEquiv e for some bijection e : N ≃ Fin (Nat.card N).
Existentially quantify a strict linear order on the domain before evaluating an existential
second-order sentence Φ over L.sum orderLanguage.
Instances For
On a finite structure M, Φ.withLinearOrder holds iff Φ holds on (M, orderRelOfEquiv e)
for some numbering e : M ≃ Fin (Nat.card M).
If Φ : Sentence (L.sum orderLanguage) agrees with K on every finite structure M under
every numbering e : M ≃ Fin (Nat.card M), then K is existential second-order definable over L
(witnessed by Φ.withLinearOrder).