Documentation

DescriptiveComplexity.Problems.Wide.DrawTagged

Tag-branched element loops: the expansion atoms and the domain gates #

An expansion atom's defining sentence – and a block's domain sentence – depends on the tags of its argument points. The machine reads them first: one named-bit read per argument position and candidate tag, at the canonical tag-witness cell, the verdicts stored one-hot in the control. A branch checkpoint then dispatches on the decoded tag tuple – one dispatch rule per tuple, their guards made exclusive by the decoding – into that tuple's own element loop (DescriptiveComplexity.Problems.Wide.DrawElem), which evaluates the sentence's prefix with one leaf read per block atom of its matrix.

The expansion atoms instantiate this at their arity, the domain gates at one argument. As everywhere, the shapes and separation are fixed here; the decodings and folds are parameters.

The shapes #

The rules of a branch checkpoint: the walk back, and one dispatch per tag tuple.

  • stay {T : Type} : BrRule T

    Walk left back to the marker.

  • dsp {T : Type} : TBrRule T

    Dispatch into the tuple's loop.

Instances For
    Dependency graph
    inductive DescriptiveComplexity.Draw.TagPh (m : ) (T : Type) (nrOf : T) :

    The phases of a tag-branched machinery: the witness reads, the branch checkpoint, and one element loop per tag tuple.

    • tagRdP {m : } {T : Type} {nrOf : T} : Fin mReadPhTagPh m T nrOf

      The i-th witness read.

    • brP {m : } {T : Type} {nrOf : T} : TagPh m T nrOf

      The branch checkpoint.

    • loopP {m : } {T : Type} {nrOf : T} (τ : T) : ElemPh (nrOf τ)TagPh m T nrOf

      A phase of the tuple's element loop.

    Instances For
      Dependency graph
      inductive DescriptiveComplexity.Draw.TagSite (m : ) (T : Type) (nrOf : T) :

      The sites of a tag-branched machinery.

      Instances For
        Dependency graph
        Dependency graph
        Dependency graph
        def DescriptiveComplexity.Draw.tagFirstRd {P T : Type} {m : } {nrOf : T} (emb : TagPh m T nrOfP) :
        P

        The first witness read's entry, or the branch checkpoint when there is none.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Dependency graph
          def DescriptiveComplexity.Draw.tagNextRd {P T : Type} {m : } {nrOf : T} (emb : TagPh m T nrOfP) (i : Fin m) :
          P

          The phase after the i-th witness read.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Dependency graph
            def DescriptiveComplexity.Draw.tagRule {A Q W P T : Type} {m : } {nrOf : T} (one : A) (wk rg : W) (emb : TagPh m T nrOfP) (rdTrackT : Fin mW) (MatchT : Fin m(QA)(WA)Prop) (setTagFlag : Fin mBool(QA)(WA)QA) (TagsAre : T(QA)Prop) (rdTrackE : (τ : T) → Fin (nrOf τ)W) (MatchE : (τ : T) → Fin (nrOf τ)(QA)(WA)Prop) (setFlagE : (τ : T) → Fin (nrOf τ)Bool(QA)(WA)QA) (initEl advEl exitSt : T(QA)(WA)QA) (IsMaxEl : T(QA)Prop) (exitPh : P) (i : TagSite m T nrOf) :
            TagSh m T nrOf iRule A Q W P

            The rules of a tag-branched machinery.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Dependency graph
              theorem DescriptiveComplexity.Draw.tagRule_dstPh {A Q W P T : Type} {m : } {nrOf : T} (one : A) (wk rg : W) {emb : TagPh m T nrOfP} (rdTrackT : Fin mW) (MatchT : Fin m(QA)(WA)Prop) (setTagFlag : Fin mBool(QA)(WA)QA) (TagsAre : T(QA)Prop) (rdTrackE : (τ : T) → Fin (nrOf τ)W) (MatchE : (τ : T) → Fin (nrOf τ)(QA)(WA)Prop) (setFlagE : (τ : T) → Fin (nrOf τ)Bool(QA)(WA)QA) (initEl advEl exitSt : T(QA)(WA)QA) (IsMaxEl : T(QA)Prop) (exitPh : P) (i : TagSite m T nrOf) (ρ : TagSh m T nrOf i) :
              (∃ (p : TagPh m T nrOf), (tagRule one wk rg emb rdTrackT MatchT setTagFlag TagsAre rdTrackE MatchE setFlagE initEl advEl exitSt IsMaxEl exitPh i ρ).dstPh = emb p) (tagRule one wk rg emb rdTrackT MatchT setTagFlag TagsAre rdTrackE MatchE setFlagE initEl advEl exitSt IsMaxEl exitPh i ρ).dstPh = exitPh

              A tag-branched machinery leaves only into its own phases or its exit: the witness reads' trips stay inside it, the branch lands in the decoded tag's loop, and only the loop's last dispatch leaves.

              Dependency graph
              theorem DescriptiveComplexity.Draw.tagRule_dstIn {A Q W P T : Type} {m : } {nrOf : T} (one : A) (wk rg : W) {emb : TagPh m T nrOfP} (rdTrackT : Fin mW) (MatchT : Fin m(QA)(WA)Prop) (setTagFlag : Fin mBool(QA)(WA)QA) (TagsAre : T(QA)Prop) (rdTrackE : (τ : T) → Fin (nrOf τ)W) (MatchE : (τ : T) → Fin (nrOf τ)(QA)(WA)Prop) (setFlagE : (τ : T) → Fin (nrOf τ)Bool(QA)(WA)QA) (initEl advEl exitSt : T(QA)(WA)QA) (IsMaxEl : T(QA)Prop) (exitPh : P) {S : PProp} (hemb : ∀ (p : TagPh m T nrOf), S (emb p)) (hexit : S exitPh) (i : TagSite m T nrOf) (ρ : TagSh m T nrOf i) :
              S (tagRule one wk rg emb rdTrackT MatchT setTagFlag TagsAre rdTrackE MatchE setFlagE initEl advEl exitSt IsMaxEl exitPh i ρ).dstPh

              A property of the machinery's phases and its exit holds of every phase it can move to.

              Dependency graph
              theorem DescriptiveComplexity.Draw.tagHosrc {A Q W P T : Type} {m : } {nrOf : T} (one : A) (wk rg : W) {emb : TagPh m T nrOfP} (rdTrackT : Fin mW) (MatchT : Fin m(QA)(WA)Prop) (setTagFlag : Fin mBool(QA)(WA)QA) (TagsAre : T(QA)Prop) (rdTrackE : (τ : T) → Fin (nrOf τ)W) (MatchE : (τ : T) → Fin (nrOf τ)(QA)(WA)Prop) (setFlagE : (τ : T) → Fin (nrOf τ)Bool(QA)(WA)QA) (initEl advEl exitSt : T(QA)(WA)QA) (IsMaxEl : T(QA)Prop) (exitPh : P) (i : TagSite m T nrOf) (ρ : TagSh m T nrOf i) :
              ∃ (p : TagPh m T nrOf), (tagRule one wk rg emb rdTrackT MatchT setTagFlag TagsAre rdTrackE MatchE setFlagE initEl advEl exitSt IsMaxEl exitPh i ρ).srcPh = emb p tagOwn p = i

              Every rule of a tag-branched machinery fires from a phase its site owns; the loops' obligation is the element loop's.

              Dependency graph
              theorem DescriptiveComplexity.Draw.tagSep {A Q W P T : Type} {m : } {nrOf : T} (one : A) (wk rg : W) {emb : TagPh m T nrOfP} (rdTrackT : Fin mW) (MatchT : Fin m(QA)(WA)Prop) (setTagFlag : Fin mBool(QA)(WA)QA) (TagsAre : T(QA)Prop) (rdTrackE : (τ : T) → Fin (nrOf τ)W) (MatchE : (τ : T) → Fin (nrOf τ)(QA)(WA)Prop) (setFlagE : (τ : T) → Fin (nrOf τ)Bool(QA)(WA)QA) (initEl advEl exitSt : T(QA)(WA)QA) (IsMaxEl : T(QA)Prop) (exitPh : P) (hemb : Function.Injective emb) (hTags : ∀ (τ τ' : T) (f : QA), TagsAre τ fTagsAre τ' fτ = τ') (i : TagSite m T nrOf) (ρ ρ' : TagSh m T nrOf i) (f : QA) (g : WA) :
              (tagRule one wk rg emb rdTrackT MatchT setTagFlag TagsAre rdTrackE MatchE setFlagE initEl advEl exitSt IsMaxEl exitPh i ρ).guard f g(tagRule one wk rg emb rdTrackT MatchT setTagFlag TagsAre rdTrackE MatchE setFlagE initEl advEl exitSt IsMaxEl exitPh i ρ').guard f g(tagRule one wk rg emb rdTrackT MatchT setTagFlag TagsAre rdTrackE MatchE setFlagE initEl advEl exitSt IsMaxEl exitPh i ρ).srcPh = (tagRule one wk rg emb rdTrackT MatchT setTagFlag TagsAre rdTrackE MatchE setFlagE initEl advEl exitSt IsMaxEl exitPh i ρ').srcPhρ = ρ'

              A tag-branched machinery separates in-shape: the reads by their kit, the branch's dispatches by the exclusive decoding, the loops by their own separation.

              Dependency graph