Documentation

DescriptiveComplexity.Computability.Vocab

Presenting vocabularies as data #

Ways of exhibiting a FirstOrder.Language.FinVocab, the finite presentation of a relational vocabulary that FirstOrder.Language.FinStruct encodes structures over.

A presentation is exactly a numbering of the symbols, i.e. an equivalence

Fin numSyms ≃ ((n : ℕ) × L.Relations n)

(FirstOrder.Language.FinVocab.symEquiv and FirstOrder.Language.FinVocab.ofEquivSigma are mutually inverse constructions), so a presentation can be built from any such numbering: from a duplicate-free list of all the symbols (FirstOrder.Language.FinVocab.ofList, the way every vocabulary of the catalog is presented), or by combining two presentations (FirstOrder.Language.FinVocab.sum).

The sum is what makes the whole development go through: the vocabularies of the second-order machinery are sums of an instance's vocabulary with a quantifier block's, and everything about them is encoded by the same means as an ordinary instance.

A presentation is a numbering of the symbols.

Equations
Instances For
    Dependency graph
    @[simp]
    Dependency graph
    Dependency graph

    A numbering of the symbols is a presentation, the converse of FirstOrder.Language.FinVocab.symEquiv.

    Equations
    Instances For
      Dependency graph
      Dependency graph
      @[simp]
      theorem FirstOrder.Language.FinVocab.symOf_ofEquivSigma {L : Language} (k : ) (e : Fin k (n : ) × L.Relations n) (i : Fin k) :
      (ofEquivSigma k e).symOf i = e i
      Dependency graph
      def FirstOrder.Language.FinVocab.ofList {L : Language} [DecidableEq ((n : ) × L.Relations n)] (l : List ((n : ) × L.Relations n)) (nd : l.Nodup) (h : ∀ (p : (n : ) × L.Relations n), p l) :

      A vocabulary presented by a list of all its symbols, without repetitions: the way the vocabularies of the catalog, which are finite enumerations, are presented.

      Equations
      Instances For
        Dependency graph

        Presentations combine along Language.sum: a symbol of the sum vocabulary is a symbol of one side or of the other. This is what lets the vocabularies of the second-order machinery – an instance's vocabulary summed with a quantifier block's – be encoded like any other.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Dependency graph
          Dependency graph
          theorem FirstOrder.Language.FinVocab.index_sum_inl {L L' : Language} (V : L.FinVocab) (W : L'.FinVocab) {n : } (r : L.Relations n) :

          The numbering of a sum vocabulary: the symbols of the left summand keep their numbers, those of the right summand are shifted past them. This is the only fact about FirstOrder.Language.FinVocab.sum anything downstream uses – it is what fixes the layout of the table of an encoded structure.

          Dependency graph
          theorem FirstOrder.Language.FinVocab.index_sum_inr {L L' : Language} (V : L.FinVocab) (W : L'.FinVocab) {n : } (r : L'.Relations n) :
          Dependency graph
          @[simp]
          theorem FirstOrder.Language.FinVocab.val_index_sum_inl {L L' : Language} (V : L.FinVocab) (W : L'.FinVocab) {n : } (r : L.Relations n) :
          ((V.sum W).index (Sum.inl r)) = (V.index r)
          Dependency graph
          @[simp]
          theorem FirstOrder.Language.FinVocab.val_index_sum_inr {L L' : Language} (V : L.FinVocab) (W : L'.FinVocab) {n : } (r : L'.Relations n) :
          ((V.sum W).index (Sum.inr r)) = V.numSyms + (W.index r)
          Dependency graph