Documentation

DescriptiveComplexity.Problems.Wide.DrawOuter

The outer program: every call site but the evaluation #

The EXPSPACE program factors as an outer loop – startup, the sweep's advance, the convergence test, the copy-back, the output dispatch – around a per-address evaluation whose internals (gates, the VAL loop, the atom subroutines) are an order of magnitude larger. This file is the outer loop, with the evaluation abstract: its phase type PE, its site family and its boundary rules are parameters, exactly as DescriptiveComplexity.Draw.Prog.reaches_fileRoundTrip abstracts the middle of a trip.

The control flow:

Everything here is rules and shapes; the runs are DrawRun's.

The outer phases #

The phases of the outer program: one copy of its kit's phase shape per call site, the four bespoke phases, and the evaluation's phases.

Instances For
    Dependency graph
    Dependency graph

    The outer sites #

    The call sites of the outer program, plus the evaluation's.

    Instances For
      Dependency graph
      def DescriptiveComplexity.Draw.OuterSh (SE : Type) (ShE : SEType) :

      The rule shape of each outer site: the kit's rules, summed with the site's exit rules.

      Equations
      Instances For
        Dependency graph
        def DescriptiveComplexity.Draw.Data.exitG {L : FirstOrder.Language} (dt : Data L) {A : Type} (one : A) (g : dt.SlotIxA) :

        The standard exit guard at a kit end phase: at the marker, which is nobody's register.

        Equations
        Instances For
          Dependency graph
          def DescriptiveComplexity.Draw.Data.cmpG {L : FirstOrder.Language} (dt : Data L) {A : Type} (one : A) (g : dt.SlotIxA) :

          COMPARE's per-cell question, shared by the test's rules and the entering exits.

          Equations
          Instances For
            Dependency graph
            noncomputable def DescriptiveComplexity.Draw.Data.outerRule {L : FirstOrder.Language} (dt : Data L) {A Q PE SE : Type} (zero one : A) {ShE : SEType} (ruleE : (e : SE) → ShE eRule A Q dt.SlotIx (OuterPh PE)) (evalEntry evalEntryOut : PE) (i : OuterSite SE) :
            OuterSh SE ShE iRule A Q dt.SlotIx (OuterPh PE)

            The rules of the outer program: each site's kit rules at its phase copy, and its exit rules. The evaluation's rules – including its boundary rules into sweepAdv's and reset2's entries – are the parameter ruleE.

            Equations
            Instances For
              Dependency graph
              def DescriptiveComplexity.Draw.Data.outerOwner {PE SE : Type} (ownE : PESE) :
              OuterPh PEOuterSite SE

              The owner of each phase: the site whose copy of a phase shape it is; the evaluation's phases are owned through the parameter.

              Equations
              Instances For
                Dependency graph

                The in-shape separation, site by site #

                theorem DescriptiveComplexity.Draw.Data.outerSep {L : FirstOrder.Language} (dt : Data L) {A Q PE SE : Type} (zero one : A) {ShE : SEType} (hzo : zero one) {ruleE : (e : SE) → ShE eRule A Q dt.SlotIx (OuterPh PE)} {evalEntry evalEntryOut : PE} (hsepE : ∀ (e : SE) (ρ ρ' : ShE e) (f : QA) (g : dt.SlotIxA), (ruleE e ρ).guard f g(ruleE e ρ').guard f g(ruleE e ρ).srcPh = (ruleE e ρ').srcPhρ = ρ') (i : OuterSite SE) (ρ ρ' : OuterSh SE ShE i) (f : QA) (g : dt.SlotIxA) :
                (dt.outerRule zero one ruleE evalEntry evalEntryOut i ρ).guard f g(dt.outerRule zero one ruleE evalEntry evalEntryOut i ρ').guard f g(dt.outerRule zero one ruleE evalEntry evalEntryOut i ρ).srcPh = (dt.outerRule zero one ruleE evalEntry evalEntryOut i ρ').srcPhρ = ρ'

                Each outer site separates in-shape: the kit's separation on its own rules, its exit-disjointness against the exits, and the exits' guards or target phases against each other. This is the hsep field of the program's DescriptiveComplexity.Draw.Assembly.

                Dependency graph

                Ownership, and the assembly #

                theorem DescriptiveComplexity.Draw.Data.outerHowner {L : FirstOrder.Language} (dt : Data L) {A Q PE SE : Type} (zero one : A) {ShE : SEType} {ruleE : (e : SE) → ShE eRule A Q dt.SlotIx (OuterPh PE)} {evalEntry evalEntryOut : PE} {ownE : PESE} (hosrcE : ∀ (e : SE) (ρ : ShE e), ∃ (p : PE), (ruleE e ρ).srcPh = OuterPh.evalP p ownE p = e) (i : OuterSite SE) (ρ : OuterSh SE ShE i) :
                outerOwner ownE (dt.outerRule zero one ruleE evalEntry evalEntryOut i ρ).srcPh = i

                Every rule fires from a phase its site owns.

                Dependency graph
                noncomputable def DescriptiveComplexity.Draw.Data.outerAsm {L : FirstOrder.Language} (dt : Data L) {A Q PE SE : Type} (zero one : A) {ShE : SEType} {ruleE : (e : SE) → ShE eRule A Q dt.SlotIx (OuterPh PE)} {evalEntry evalEntryOut : PE} {ownE : PESE} (hosrcE : ∀ (e : SE) (ρ : ShE e), ∃ (p : PE), (ruleE e ρ).srcPh = OuterPh.evalP p ownE p = e) [Fintype Q] [Fintype dt.SlotIx] (hzo : zero one) (hsepE : ∀ (e : SE) (ρ ρ' : ShE e) (f : QA) (g : dt.SlotIxA), (ruleE e ρ).guard f g(ruleE e ρ').guard f g(ruleE e ρ).srcPh = (ruleE e ρ').srcPhρ = ρ') :
                Assembly A Q dt.SlotIx (OuterPh PE) (OuterSite SE)

                The outer program, assembled: the sites, their rules, ownership and in-shape separation, ready for DescriptiveComplexity.Draw.Assembly.prog and its Table.Sep. The evaluation contributes its site family, its boundary data and its own separation as parameters.

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