Documentation

Complexitylib.DescriptiveComplexity.Interpretation

Tagged tuple interpretation semantics #

Tagged FO interpretations have exact output size tags * card ^ dim and preserve isomorphisms. Consequently, pulling a query back through their structure map preserves isomorphism invariance. A two-copy graph construction demonstrates that this extends the expressive scope of universe-preserving interpretations.

Interpretation.Pullback proves general formula transport and closure of FO definability. Interpretation.Composition gives composition up to isomorphism, and TaggedReduction derives the reduction preorder on invariant problems.

@[simp]
theorem Complexity.DescriptiveComplexity.TaggedFOInterpretation.apply_card {V W : Vocabulary} {tags dim : ℕ} (I : TaggedFOInterpretation V W tags dim) (A : FinStruct V) :
(I.apply A).card = tags * A.card ^ dim

The interpreted universe has exactly tags * card ^ dim elements.

def Complexity.DescriptiveComplexity.TaggedFOInterpretation.mapElement {tags dim card₁ card₂ : ℕ} (f : Fin card₁ → Fin card₂) (x : Fin (tags * card₁ ^ dim)) :
Fin (tags * card₂ ^ dim)

Map the coordinates of an interpreted element, keeping its tag.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    @[simp]
    theorem Complexity.DescriptiveComplexity.TaggedFOInterpretation.elementEquiv_mapElement {tags dim card₁ card₂ : ℕ} (f : Fin card₁ → Fin card₂) (x : Fin (tags * card₁ ^ dim)) :
    (elementEquiv card₂ tags dim) (mapElement f x) = (((elementEquiv card₁ tags dim) x).1, f ∘ ((elementEquiv card₁ tags dim) x).2)

    Decoding a mapped element exposes its unchanged tag and mapped coordinates.

    theorem Complexity.DescriptiveComplexity.TaggedFOInterpretation.relationEnv_mapElement {tags dim card₁ card₂ arity : ℕ} (f : Fin card₁ → Fin card₂) (args : Fin arity → Fin (tags * card₁ ^ dim)) :

    Coordinate mapping commutes with flattening relation arguments.

    def Complexity.DescriptiveComplexity.TaggedFOInterpretation.mapIso {V W : Vocabulary} {tags dim : ℕ} (I : TaggedFOInterpretation V W tags dim) {A B : FinStruct V} (f : Iso A B) :
    Iso (I.apply A) (I.apply B)

    An input isomorphism acts coordinatewise on tagged tuples.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For

      Pull back a query along the tagged structure map.

      Equations
      Instances For

        Isomorphism-invariant queries remain invariant under tagged interpretation.

        Regard a universe-preserving interpretation as a one-tag, one-coordinate interpretation.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For

          The old and new presentations of a dimension-one interpretation are isomorphic.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For

            An invariant query sees the same result through either dimension-one presentation.