Documentation

DescriptiveComplexity.Problems.Wide.DrawAtoms

The atoms of a step matrix, classified #

The EXPSPACE program evaluates the matrix of a step formula atom by atom (DescriptiveComplexity.Draw.qfValue), and each atom gets a different subroutine: a point equality is one file test, an order comparison another, a relation of the expansion is an element-loop sub-fold, and a stage atom is a random access. So the program's call sites are indexed by the atoms with their kinds, and the kind must be data – computable from the formula when the program is defined, not merely known to exist.

This file is that data. Over the matrix vocabulary – the base X.E.sum Language.order expanded by the block, everything relational – a term is a variable (DescriptiveComplexity.Draw.matVar), an atom is one of four shapes (DescriptiveComplexity.Draw.MatAtom), the classifier DescriptiveComplexity.Draw.matAtom? reads the shape off the syntax – total on relation atoms, none only on non-atoms, which DescriptiveComplexity.Draw.qfAtoms never emits (DescriptiveComplexity.Draw.isSome_matAtom?_of_mem_qfAtoms) – and DescriptiveComplexity.Draw.realize_matAtom is the semantic reading: the atom holds at a valuation of the prefix exactly as its kind says, the stage atoms reading the assignment, the order atoms the chosen order on points, the expansion atoms the expanded structure.

Terms are variables #

The variable a matrix term is: over a relational vocabulary with no free names, nothing else is possible.

Equations
Instances For
    Dependency graph
    theorem DescriptiveComplexity.Draw.realize_matVar {LM : FirstOrder.Language} [LM.IsRelational] {n : } {A : Type} [LM.Structure A] (xs : EmptyA) (w : Fin nA) (t : LM.Term (Empty Fin n)) :
    Dependency graph

    The four kinds of atoms #

    An atom of a step matrix, classified: a point equality, an order comparison, a relation of the expansion, or a stage atom of the iteration – each with the prefix levels its arguments read. This is the index data of the program's per-atom call sites.

    Instances For
      Dependency graph

      The classification of a relation atom, by its symbol's summand.

      Equations
      Instances For
        Dependency graph
        Dependency graph

        Every atom of a matrix classifies: the members of DescriptiveComplexity.Draw.qfAtoms are equality and relation atoms, on which the classifier is total.

        Dependency graph

        The semantic reading #

        def DescriptiveComplexity.Draw.MatAtom.holds {L : FirstOrder.Language} {X : ExpExpansion L} {B : SOBlock} {A : Type} [L.Structure A] [LinearOrder A] [LinearOrder (X.Map A)] (σ : B.Assignment (X.Map A)) {n : } (w : Fin nX.Map A) :
        MatAtom X B nProp

        What an atom says, at a stage of the iteration and a valuation of the prefix: the machine subroutine of the atom computes exactly this.

        Equations
        Instances For
          Dependency graph
          theorem DescriptiveComplexity.Draw.realize_matAtom {L : FirstOrder.Language} {X : ExpExpansion L} {B : SOBlock} {A : Type} [L.Structure A] [LinearOrder A] [LinearOrder (X.Map A)] (σ : B.Assignment (X.Map A)) {n : } {φ : ((X.E.sum FirstOrder.Language.order).sum B.lang).BoundedFormula Empty n} {κ : MatAtom X B n} (h : matAtom? φ = some κ) (w : Fin nX.Map A) :

          The reading is correct: a classified atom realizes at a valuation of the prefix exactly as its kind says.

          Dependency graph

          The matrix through its classified atoms: a quantifier-free matrix realizes exactly as its Boolean function at the kinds' readings – which is what the machine computes once its per-atom subroutines have filled the verdict slots.

          Dependency graph