Documentation

DescriptiveComplexity.Invariant.Backward

Pulling an ordered induction on the invariant structure back to the base #

The backward simulation of the Abiteboul–Vianu argument (DescriptiveComplexity.AbiteboulVianu): an induction over the ordered invariant vocabulary – as produced by the PTIME capture applied on the invariant structure – runs on the base structure A, once the canonical order on k-tuples is available as a converged relation variable. The class compiler (DescriptiveComplexity.backCompile) translates a formula over ((invLang L k).sum Language.order).sum B'.lang into a formula over the base vocabulary expanded by the order block and by a k-fold copy of B' (DescriptiveComplexity.backBlock):

The compiler is exact (DescriptiveComplexity.realize_backCompile), the compiled induction DescriptiveComplexity.StepDef.backStepDef tracks the original stage by stage over the pulled-back assignments (DescriptiveComplexity.backAssign), and the values agree (DescriptiveComplexity.StepDef.ifpHolds_backStepDef). Stratified over the definable refinement (DescriptiveComplexity.Invariant.OrderDef, DescriptiveComplexity.FixedPointStratify), this is what turns an ordered induction on Iᵏ A into an order-free induction on A.

The pulled-back block #

@[reducible]

The k-fold pullback of a block: each relation variable on classes becomes one on representative tuples, its arity multiplied by k.

Equations
Instances For
    Dependency graph
    def DescriptiveComplexity.backFlatten {k : } {A : Type} {m : } (t : Fin mFin kA) :
    Fin (m * k)A

    Reading a tuple of k-tuples as one flat tuple.

    Equations
    Instances For
      Dependency graph
      theorem DescriptiveComplexity.backFlatten_apply {k : } {A : Type} {m : } (t : Fin mFin kA) (a : Fin m) (q : Fin k) :
      Dependency graph
      def DescriptiveComplexity.backAssign {L : FirstOrder.Language} {k : } {S : Set ((n : ) × L.Relations n)} {A : Type} [L.Structure A] {B' : SOBlock} (X' : B'.Assignment (InvMap S k A)) :

      The pullback along the quotient map of an assignment on classes.

      Equations
      Instances For
        Dependency graph
        theorem DescriptiveComplexity.backAssign_backFlatten {L : FirstOrder.Language} {k : } {S : Set ((n : ) × L.Relations n)} {A : Type} [L.Structure A] {B' : SOBlock} (X' : B'.Assignment (InvMap S k A)) (i : B'.ι) (t : Fin (B'.arity i)Fin kA) :
        backAssign X' i (backFlatten t) X' i fun (a : Fin (B'.arity i)) => InvMap.mk S (t a)
        Dependency graph

        Symbols and atoms over the doubly expanded vocabulary #

        @[reducible, inline]

        The order variable, inside the second expansion.

        Equations
        Instances For
          Dependency graph
          @[reducible, inline]

          A base relation symbol, inside the second expansion.

          Equations
          Instances For
            Dependency graph
            noncomputable def DescriptiveComplexity.bPrecF (L : FirstOrder.Language) (k : ) {B' : SOBlock} {γ : Type} (f g : Fin kγ) :
            ((L.sum (ordBlock k).lang).sum (backBlock B' k).lang).Formula γ

            The -atom between two k-tuples of variables, inside the second expansion.

            Equations
            Instances For
              Dependency graph
              noncomputable def DescriptiveComplexity.bEquivF (L : FirstOrder.Language) (k : ) {B' : SOBlock} {γ : Type} (f g : Fin kγ) :
              ((L.sum (ordBlock k).lang).sum (backBlock B' k).lang).Formula γ

              The ≡ᵏ-atom: incomparability.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Dependency graph
                noncomputable def DescriptiveComplexity.bLeF (L : FirstOrder.Language) (k : ) {B' : SOBlock} {γ : Type} (f g : Fin kγ) :
                ((L.sum (ordBlock k).lang).sum (backBlock B' k).lang).Formula γ

                The -atom on classes: strictly below or equivalent.

                Equations
                Instances For
                  Dependency graph

                  The class compiler #

                  @[irreducible]
                  noncomputable def DescriptiveComplexity.backCompile (L : FirstOrder.Language) (k : ) {B' : SOBlock} (S : Set ((n : ) × L.Relations n)) {γ α : Type} {n : } :
                  (((invLang L k).sum FirstOrder.Language.order).sum B'.lang).BoundedFormula α n(αFin kγ)(Fin nFin kγ)((L.sum (ordBlock k).lang).sum (backBlock B' k).lang).Formula γ

                  The class compiler: a formula over the ordered invariant vocabulary expanded by a block, read on representative k-tuples over the base vocabulary expanded by the order block and the pulled-back block. Each free or bound class variable is a selection of k context variables.

                  Equations
                  Instances For
                    Dependency graph

                    Exactness of the class compiler #

                    theorem DescriptiveComplexity.realize_backCompile {L : FirstOrder.Language} {k : } {B' : SOBlock} {S : Set ((n : ) × L.Relations n)} {A : Type} [L.Structure A] [Finite A] {σ : (ordBlock k).Assignment A} {Y : (backBlock B' k).Assignment A} (lo : LinearOrder (InvMap S k A)) {X' : B'.Assignment (InvMap S k A)} (h1 : IncompRel (toPebble σ) = EquivK (atomicAgreeOn S A k)) (h2 : ∀ (u v : Fin kA), toPebble σ u v EquivK (atomicAgreeOn S A k) u v InvMap.mk S u InvMap.mk S v) (hY : ∀ (i : B'.ι) (t : Fin (B'.arity i)Fin kA), Y i (backFlatten t) X' i fun (a : Fin (B'.arity i)) => InvMap.mk S (t a)) {α : Type} {n : } (φ : (((invLang L k).sum FirstOrder.Language.order).sum B'.lang).BoundedFormula α n) {γ : Type} (E : αFin kγ) (H : Fin nFin kγ) (W : γA) :
                    (backCompile L k S φ E H).Realize W φ.Realize (fun (a : α) => InvMap.mk S fun (q : Fin k) => W (E a q)) fun (j : Fin n) => InvMap.mk S fun (q : Fin k) => W (H j q)

                    Exactness of the class compiler: over an order variable whose incomparability is ≡ᵏ and an assignment corresponding to one on classes, the compiled formula holds at representative tuples exactly when the original formula holds at their classes on the ordered invariant structure.

                    Dependency graph

                    The pulled-back induction #

                    The pulled-back induction: the induction over the ordered invariant vocabulary, compiled onto representative tuples over the base vocabulary expanded by the (frozen) order block.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      Dependency graph
                      theorem DescriptiveComplexity.StepDef.inflStage_backStepDef {L : FirstOrder.Language} {k : } (e : StepDef ((invLang L k).sum FirstOrder.Language.order)) {S : Set ((n : ) × L.Relations n)} {A : Type} [L.Structure A] [Finite A] {σ : (ordBlock k).Assignment A} (lo : LinearOrder (InvMap S k A)) (h1 : IncompRel (toPebble σ) = EquivK (atomicAgreeOn S A k)) (h2 : ∀ (u v : Fin kA), toPebble σ u v EquivK (atomicAgreeOn S A k) u v InvMap.mk S u InvMap.mk S v) (n : ) :

                      The stages of the pulled-back induction are the pullbacks of the original stages.

                      Dependency graph
                      theorem DescriptiveComplexity.StepDef.ifpHolds_backStepDef {L : FirstOrder.Language} {k : } (e : StepDef ((invLang L k).sum FirstOrder.Language.order)) {S : Set ((n : ) × L.Relations n)} {A : Type} [L.Structure A] [Finite A] {σ : (ordBlock k).Assignment A} (lo : LinearOrder (InvMap S k A)) (h1 : IncompRel (toPebble σ) = EquivK (atomicAgreeOn S A k)) (h2 : ∀ (u v : Fin kA), toPebble σ u v EquivK (atomicAgreeOn S A k) u v InvMap.mk S u InvMap.mk S v) :

                      The value of the pulled-back induction is the original value: an ordered induction over the invariant structure runs on the base structure, over the frozen canonical order.

                      Dependency graph