Existential second-order logic #
An existential second-order sentence ∃ R₁ … Rₖ, φ over a language L quantifies finitely many
relation variables R₁, …, Rₖ of given arities over a first-order sentence φ of L extended by
them. It holds in an L-structure M when some relations R₁, …, Rₖ on M make φ true, that
is, when some expansion of M by these relations is a model of φ Fagin, Section 2,
Immerman, Section 7.1. The relation variables form the relational language
ESO.varLanguage arity, and the sentence φ is a sentence of Mathlib's first-order logic over
L.sum (ESO.varLanguage arity).
A class of structures is existential second-order definable (ESO.Definable) when some
existential second-order sentence holds in exactly its finite members; Fagin calls these classes
generalized spectra, and his theorem identifies them with the classes decidable in nondeterministic
polynomial time. The existential second-order definable classes contain the first-order definable
ones, are closed under intersection and union, and are closed under isomorphism.
Main definitions #
Cslib.Logic.ESO.varLanguage: the relational language of relation variables of given arities.Cslib.Logic.ESO.Sentence: existential second-order sentences, withSentence.Realize.Cslib.Logic.ESO.Sentence.ofSentence: a first-order sentence as an existential second-order one.Cslib.Logic.ESO.Definable: existential second-order definability of a class of finite structures.
Main results #
Cslib.Logic.ESO.Sentence.realize_ofSentence,Cslib.Logic.ESO.Sentence.realize_inf,Cslib.Logic.ESO.Sentence.realize_sup: semantics of the embedding of first-order logic and of conjunction and disjunction.Cslib.Logic.ESO.Sentence.realize_iff_of_equiv: invariance under isomorphism.Cslib.Logic.ESO.Definable.of_fo,Cslib.Logic.ESO.Definable.inter,Cslib.Logic.ESO.Definable.union,Cslib.Logic.ESO.Definable.isoClosed.
References #
Relation variables #
The relational language with a relation symbol of arity arity i for each i : ι: the
relation variables of an existential second-order sentence.
Instances For
The structure interpreting each relation variable i as the relation R i.
Instances For
Sentences #
An existential second-order sentence ∃ R₁ … Rₖ, φ over L: finitely many relation
variables with their arities, and a first-order sentence φ of L extended by them.
- Var : Type
The relation variables.
The arity of each relation variable.
- matrix : (L.sum (varLanguage self.arity)).Sentence
The first-order part, a sentence of
Lextended by the relation variables.
Instances For
An existential second-order sentence holds in M when some relations on M, interpreting
its relation variables, make its first-order part true.
Instances For
A first-order sentence, as an existential second-order sentence without relation variables.
Instances For
The embedding of first-order logic preserves truth.
The conjunction of two existential second-order sentences, which quantifies the relation variables of both.
The disjunction of two existential second-order sentences, which quantifies the relation variables of both.
An isomorphism M ≃[L] N, together with relations on M and their images on N, is an
isomorphism of the expansions.
Instances For
Definable classes #
A class of structures is existential second-order definable when some existential second-order sentence holds in exactly its finite members, among all finite structures: it is a generalized spectrum Fagin, Section 2.
Instances For
First-order definable classes are existential second-order definable.
The intersection of two existential second-order definable classes is existential second-order definable.
The union of two existential second-order definable classes is existential second-order definable.
An existential second-order definable class is closed under isomorphism.