Documentation

DescriptiveComplexity.Problems.Wide.DrawAccCtl

The fold, in the control's slots #

DescriptiveComplexity.Problems.Wide.DrawAcc says what the machine must carry across the inner loop – one contribution per level plus the last leaf – and how a round rewrites it. This file puts that in the program's own slots, which is what the dstSt parameters of DescriptiveComplexity.Draw.Data.varRule are:

Every one of them is a function of the pointer alone, and each comes with the equation the run needs: what the next pointer's slots read back. The fold's own correctness is DrawAcc's; nothing here repeats it.

The accumulator vector #

def DescriptiveComplexity.Draw.Data.readVec {L : FirstOrder.Language} (dt : Data L) {A : Type} (one : A) {m : ℕ} (accs : Fin m → dt.CtlIx) (f : dt.CtlIx → A) (j : ℕ) :

A vector of control slots, read: one bit per index. Past the family it is False; a fold never looks there.

Equations
Instances For
    Dependency graph
    noncomputable def DescriptiveComplexity.Draw.Data.putVec {L : FirstOrder.Language} (dt : Data L) {A : Type} (zero one : A) {m : ℕ} (accs : Fin m → dt.CtlIx) (f : dt.CtlIx → A) (b : Fin m → Prop) :
    dt.CtlIx → A

    A vector of control slots, written.

    Equations
    Instances For
      Dependency graph
      def DescriptiveComplexity.Draw.Data.readAcc {L : FirstOrder.Language} (dt : Data L) {A : Type} (one : A) (f : dt.CtlIx → A) (j : ℕ) :

      The inner fold's accumulator vector, one bit per level.

      Equations
      Instances For
        Dependency graph
        noncomputable def DescriptiveComplexity.Draw.Data.putAcc {L : FirstOrder.Language} (dt : Data L) {A : Type} (zero one : A) (f : dt.CtlIx → A) (b : Fin dt.naDim → Prop) :
        dt.CtlIx → A

        The inner fold's accumulator vector, written.

        Equations
        Instances For
          Dependency graph
          def DescriptiveComplexity.Draw.Data.readSac {L : FirstOrder.Language} (dt : Data L) {A : Type} (one : A) (f : dt.CtlIx → A) (j : ℕ) :

          A sub-fold's accumulator vector: the element loops of the atom subroutines keep theirs in the sac slots, one per level of the defining sentence's own prefix.

          Equations
          Instances For
            Dependency graph
            noncomputable def DescriptiveComplexity.Draw.Data.putSac {L : FirstOrder.Language} (dt : Data L) {A : Type} (zero one : A) (f : dt.CtlIx → A) (b : Fin dt.eDim → Prop) :
            dt.CtlIx → A

            A sub-fold's accumulator vector, written.

            Equations
            Instances For
              Dependency graph

              The leaf flag #

              The leaf flag: the value of the matrix at the valuation the loop has just evaluated – the bit every carry absorbs.

              Equations
              Instances For
                Dependency graph
                noncomputable def DescriptiveComplexity.Draw.Data.postLeaf {L : FirstOrder.Language} (dt : Data L) {A : Type} (one : A) (v : dt.VarIx) (f : dt.CtlIx → A) :

                The matrix's Boolean value at the atoms' verdicts: what the machine knows once every atom subroutine has filed its bit.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  Dependency graph
                  noncomputable def DescriptiveComplexity.Draw.Data.setLeaf {L : FirstOrder.Language} (dt : Data L) {A : Type} (zero one : A) (b : Prop) (f : dt.CtlIx → A) :
                  dt.CtlIx → A

                  Storing the leaf.

                  Equations
                  Instances For
                    Dependency graph
                    @[simp]
                    theorem DescriptiveComplexity.Draw.Data.ctlBit_setLeaf {L : FirstOrder.Language} {dt : Data L} {A : Type} {zero one : A} (hzo : zero ≠ one) (b : Prop) (f : dt.CtlIx → A) :
                    dt.ctlBit one (dt.setLeaf zero one b f) dt.leafC ↔ b
                    Dependency graph

                    The three updates #

                    noncomputable def DescriptiveComplexity.Draw.Data.initAcc {L : FirstOrder.Language} (dt : Data L) {A : Type} (zero one : A) (pol : ℕ → Bool) (f : dt.CtlIx → A) :
                    dt.CtlIx → A

                    The folds at the empty valuation: every accumulator the polarity's unit.

                    Equations
                    Instances For
                      Dependency graph
                      noncomputable def DescriptiveComplexity.Draw.Data.accVerdict {L : FirstOrder.Language} (dt : Data L) {A : Type} (one : A) (pol : ℕ → Bool) (f : dt.CtlIx → A) :

                      The verdict the accumulators spell: the chain from level 0, closed by the leaf flag – the value of the whole prefix once the register is exhausted.

                      Equations
                      Instances For
                        Dependency graph
                        noncomputable def DescriptiveComplexity.Draw.Data.carryAcc {L : FirstOrder.Language} (dt : Data L) {A : Type} (zero one : A) (pol : ℕ → Bool) (c : ℕ) (f : dt.CtlIx → A) :
                        dt.CtlIx → A

                        The folds at an increment's carry block: the levels before the carry keep their bit, the carry level absorbs the chain below it, the levels after it reset.

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

                          The same for a sub-fold #

                          An element loop of an atom subroutine folds its own prefix – the defining sentence's – over the sac slots, with its own leaf flag. The three updates are the same three; only the family and the width change.

                          The sub-fold's leaf flag: the value of a defining sentence's matrix at the tuple the element loop has just read.

                          Equations
                          Instances For
                            Dependency graph
                            noncomputable def DescriptiveComplexity.Draw.Data.setSubLeaf {L : FirstOrder.Language} (dt : Data L) {A : Type} (zero one : A) (b : Prop) (f : dt.CtlIx → A) :
                            dt.CtlIx → A

                            Storing a sub-fold's leaf.

                            Equations
                            Instances For
                              Dependency graph
                              noncomputable def DescriptiveComplexity.Draw.Data.initSac {L : FirstOrder.Language} (dt : Data L) {A : Type} (zero one : A) (pol : ℕ → Bool) (f : dt.CtlIx → A) :
                              dt.CtlIx → A

                              A sub-fold at its first tuple.

                              Equations
                              Instances For
                                Dependency graph
                                noncomputable def DescriptiveComplexity.Draw.Data.sacVerdict {L : FirstOrder.Language} (dt : Data L) {A : Type} (one : A) (pol : ℕ → Bool) (f : dt.CtlIx → A) :

                                What a sub-fold concludes: the chain from level 0, closed by its leaf flag.

                                Equations
                                Instances For
                                  Dependency graph
                                  noncomputable def DescriptiveComplexity.Draw.Data.carrySac {L : FirstOrder.Language} (dt : Data L) {A : Type} (zero one : A) (pol : ℕ → Bool) (c : ℕ) (f : dt.CtlIx → A) :
                                  dt.CtlIx → A

                                  A sub-fold at a tuple successor, the carry coordinate given.

                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Instances For
                                    Dependency graph
                                    @[simp]
                                    theorem DescriptiveComplexity.Draw.Data.ctlBit_setSubLeaf {L : FirstOrder.Language} {dt : Data L} {A : Type} {zero one : A} (hzo : zero ≠ one) (b : Prop) (f : dt.CtlIx → A) :
                                    dt.ctlBit one (dt.setSubLeaf zero one b f) dt.subLeafC ↔ b
                                    Dependency graph

                                    What the two readings are worth #