Vocabularies (Signatures) #
Following Immerman's "Descriptive Complexity", a vocabulary (also called a
signature) is a tuple of relation symbols with arities, plus constant symbols.
We represent this finitely: numRels relation symbols with arities given by
relArity, and numConsts constant symbols.
A vocabulary is relational if it has no constant symbols.
Equations
- V.IsRelational = (V.numConsts = 0)
Instances For
The empty vocabulary with no relation or constant symbols.
Equations
- Complexity.DescriptiveComplexity.Vocabulary.empty = { numRels := 0, relArity := Fin.elim0, numConsts := 0 }
Instances For
Construct a vocabulary with a single relation of given arity and no constants.
Equations
- Complexity.DescriptiveComplexity.Vocabulary.ofRel arity = { numRels := 1, relArity := fun (x : Fin 1) => arity, numConsts := 0 }
Instances For
The vocabulary of directed graphs: one binary relation E.
Equations
Instances For
The vocabulary of directed graphs with distinguished source and target: one binary relation E and two constants s, t.
Equations
- Complexity.DescriptiveComplexity.Vocabulary.graphST = { numRels := 1, relArity := fun (x : Fin 1) => 2, numConsts := 2 }
Instances For
The vocabulary for binary strings with built-in ordering (Proviso 1.14): one unary relation S (the "1-bit" predicate). The linear order ≤ and successor are built-in numeric predicates, not part of the vocabulary.