Documentation

CslibFrontier.Computability.Complexity.Fagin.Ordered

Ordered existential second-order definability #

The NP tableau construction applies to arbitrary queries on canonically ordered structures. The order used to read relation tables is retained, rather than existentially quantified. Consequently input relations need not be invariant under permutations of the universe.

Main definitions #

Main results #

References #

A query is existential second-order definable when one ESO sentence in the public ordered language defines it on all canonical structures. Numeric predicates and constants retain their fixed values; only the finitely many second-order relation variables are existentially chosen.

Every first-order definable ordered query is existential second-order definable.

The encoded language queryLanguage v φ of a sentence φ is the encoded language of the query that φ defines.

Every first-order definable ordered query has its source-only encoded language in NP.

theorem Cslib.Logic.FO.Ordered.ESODefinable.of_powerLanguage {L : FirstOrder.Language} [L.IsRelational] (v : Vocabulary L) {K : Query L} (k : ℕ) (hk : 1 ≤ k) (har : ∀ (i : Fin v.count), v.arity i ≤ k) (Ψ : ESO.Sentence v.powerLanguage) (hΨ : ∀ (M : Structure L), M ∈ K ↔ Ψ.Realize (Fin (M.size ^ k))) :

The ordered version of the Fagin power-structure bridge. The canonical numbering is retained, so arbitrary ordered queries are admitted.

Every ordered query whose source-only encoding language belongs to NP is definable in existential second-order logic over the canonical ordered language. The query may depend on the fixed ordering of its input relations: no isomorphism-invariance assumption is required. This is the ordered converse of Fagin's characterization [Fag74], [Imm99].