Documentation

DescriptiveComplexity.Problems.Wide.DrawTower

The phase tower: the program's phase and site types, assembled #

The full program's phase type, from the leaves up: per classified atom its machinery's phases – a stage atom's random access, an expansion atom's tag-branched loops, a comparison's coordinate loop – then the matrix as a sequence over the atoms, the gates as a sequence over the argument blocks, one variable's machinery around them, the evaluation's spine over the variable list, and the outer program around everything.

The kind-dependent types are indexed by the kind itself (DescriptiveComplexity.Draw.Data.KindPh and friends match on a DescriptiveComplexity.Draw.MatAtom), so every downstream definition reduces per constructor; the stuck DescriptiveComplexity.Draw.Data.kindOf application appears only at the instantiation (DescriptiveComplexity.Draw.Data.AtomPh etc.).

The element loops of an atom run one read trip per atom of the defining matrix – the guard atoms' trips read a harmless witness cell and their flags are ignored by the folds – so the loop lengths match the DescriptiveComplexity.Draw.Data.kindReads budgets exactly.

The per-kind machinery types #

noncomputable def DescriptiveComplexity.Draw.Data.relNr {L : FirstOrder.Language} (dt : Data L) {k : } (e : dt.X.E.Relations k) (τ : Fin kdt.X.Tag) :

The loop count of an expansion atom's branch: one read per block atom of the defining matrix – the base-vocabulary atoms are guards and need no trip.

Equations
Instances For
    Dependency graph
    noncomputable def DescriptiveComplexity.Draw.Data.domNr {L : FirstOrder.Language} (dt : Data L) (t : dt.X.Tag) :

    The loop count of a domain branch.

    Equations
    Instances For
      Dependency graph
      noncomputable def DescriptiveComplexity.Draw.Data.KindPh {L : FirstOrder.Language} (dt : Data L) {n : } :
      MatAtom dt.X dt.d.B nType

      The machinery phases of an atom kind: a stage atom's random access, an expansion atom's tag-branched loops, a comparison's coordinate loop.

      Equations
      Instances For
        Dependency graph
        Dependency graph
        Dependency graph

        The tower #

        noncomputable def DescriptiveComplexity.Draw.Data.AtomPh {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) (a : Fin (dt.natOf v)) :

        The machinery phases of the a-th atom of a variable's matrix.

        Equations
        Instances For
          Dependency graph
          noncomputable def DescriptiveComplexity.Draw.Data.AtomSite {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) (a : Fin (dt.natOf v)) :

          The machinery sites of the a-th atom.

          Equations
          Instances For
            Dependency graph
            noncomputable def DescriptiveComplexity.Draw.Data.AtomSh {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) (a : Fin (dt.natOf v)) :
            dt.AtomSite v aType

            The rule shapes of the a-th atom's sites.

            Equations
            Instances For
              Dependency graph

              The matrix's phases: the sequence over the classified atoms.

              Equations
              Instances For
                Dependency graph

                The matrix's sites.

                Equations
                Instances For
                  Dependency graph

                  One gate block's phases: the well-shapedness file test, and the tag-branched domain evaluation.

                  Equations
                  Instances For
                    Dependency graph

                    One gate block's sites: the file test's, and the domain evaluation's.

                    Equations
                    Instances For
                      Dependency graph

                      The rule shape of a gate block's sites.

                      Equations
                      Instances For
                        Dependency graph

                        The gates' phases: the sequence over the argument blocks.

                        Equations
                        Instances For
                          Dependency graph

                          The gates' sites.

                          Equations
                          Instances For
                            Dependency graph
                            noncomputable def DescriptiveComplexity.Draw.Data.nIn {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) :

                            The number of quantified levels of a variable's pack.

                            Equations
                            Instances For
                              Dependency graph

                              The inner gates' phases: one gate block per quantified level of the variable's pack, at the VAL register's blocks.

                              Equations
                              Instances For
                                Dependency graph

                                The inner gates' sites.

                                Equations
                                Instances For
                                  Dependency graph

                                  One round's machinery phases: the inner gates, the branch, and the matrix.

                                  Equations
                                  Instances For
                                    Dependency graph
                                    noncomputable def DescriptiveComplexity.Draw.Data.VarPhF {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) :

                                    One variable's machinery phases, gates and round plugged in.

                                    Equations
                                    Instances For
                                      Dependency graph

                                      The enumeration of the fixed-point variables.

                                      Equations
                                      Instances For
                                        Dependency graph

                                        The number of fixed-point variables.

                                        Equations
                                        Instances For
                                          Dependency graph
                                          noncomputable def DescriptiveComplexity.Draw.Data.varAt {L : FirstOrder.Language} (dt : Data L) (j : Fin dt.nv) :

                                          The variable at a spine position.

                                          Equations
                                          Instances For
                                            Dependency graph

                                            The evaluation's machinery phases: one copy of the variable machinery per spine position, and the output's.

                                            Equations
                                            Instances For
                                              Dependency graph
                                              @[reducible]

                                              The evaluation's phases: the spine over the machineries.

                                              Equations
                                              Instances For
                                                Dependency graph
                                                @[reducible]

                                                The program's phases.

                                                Equations
                                                Instances For
                                                  Dependency graph

                                                  The site tower #

                                                  noncomputable def DescriptiveComplexity.Draw.Data.MatrixSh {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) :
                                                  dt.MatrixSite vType

                                                  The rule shape of the matrix's sites.

                                                  Equations
                                                  Instances For
                                                    Dependency graph
                                                    noncomputable def DescriptiveComplexity.Draw.Data.GatesSh {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) :
                                                    dt.GatesSite vType

                                                    The rule shape of the gates' sites.

                                                    Equations
                                                    Instances For
                                                      Dependency graph
                                                      noncomputable def DescriptiveComplexity.Draw.Data.IGatesSh {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) :
                                                      dt.IGatesSite vType

                                                      The rule shape of the inner gates' sites.

                                                      Equations
                                                      Instances For
                                                        Dependency graph

                                                        One round's machinery sites.

                                                        Equations
                                                        Instances For
                                                          Dependency graph
                                                          noncomputable def DescriptiveComplexity.Draw.Data.RoundShF {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) :
                                                          dt.RoundSiteF vType

                                                          The rule shape of one round's machinery sites.

                                                          Equations
                                                          Instances For
                                                            Dependency graph

                                                            One variable's machinery sites.

                                                            Equations
                                                            Instances For
                                                              Dependency graph
                                                              noncomputable def DescriptiveComplexity.Draw.Data.VarShF {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) :
                                                              dt.VarSiteF vType

                                                              The rule shape of one variable's machinery sites.

                                                              Equations
                                                              Instances For
                                                                Dependency graph

                                                                The evaluation's machinery sites.

                                                                Equations
                                                                Instances For
                                                                  Dependency graph
                                                                  noncomputable def DescriptiveComplexity.Draw.Data.SMSh {L : FirstOrder.Language} (dt : Data L) :
                                                                  dt.SMFType

                                                                  The rule shape of the evaluation's machinery sites.

                                                                  Equations
                                                                  Instances For
                                                                    Dependency graph

                                                                    The evaluation's sites.

                                                                    Equations
                                                                    Instances For
                                                                      Dependency graph
                                                                      noncomputable def DescriptiveComplexity.Draw.Data.SESh {L : FirstOrder.Language} (dt : Data L) :
                                                                      dt.SEFType

                                                                      The rule shape of the evaluation's sites.

                                                                      Equations
                                                                      Instances For
                                                                        Dependency graph

                                                                        The program's sites.

                                                                        Equations
                                                                        Instances For
                                                                          Dependency graph
                                                                          noncomputable def DescriptiveComplexity.Draw.Data.SFSh {L : FirstOrder.Language} (dt : Data L) :
                                                                          dt.SFType

                                                                          The rule shape of the program's sites.

                                                                          Equations
                                                                          Instances For
                                                                            Dependency graph

                                                                            The owner maps of the tower #

                                                                            Each machinery's phases are owned by its sites – the per-shape maps live with their rules (DescriptiveComplexity.Draw.elemOwn and friends); the maps below compose them up the tower.

                                                                            Dependency graph

                                                                            The owner map of a gate block.

                                                                            Equations
                                                                            Instances For
                                                                              Dependency graph
                                                                              noncomputable def DescriptiveComplexity.Draw.Data.roundOwnF {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) :
                                                                              dt.RoundPhF vdt.RoundSiteF v

                                                                              The owner map of one round's machinery.

                                                                              Equations
                                                                              • One or more equations did not get rendered due to their size.
                                                                              Instances For
                                                                                Dependency graph
                                                                                noncomputable def DescriptiveComplexity.Draw.Data.varOwnF {L : FirstOrder.Language} (dt : Data L) (v : dt.VarIx) :
                                                                                dt.VarPhF vdt.VarSiteF v

                                                                                The owner map of one variable's machinery.

                                                                                Equations
                                                                                Instances For
                                                                                  Dependency graph
                                                                                  noncomputable def DescriptiveComplexity.Draw.Data.smOwn {L : FirstOrder.Language} (dt : Data L) :
                                                                                  dt.PMFdt.SMF

                                                                                  The owner map of the evaluation's machineries.

                                                                                  Equations
                                                                                  Instances For
                                                                                    Dependency graph
                                                                                    noncomputable def DescriptiveComplexity.Draw.Data.seOwn {L : FirstOrder.Language} (dt : Data L) :
                                                                                    dt.PEFdt.SEF

                                                                                    The owner map of the evaluation's phases.

                                                                                    Equations
                                                                                    Instances For
                                                                                      Dependency graph
                                                                                      noncomputable def DescriptiveComplexity.Draw.Data.sfOwn {L : FirstOrder.Language} (dt : Data L) :
                                                                                      dt.PFdt.SF

                                                                                      The owner map of the program's phases.

                                                                                      Equations
                                                                                      Instances For
                                                                                        Dependency graph

                                                                                        Finiteness, up the tower #

                                                                                        The machine's universe carries the phases (and the rule names) as tags, so every type of the tower is finite; the instances go by injection into sums of the components'.

                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        instance DescriptiveComplexity.Draw.instFiniteTagPh {m : } {T : Type} [Finite T] {nrOf : T} :
                                                                                        Finite (TagPh m T nrOf)
                                                                                        Dependency graph
                                                                                        instance DescriptiveComplexity.Draw.instFiniteTagSite {m : } {T : Type} [Finite T] {nrOf : T} :
                                                                                        Finite (TagSite m T nrOf)
                                                                                        Dependency graph
                                                                                        instance DescriptiveComplexity.Draw.instFiniteSeqPh {n : } {PA : Fin nType} [∀ (a : Fin n), Finite (PA a)] :
                                                                                        Finite (SeqPh n PA)
                                                                                        Dependency graph
                                                                                        instance DescriptiveComplexity.Draw.instFiniteSeqSite {n : } {SA : Fin nType} [∀ (a : Fin n), Finite (SA a)] :
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph
                                                                                        Dependency graph