Documentation

DescriptiveComplexity.TransitiveClosureReductionTrans

Transitivity of FO(TC) and FO(DTC) reductions #

P ≤ᵗᶜ Q and Q ≤ᵗᶜ R give P ≤ᵗᶜ R (DescriptiveComplexity.TCReduction.trans), and likewise for ≤ᵈᵗᶜ (DescriptiveComplexity.DTCReduction.trans): the reductions with a logic inside are reduction orders.

The composite #

The outer reduction's interpretation reads the reachability relations of its own walks, which run on the structure the inner reduction produces. Pulled back through the inner interpretation (DescriptiveComplexity.ParamTCSpec.comapRel) they are walks over the base structure expanded by the inner walks' relations; flattened (DescriptiveComplexity.ParamTCSpec.flat) they are walks over the base structure alone, and they join the inner family (DescriptiveComplexity.TCInterpretation.flatFamily). The inner interpretation is then extended to the outer family's vocabulary (DescriptiveComplexity.TCInterpretation.CompositeBlock.extendOuter): a reachability atom of an outer walk is interpreted by “the two endpoints have encodings between which the flat walk reaches”, with the encodings pinned by DescriptiveComplexity.ParamTCSpec.encF. Composing the outer interpretation with the extended inner one (DescriptiveComplexity.RelFOInterpretation.compRel) is then the composite reduction, and no formula is ever rewritten: the guarded pullback substitutes the extended formulas for the atoms.

The extended interpretation produces exactly the outer reduction's input – the inner structure, ordered lexicographically, expanded by the outer walks' relations (DescriptiveComplexity.TCInterpretation.CompositeBlock.extendOuterLEquiv) – which is where the two halves of the normal form meet: the pullback's correspondence between in-domain nodes and the flat walk's at the encodings.

The deterministic case #

The same construction with the searching flat walk, which is functional; the composite's family is read through its determinization, and the flat walks lose nothing by it. The pullback of a determinized walk is functional (DescriptiveComplexity.ParamTCSpec.comapRel_functional), which is what the searching simulation needs.

The pullback of a functional walk is functional #

theorem DescriptiveComplexity.ParamTCSpec.encode_decode {L₁ L₂ : FirstOrder.Language} [L₂.IsRelational] {Tag : Type} [Finite Tag] {dim : } {s : ParamTCSpec L₂} {I : RelFOInterpretation L₁ L₂ Tag dim} {A : Type} [L₁.Structure A] {τp : Fin s.parTag} (a : (s.comapRel I τp).Node A) (ha : InDom a) :
encode τp (decode a ha) = a

Encoding after decoding is the identity.

Dependency graph
theorem DescriptiveComplexity.ParamTCSpec.comapRel_functional {L₁ L₂ : FirstOrder.Language} [L₂.IsRelational] {Tag : Type} [Finite Tag] {dim : } {s : ParamTCSpec L₂} {I : RelFOInterpretation L₁ L₂ Tag dim} {A : Type} [L₁.Structure A] {τp : Fin s.parTag} (h : ∀ (z : Fin s.parI.MapRel A) (a b c : s.Node (I.MapRel A)), s.StepAt z a bs.StepAt z a cb = c) (z : Fin (s.par * dim)A) (a b c : (s.comapRel I τp).Node A) (hb : (s.comapRel I τp).StepAt z a b) (hc : (s.comapRel I τp).StepAt z a c) :
b = c

The pullback of a functional walk is functional.

Dependency graph

The outer walks, pulled back and flattened #

@[reducible, inline]
noncomputable abbrev DescriptiveComplexity.TCInterpretation.pulled {L₁ L₂ : FirstOrder.Language} [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (s : ParamTCSpec (L₂.sum FirstOrder.Language.order)) (τp : Fin s.parTag₁) :

An outer walk, pulled back through the inner interpretation: a walk over the base structure expanded by the inner walks' relations.

Equations
Instances For
    Dependency graph
    theorem DescriptiveComplexity.TCInterpretation.exists_pulledStepDecider {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (s : ParamTCSpec (L₂.sum FirstOrder.Language.order)) (τp : Fin s.parTag₁) (m n : (I.pulled s τp).Mode) :
    ∃ (D : Decider L₁ ((Fin (I.pulled s τp).k Fin (I.pulled s τp).k) Fin (I.pulled s τp).par)), (∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (v : (Fin (I.pulled s τp).k Fin (I.pulled s τp).k) Fin (I.pulled s τp).parA), D.Decides v (((I.pulled s τp).step m n).Realize v)) ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A], (∀ (q : I.fam.block.ι), (Dq q).Functional A)D.Functional A
    Dependency graph
    noncomputable def DescriptiveComplexity.TCInterpretation.pulledStepDecider {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (s : ParamTCSpec (L₂.sum FirstOrder.Language.order)) (τp : Fin s.parTag₁) (m n : (I.pulled s τp).Mode) :
    Decider L₁ ((Fin (I.pulled s τp).k Fin (I.pulled s τp).k) Fin (I.pulled s τp).par)

    The deciders of the pulled walk's steps.

    Equations
    Instances For
      Dependency graph
      theorem DescriptiveComplexity.TCInterpretation.pulledStepDecider_decides {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (s : ParamTCSpec (L₂.sum FirstOrder.Language.order)) (τp : Fin s.parTag₁) (A : Type) [L₁.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (m n : (I.pulled s τp).Mode) (v : (Fin (I.pulled s τp).k Fin (I.pulled s τp).k) Fin (I.pulled s τp).parA) :
      (I.pulledStepDecider Dq hD s τp m n).Decides v (((I.pulled s τp).step m n).Realize v)
      Dependency graph
      theorem DescriptiveComplexity.TCInterpretation.pulledStepDecider_functional {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (s : ParamTCSpec (L₂.sum FirstOrder.Language.order)) (τp : Fin s.parTag₁) (A : Type) [L₁.Structure A] [LinearOrder A] (h : ∀ (q : I.fam.block.ι), (Dq q).Functional A) (m n : (I.pulled s τp).Mode) :
      (I.pulledStepDecider Dq hD s τp m n).Functional A
      Dependency graph
      @[reducible, inline]
      noncomputable abbrev DescriptiveComplexity.TCInterpretation.flatWalk {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (s : ParamTCSpec (L₂.sum FirstOrder.Language.order)) (τp : Fin s.parTag₁) (det : Bool) :

      An outer walk, pulled back and flattened: a walk over the base structure alone.

      Equations
      Instances For
        Dependency graph
        theorem DescriptiveComplexity.TCInterpretation.pulledStepDecider_decidesSteps {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (s : ParamTCSpec (L₂.sum FirstOrder.Language.order)) (τp : Fin s.parTag₁) {A : Type} [L₁.Structure A] [LinearOrder A] [Finite A] [Nonempty A] (z : Fin (I.pulled s τp).parA) :
        (I.pulled s τp).DecidesSteps (I.pulledStepDecider Dq hD s τp) z
        Dependency graph
        noncomputable def DescriptiveComplexity.TCInterpretation.flatCoords {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (s : ParamTCSpec (L₂.sum FirstOrder.Language.order)) (τp : Fin s.parTag₁) (det : Bool) {A : Type} (a₀ : A) (a : (I.pulled s τp).Node A) :
        Fin (I.flatWalk Dq hD s τp det).kA

        The coordinates of a node's tuple, as a tuple of the flat walk, at a bottom element a₀.

        Equations
        Instances For
          Dependency graph
          theorem DescriptiveComplexity.TCInterpretation.flatWalk_reachAt_iff {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (s : ParamTCSpec (L₂.sum FirstOrder.Language.order)) (τp : Fin s.parTag₁) (det : Bool) {A : Type} [L₁.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {a₀ : A} (hbot : ∀ (a : A), a₀ a) (hdet : det = true∀ (z : Fin s.parI.ordInterp.MapRel A) (a b c : s.Node (I.ordInterp.MapRel A)), s.StepAt z a bs.StepAt z a cb = c) (z : Fin (I.pulled s τp).parA) (hz : ParamTCSpec.ParInDom I.ordInterp τp z) (a b : (I.pulled s τp).Node A) (ha : ParamTCSpec.InDom a) (hb : ParamTCSpec.InDom b) (w₁ w₂ : Fin (I.flatWalk Dq hD s τp det).kA) (hw₁ : w₁ = I.flatCoords Dq hD s τp det a₀ a) (hw₂ : w₂ = I.flatCoords Dq hD s τp det a₀ b) :
          (I.flatWalk Dq hD s τp det).ReachAt z (Sum.inl a.1, w₁) (Sum.inl b.1, w₂) s.ReachAt (ParamTCSpec.decodePar hz) (ParamTCSpec.decode a ha) (ParamTCSpec.decode b hb)

          Reachability in the flat walk is reachability in the outer walk, at the encodings of in-domain nodes – for the guessing flat walk, or for the searching one when the outer walk is functional.

          Dependency graph
          theorem DescriptiveComplexity.TCInterpretation.flatWalk_functional {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (s : ParamTCSpec (L₂.sum FirstOrder.Language.order)) (τp : Fin s.parTag₁) {A : Type} [L₁.Structure A] [LinearOrder A] [Nonempty A] (h : ∀ (q : I.fam.block.ι), (Dq q).Functional A) :
          (I.flatWalk Dq hD s τp true).Functional A

          The searching flat walk is functional when the inner deciders are.

          Dependency graph

          The flat family #

          noncomputable def DescriptiveComplexity.TCInterpretation.flatFamily {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (F : TCFamily (L₂.sum FirstOrder.Language.order)) (det : Bool) :

          The outer family, pulled back and flattened: one walk per outer walk and tag assignment of its parameters.

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

            Extending the inner interpretation to the outer family's vocabulary #

            structure DescriptiveComplexity.TCInterpretation.CompositeBlock {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } (I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁) (Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))) (hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)) (F : TCFamily (L₂.sum FirstOrder.Language.order)) (det : Bool) :

            The composite family, abstractly: a block with an assignment, into which the inner family's relation variables and the flat walks' embed, with their assignments. Abstract so that the composite family may be read as it is (≤ᵗᶜ) or through its determinization (≤ᵈᵗᶜ).

            Instances For
              Dependency graph
              noncomputable def DescriptiveComplexity.TCInterpretation.CompositeBlock.lhom {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} (C : I.CompositeBlock Dq hD F det) :

              The vocabulary map from the inner family's expansion to the composite's.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Dependency graph
                @[instance_reducible]
                noncomputable def DescriptiveComplexity.TCInterpretation.CompositeBlock.structure {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} (C : I.CompositeBlock Dq hD F det) (A : Type) [L₁.Structure A] [LinearOrder A] :

                The composite structure: the base expanded by the composite block.

                Equations
                Instances For
                  Dependency graph
                  theorem DescriptiveComplexity.TCInterpretation.CompositeBlock.isExpansionOn {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} (C : I.CompositeBlock Dq hD F det) {A : Type} [L₁.Structure A] [LinearOrder A] :

                  The vocabulary map is an expansion.

                  Dependency graph
                  theorem DescriptiveComplexity.TCInterpretation.CompositeBlock.realize_lhom {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} (C : I.CompositeBlock Dq hD F det) {A : Type} [L₁.Structure A] [LinearOrder A] {α : Type} (φ : ((L₁.sum FirstOrder.Language.order).sum I.fam.block.lang).Formula α) (v : αA) :
                  Dependency graph

                  The outer atoms #

                  def DescriptiveComplexity.outerTags {L₂ : FirstOrder.Language} {Tag₁ : Type} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) :
                  Fin ((F.spec (↑q).fst).k + (F.spec (↑q).fst).k + (F.spec (↑q).fst).par)Tag₁

                  The tags of an outer symbol's arguments, in its walk's packing.

                  Equations
                  Instances For
                    Dependency graph
                    def DescriptiveComplexity.outerTp {L₂ : FirstOrder.Language} {Tag₁ : Type} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) :
                    Fin (F.spec (↑q).fst).parTag₁

                    The tags of the walk's parameters.

                    Equations
                    Instances For
                      Dependency graph
                      def DescriptiveComplexity.outerXsel {L₂ : FirstOrder.Language} {d₁ : } {F : TCFamily (L₂.sum FirstOrder.Language.order)} {n : } (q : F.block.lang.Relations n) :
                      Fin ((F.spec (↑q).fst).k * d₁)Fin n × Fin d₁

                      The coordinates of the first endpoint, among the symbol's variables.

                      Equations
                      Instances For
                        Dependency graph
                        def DescriptiveComplexity.outerYsel {L₂ : FirstOrder.Language} {d₁ : } {F : TCFamily (L₂.sum FirstOrder.Language.order)} {n : } (q : F.block.lang.Relations n) :
                        Fin ((F.spec (↑q).fst).k * d₁)Fin n × Fin d₁

                        The coordinates of the second endpoint.

                        Equations
                        Instances For
                          Dependency graph
                          def DescriptiveComplexity.outerZsel {L₂ : FirstOrder.Language} {d₁ : } {F : TCFamily (L₂.sum FirstOrder.Language.order)} {n : } (q : F.block.lang.Relations n) :
                          Fin ((F.spec (↑q).fst).par * d₁)Fin n × Fin d₁

                          The coordinates of the parameters.

                          Equations
                          Instances For
                            Dependency graph
                            @[reducible, inline]
                            abbrev DescriptiveComplexity.outerIx {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) :
                            (I.flatFamily Dq hD F det).Ix

                            The index of the flat walk interpreting the symbol.

                            Equations
                            Instances For
                              Dependency graph
                              @[reducible, inline]
                              abbrev DescriptiveComplexity.outerMode₁ {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) :
                              ((I.flatFamily Dq hD F det).spec (outerIx q τ)).Mode

                              The two modes of the flat walk between which reachability is asked.

                              Equations
                              • One or more equations did not get rendered due to their size.
                              Instances For
                                Dependency graph
                                @[reducible, inline]
                                abbrev DescriptiveComplexity.outerMode₂ {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) :
                                ((I.flatFamily Dq hD F det).spec (outerIx q τ)).Mode

                                The two modes of the flat walk between which reachability is asked.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  Dependency graph
                                  @[reducible, inline]
                                  noncomputable abbrev DescriptiveComplexity.outerK {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) :

                                  The number of coordinates of the flat walk interpreting the symbol.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Dependency graph
                                    noncomputable def DescriptiveComplexity.TCInterpretation.CompositeBlock.outerAtomF {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} (C : I.CompositeBlock Dq hD F det) {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) :

                                    The interpretation of an outer reachability atom: the two endpoints have encodings between which the flat walk reaches.

                                    Equations
                                    • One or more equations did not get rendered due to their size.
                                    Instances For
                                      Dependency graph
                                      def DescriptiveComplexity.outerPt {L₁ L₂ : FirstOrder.Language} {Tag₁ : Type} [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {A : Type} [L₁.Structure A] [LinearOrder A] {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) (v : Fin n × Fin d₁A) (hv : ∀ (i : Fin n), (I.toRel.domFormula (τ i)).Realize fun (j : Fin d₁) => v (i, j)) (p : Fin ((F.spec (↑q).fst).k + (F.spec (↑q).fst).k + (F.spec (↑q).fst).par)) :

                                      The point of the inner structure held at a position of the symbol.

                                      Equations
                                      Instances For
                                        Dependency graph
                                        theorem DescriptiveComplexity.outer_inDom_left {L₁ L₂ : FirstOrder.Language} [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {A : Type} [L₁.Structure A] [LinearOrder A] {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) (v : Fin n × Fin d₁A) (hv : ∀ (i : Fin n), (I.toRel.domFormula (τ i)).Realize fun (j : Fin d₁) => v (i, j)) :
                                        ParamTCSpec.InDom (((↑q).snd.1, fun (j : Fin (F.spec (↑q).fst).k) => outerTags q τ ((F.spec (↑q).fst).leftIx j)), v outerXsel q)
                                        Dependency graph
                                        theorem DescriptiveComplexity.outer_inDom_right {L₁ L₂ : FirstOrder.Language} [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {A : Type} [L₁.Structure A] [LinearOrder A] {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) (v : Fin n × Fin d₁A) (hv : ∀ (i : Fin n), (I.toRel.domFormula (τ i)).Realize fun (j : Fin d₁) => v (i, j)) :
                                        ParamTCSpec.InDom (((↑q).snd.2, fun (j : Fin (F.spec (↑q).fst).k) => outerTags q τ ((F.spec (↑q).fst).rightIx j)), v outerYsel q)
                                        Dependency graph
                                        theorem DescriptiveComplexity.outer_parInDom {L₁ L₂ : FirstOrder.Language} {Tag₁ : Type} [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {A : Type} [L₁.Structure A] [LinearOrder A] {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) (v : Fin n × Fin d₁A) (hv : ∀ (i : Fin n), (I.toRel.domFormula (τ i)).Realize fun (j : Fin d₁) => v (i, j)) :
                                        Dependency graph
                                        theorem DescriptiveComplexity.outer_decode_left {L₁ L₂ : FirstOrder.Language} [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {A : Type} [L₁.Structure A] [LinearOrder A] {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) (v : Fin n × Fin d₁A) (hv : ∀ (i : Fin n), (I.toRel.domFormula (τ i)).Realize fun (j : Fin d₁) => v (i, j)) :
                                        ParamTCSpec.decode (((↑q).snd.1, fun (j : Fin (F.spec (↑q).fst).k) => outerTags q τ ((F.spec (↑q).fst).leftIx j)), v outerXsel q) = ((↑q).snd.1, fun (j : Fin (F.spec (↑q).fst).k) => outerPt q τ v hv ((F.spec (↑q).fst).leftIx j))
                                        Dependency graph
                                        theorem DescriptiveComplexity.outer_decode_right {L₁ L₂ : FirstOrder.Language} [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {A : Type} [L₁.Structure A] [LinearOrder A] {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) (v : Fin n × Fin d₁A) (hv : ∀ (i : Fin n), (I.toRel.domFormula (τ i)).Realize fun (j : Fin d₁) => v (i, j)) :
                                        ParamTCSpec.decode (((↑q).snd.2, fun (j : Fin (F.spec (↑q).fst).k) => outerTags q τ ((F.spec (↑q).fst).rightIx j)), v outerYsel q) = ((↑q).snd.2, fun (j : Fin (F.spec (↑q).fst).k) => outerPt q τ v hv ((F.spec (↑q).fst).rightIx j))
                                        Dependency graph
                                        theorem DescriptiveComplexity.outer_decodePar {L₁ L₂ : FirstOrder.Language} {Tag₁ : Type} [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {A : Type} [L₁.Structure A] [LinearOrder A] {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) (v : Fin n × Fin d₁A) (hv : ∀ (i : Fin n), (I.toRel.domFormula (τ i)).Realize fun (j : Fin d₁) => v (i, j)) :
                                        ParamTCSpec.decodePar = fun (j : Fin (F.spec (↑q).fst).par) => outerPt q τ v hv ((F.spec (↑q).fst).parIx j)
                                        Dependency graph
                                        theorem DescriptiveComplexity.TCInterpretation.CompositeBlock.realize_outerAtomF {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} (C : I.CompositeBlock Dq hD F det) {A : Type} [L₁.Structure A] [LinearOrder A] {n : } (q : F.block.lang.Relations n) (τ : Fin nTag₁) [Finite A] [Nonempty A] (v : Fin n × Fin d₁A) (hv : ∀ (i : Fin n), (I.toRel.domFormula (τ i)).Realize fun (j : Fin d₁) => v (i, j)) {a₀ : A} (hbot : ∀ (a : A), a₀ a) (hdet : det = true∀ (z : Fin (F.spec (↑q).fst).parI.ordInterp.MapRel A) (a b c : (F.spec (↑q).fst).Node (I.ordInterp.MapRel A)), (F.spec (↑q).fst).StepAt z a b(F.spec (↑q).fst).StepAt z a cb = c) :
                                        (C.outerAtomF q τ).Realize v (F.spec (↑q).fst).ReachAt (fun (j : Fin (F.spec (↑q).fst).par) => outerPt q τ v hv ((F.spec (↑q).fst).parIx j)) ((↑q).snd.1, fun (j : Fin (F.spec (↑q).fst).k) => outerPt q τ v hv ((F.spec (↑q).fst).leftIx j)) ((↑q).snd.2, fun (j : Fin (F.spec (↑q).fst).k) => outerPt q τ v hv ((F.spec (↑q).fst).rightIx j))

                                        The outer atom's interpretation says reachability in the outer walk, between the points the symbol's arguments encode.

                                        Dependency graph

                                        The extended interpretation #

                                        noncomputable def DescriptiveComplexity.TCInterpretation.CompositeBlock.extendOuter {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} (F : TCFamily (L₂.sum FirstOrder.Language.order)) {det : Bool} (C : I.CompositeBlock Dq hD F det) :

                                        The inner interpretation, extended to the outer family's vocabulary: the base symbols and the order as before, an outer reachability atom by DescriptiveComplexity.TCInterpretation.CompositeBlock.outerAtomF.

                                        Equations
                                        • One or more equations did not get rendered due to their size.
                                        Instances For
                                          Dependency graph
                                          noncomputable def DescriptiveComplexity.TCInterpretation.CompositeBlock.extendOuterLEquiv {L₁ L₂ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {F : TCFamily (L₂.sum FirstOrder.Language.order)} {det : Bool} (C : I.CompositeBlock Dq hD F det) {A : Type} [L₁.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {a₀ : A} (hbot : ∀ (a : A), a₀ a) (hdet : det = true∀ (i : F.Ix) (z : Fin (F.spec i).parI.ordInterp.MapRel A) (a b c : (F.spec i).Node (I.ordInterp.MapRel A)), (F.spec i).StepAt z a b(F.spec i).StepAt z a cb = c) :

                                          The extended interpretation produces the outer reduction's input: the inner structure, ordered lexicographically, expanded by the outer walks' reachability relations.

                                          Equations
                                          Instances For
                                            Dependency graph

                                            The composite interpretation #

                                            The sum of two families.

                                            Equations
                                            Instances For
                                              Dependency graph
                                              noncomputable def DescriptiveComplexity.TCInterpretation.CompositeBlock.compInterp {L₁ L₂ L₃ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] {Tag₁ Tag₂ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ d₂ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {det : Bool} (If : TCInterpretation (L₂.sum FirstOrder.Language.order) L₃ Tag₂ d₂) (C : I.CompositeBlock Dq hD If.fam det) :
                                              RelFOInterpretation ((L₁.sum FirstOrder.Language.order).sum C.B.lang) L₃ (Tag₂ × (Fin d₂Tag₁)) (d₂ * d₁)

                                              The composite interpretation: the outer interpretation composed with the extended inner one.

                                              Equations
                                              Instances For
                                                Dependency graph
                                                noncomputable def DescriptiveComplexity.TCInterpretation.CompositeBlock.compLEquiv {L₁ L₂ L₃ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] [L₃.IsRelational] {Tag₁ Tag₂ : Type} [Finite Tag₁] [LinearOrder Tag₁] {d₁ d₂ : } {I : TCInterpretation (L₁.sum FirstOrder.Language.order) L₂ Tag₁ d₁} {Dq : (q : I.fam.block.ι) → Decider L₁ (Fin (I.fam.block.arity q))} {hD : ∀ (A : Type) [inst : L₁.Structure A] [inst_1 : LinearOrder A] [Finite A] [Nonempty A] (q : I.fam.block.ι) (w : Fin (I.fam.block.arity q)A), (Dq q).Decides w (I.fam.reachAssign A q w)} {det : Bool} (If : TCInterpretation (L₂.sum FirstOrder.Language.order) L₃ Tag₂ d₂) (C : I.CompositeBlock Dq hD If.fam det) {A : Type} [L₁.Structure A] [LinearOrder A] [Finite A] [Nonempty A] {a₀ : A} (hbot : ∀ (a : A), a₀ a) (hdet : det = true∀ (i : If.fam.Ix) (z : Fin (If.fam.spec i).parI.ordInterp.MapRel A) (a b c : (If.fam.spec i).Node (I.ordInterp.MapRel A)), (If.fam.spec i).StepAt z a b(If.fam.spec i).StepAt z a cb = c) :
                                                L₃.Equiv ((compInterp If C).MapRel A) (If.Map (I.Map A))

                                                The composite produces the twice-interpreted structure.

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

                                                  Transitivity #

                                                  noncomputable def DescriptiveComplexity.TCReduction.trans {L₁ L₂ L₃ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] [L₃.IsRelational] {P : DecisionProblem L₁} {Q : DecisionProblem L₂} {R : DecisionProblem L₃} (g : TCReduction P Q) (f : TCReduction Q R) :

                                                  Transitivity of FO(TC) reductions. The composite's family is the inner family together with the outer family's walks pulled back and flattened; its interpretation is the outer one composed with the inner one extended to the outer walks' vocabulary.

                                                  Equations
                                                  • One or more equations did not get rendered due to their size.
                                                  Instances For
                                                    Dependency graph
                                                    noncomputable def DescriptiveComplexity.DTCReduction.trans {L₁ L₂ L₃ : FirstOrder.Language} [L₁.IsRelational] [L₂.IsRelational] [L₃.IsRelational] {P : DecisionProblem L₁} {Q : DecisionProblem L₂} {R : DecisionProblem L₃} (g : DTCReduction P Q) (f : DTCReduction Q R) :

                                                    Transitivity of FO(DTC) reductions. The same composite with the searching flat walks, read through its determinization: the inner walks are read deterministically as before, and the flat walks, being functional, are unchanged by it.

                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For
                                                      Dependency graph
                                                      @[instance_reducible]

                                                      Trans instance: FO(TC) reductions compose.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Dependency graph
                                                      @[instance_reducible]

                                                      Trans instance: FO(DTC) reductions compose.

                                                      Equations
                                                      • One or more equations did not get rendered due to their size.
                                                      Dependency graph