Documentation

DescriptiveComplexity.Counting.QSO

ΣQSO(FO): quantitative second-order logic with second-order sums #

The fragment ΣQSO(FO) of the quantitative second-order logic of Arenas, Muñoz, Riveros 2020: above a Boolean layer of first-order formulas, terms denoting natural numbers,

α ::= φ | s | α + α | α · α | Σx. α | Πx. α | ΣX. α,

the first-order quantitative terms of DescriptiveComplexity.QTerm together with the second-order sum ΣX. α, the sum over the relations X of the value of α in the structure expanded by X (DescriptiveComplexity.SQTerm, DescriptiveComplexity.SQTerm.eval). The second-order product ΠX of the full logic QSO is left out: ΣQSO(FO) is the fragment that captures #P over ordered structures, which is DescriptiveComplexity.mem_sharpP_iff_sqDefinable.

The terms of ΣQSO(FO) over the vocabulary L, with free first-order variables in α. A first-order quantifier binds a block of n variables at once, the variables Sum.inr i of α ⊕ Fin n; a second-order sum binds the relation variables of a block, the term under it being over the vocabulary expanded by the block.

Instances For
    Dependency graph
    noncomputable def DescriptiveComplexity.SQTerm.eval {L : FirstOrder.Language} {α : Type} :
    SQTerm L α → (A : Type) → [L.Structure A] → (α → A) → ℕ

    The value of a term in a structure, under a valuation.

    Equations
    Instances For
      Dependency graph

      The value of a closed term.

      Equations
      Instances For
        Dependency graph