Documentation

DescriptiveComplexity.Problems.Wide.DrawStageAtom

The stage atom's machinery: a random access #

The largest atom subroutine of the EXPSPACE program: to evaluate a stage atom R i' (w̄), the machine saves its mirror, builds the target address – one tuple loop per argument position, copying the source block of VAL or MIRROR into the target's block by named bits – resets to the bottom and seeks the target, reads the stage bit under the head, and comes back: restore the target from the save, reset, seek home.

The sites: two DescriptiveComplexity.Draw.CopyKit trips (save and restore), a DescriptiveComplexity.Draw.ClearKit trip (the target's blocks not written by any loop), the per-argument DescriptiveComplexity.Draw.tupleRule loops chained head to tail, two DescriptiveComplexity.Draw.ResetKit+ClearKit pairs with their erasing entry checkpoints, and two DescriptiveComplexity.Draw.SeekKit instances – the first's verdict exits are the read under the head, branching on the stage track's digit at the sought cell and storing it into the control.

As everywhere in the assembly, the semantic parameters – the loop-variable updates, the stored-bit updates, the verdict store – are dstSt/guard parameters; the shapes and their separation are what this file fixes.

The shapes #

The phases of a stage atom's machinery.

Instances For
    Dependency graph

    The sites of a stage atom's machinery.

    Instances For
      Dependency graph

      The rule shape of each site.

      Equations
      Instances For
        Dependency graph

        The owner of each phase of a stage atom's machinery.

        Equations
        Instances For
          Dependency graph

          The phase entering the loops, or the first reset checkpoint when there is no argument.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Dependency graph
            def DescriptiveComplexity.Draw.Data.stageNextTup {P : Type} {k : } (emb : StagePh kP) ( : Fin k) :
            P

            The phase after the -th loop.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              Dependency graph
              noncomputable def DescriptiveComplexity.Draw.Data.stageRule {L : FirstOrder.Language} (dt : Data L) {A Q P : Type} {k : } (zero one : A) (emb : StagePh kP) (srcTrack : Fin kdt.SlotIx) (srcBlk dstBlk : Fin kFin dt.ko Fin dt.ki) (coord : Fin dt.dd0Q) (bitFlag : (QA)Prop) (setBit : Bool(QA)(dt.SlotIxA)QA) (initLv advLv : (QA)(dt.SlotIxA)QA) (IsMaxLv : (QA)Prop) (oldSlot : dt.SlotIx) (setAv : Bool(QA)(dt.SlotIxA)QA) (exitPh : P) (i : StageSite k) :
              StageSh k iRule A Q dt.SlotIx P

              The rules of a stage atom's machinery.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                Dependency graph
                theorem DescriptiveComplexity.Draw.Data.stageRule_dstIn {L : FirstOrder.Language} (dt : Data L) {A Q P : Type} {k : } (zero one : A) {emb : StagePh kP} (srcTrack : Fin kdt.SlotIx) (srcBlk dstBlk : Fin kFin dt.ko Fin dt.ki) (coord : Fin dt.dd0Q) (bitFlag : (QA)Prop) (setBit : Bool(QA)(dt.SlotIxA)QA) (initLv advLv : (QA)(dt.SlotIxA)QA) (IsMaxLv : (QA)Prop) (oldSlot : dt.SlotIx) (setAv : Bool(QA)(dt.SlotIxA)QA) (exitPh : P) {S : PProp} (hemb : ∀ (p : StagePh k), S (emb p)) (hexit : S exitPh) (i : StageSite k) (ρ : StageSh k i) :
                S (dt.stageRule zero one emb srcTrack srcBlk dstBlk coord bitFlag setBit initLv advLv IsMaxLv oldSlot setAv exitPh i ρ).dstPh

                A property of a stage atom's phases and its exit holds of every phase it can move to: the save, the clear, the tuple loops, the two resets, the two mirror clears and the two seeks all stay inside the machinery's own phases, and only the last seek's verdict leaves. This is what a determinism-after-the-guess argument asks of the random access (DescriptiveComplexity.Draw.Data.nexProg_uniqueFrom).

                Dependency graph
                theorem DescriptiveComplexity.Draw.Data.stageHosrc {L : FirstOrder.Language} (dt : Data L) {A Q P : Type} {k : } (zero one : A) {emb : StagePh kP} (srcTrack : Fin kdt.SlotIx) (srcBlk dstBlk : Fin kFin dt.ko Fin dt.ki) (coord : Fin dt.dd0Q) (bitFlag : (QA)Prop) (setBit : Bool(QA)(dt.SlotIxA)QA) (initLv advLv : (QA)(dt.SlotIxA)QA) (IsMaxLv : (QA)Prop) (oldSlot : dt.SlotIx) (setAv : Bool(QA)(dt.SlotIxA)QA) (exitPh : P) (i : StageSite k) (ρ : StageSh k i) :
                ∃ (p : StagePh k), (dt.stageRule zero one emb srcTrack srcBlk dstBlk coord bitFlag setBit initLv advLv IsMaxLv oldSlot setAv exitPh i ρ).srcPh = emb p stageOwn p = i

                Every rule of a stage atom's machinery fires from a phase its site owns; the tuple loops' obligation is their own.

                Dependency graph
                theorem DescriptiveComplexity.Draw.Data.stageSep {L : FirstOrder.Language} (dt : Data L) {A Q P : Type} {k : } (zero one : A) {emb : StagePh kP} (srcTrack : Fin kdt.SlotIx) (srcBlk dstBlk : Fin kFin dt.ko Fin dt.ki) (coord : Fin dt.dd0Q) (bitFlag : (QA)Prop) (setBit : Bool(QA)(dt.SlotIxA)QA) (initLv advLv : (QA)(dt.SlotIxA)QA) (IsMaxLv : (QA)Prop) (oldSlot : dt.SlotIx) (setAv : Bool(QA)(dt.SlotIxA)QA) (exitPh : P) (hzo : zero one) (hemb : Function.Injective emb) (i : StageSite k) (ρ ρ' : StageSh k i) (f : QA) (g : dt.SlotIxA) :
                (dt.stageRule zero one emb srcTrack srcBlk dstBlk coord bitFlag setBit initLv advLv IsMaxLv oldSlot setAv exitPh i ρ).guard f g(dt.stageRule zero one emb srcTrack srcBlk dstBlk coord bitFlag setBit initLv advLv IsMaxLv oldSlot setAv exitPh i ρ').guard f g(dt.stageRule zero one emb srcTrack srcBlk dstBlk coord bitFlag setBit initLv advLv IsMaxLv oldSlot setAv exitPh i ρ).srcPh = (dt.stageRule zero one emb srcTrack srcBlk dstBlk coord bitFlag setBit initLv advLv IsMaxLv oldSlot setAv exitPh i ρ').srcPhρ = ρ'

                A stage atom's machinery separates in-shape.

                Dependency graph