Documentation

DescriptiveComplexity.Problems.Wide.DrawSeq

The sequencer: heterogeneous stages in a row #

The matrix of a step formula is evaluated atom by atom, and the gates block by block: a sequence of machineries of different shapes – a stage atom's random access here, a tag-branched element loop there – with a checkpoint between consecutive ones and an exit after the last. The chain combinator of DescriptiveComplexity.Problems.Wide.DrawChain fixes a single stage family; this file is its dependent sibling: n stages with their own phase and shape types (PA/SA-indexed families), n + 1 checkpoints, the k-th dispatching into stage k's entry and the last leaving.

The per-stage machineries and their separation are parameters, so the matrix instantiates this with the kind-dependent atom machineries and the gates with the per-block gate machinery, and neither needs a new checkpoint proof.

The shapes #

inductive DescriptiveComplexity.Draw.SeqPh (n : ) (PA : Fin nType) :

The phases of a sequence: n + 1 checkpoints and the stages'.

  • chk {n : } {PA : Fin nType} : Fin (n + 1)SeqPh n PA

    The checkpoint before stage k (at k = n: after the last).

  • sub {n : } {PA : Fin nType} (a : Fin n) : PA aSeqPh n PA

    A phase of stage a.

Instances For
    Dependency graph
    inductive DescriptiveComplexity.Draw.SeqSite (n : ) (SA : Fin nType) :

    The sites of a sequence.

    Instances For
      Dependency graph
      Dependency graph
      def DescriptiveComplexity.Draw.seqOwn {n : } {PA SA : Fin nType} (ownA : (a : Fin n) → PA aSA a) :
      SeqPh n PASeqSite n SA

      The owner of each phase of a sequence, over the stages' owners.

      Equations
      Instances For
        Dependency graph
        def DescriptiveComplexity.Draw.seqRule {A Q W P : Type} {n : } {PA SA : Fin nType} {ShA : (a : Fin n) → SA aType} (one : A) (wk rg : W) (emb : SeqPh n PAP) (ruleA : (a : Fin n) → (s : SA a) → ShA a sRule A Q W P) (entry : (a : Fin n) → PA a) (enterSt : Fin n(QA)(WA)QA) (exitPh : P) (i : SeqSite n SA) :
        SeqSh n ShA iRule A Q W P

        The rules of a sequence: per checkpoint the walk back and the dispatch – into the next stage's entry, or out after the last.

        Equations
        Instances For
          Dependency graph
          theorem DescriptiveComplexity.Draw.seqRule_dstIn {A Q W P : Type} {n : } {PA SA : Fin nType} {ShA : (a : Fin n) → SA aType} (one : A) (wk rg : W) (emb : SeqPh n PAP) (ruleA : (a : Fin n) → (s : SA a) → ShA a sRule A Q W P) (entry : (a : Fin n) → PA a) (enterSt : Fin n(QA)(WA)QA) (exitPh : P) {S : PProp} (hemb : ∀ (p : SeqPh n PA), S (emb p)) (hexit : S exitPh) (hA : ∀ (a : Fin n) (s : SA a) (ρ : ShA a s), S (ruleA a s ρ).dstPh) (i : SeqSite n SA) (ρ : SeqSh n ShA i) :
          S (seqRule one wk rg emb ruleA entry enterSt exitPh i ρ).dstPh

          A property of a sequence's phases and its exit holds of every phase it can move to, given it holds of every phase a stage can move to.

          Dependency graph
          theorem DescriptiveComplexity.Draw.seqHosrc {A Q W P : Type} {n : } {PA SA : Fin nType} {ShA : (a : Fin n) → SA aType} (one : A) (wk rg : W) (emb : SeqPh n PAP) (ruleA : (a : Fin n) → (s : SA a) → ShA a sRule A Q W P) (entry : (a : Fin n) → PA a) (enterSt : Fin n(QA)(WA)QA) (exitPh : P) (ownA : (a : Fin n) → PA aSA a) (hosrcA : ∀ (a : Fin n) (s : SA a) (ρ : ShA a s), ∃ (p : PA a), (ruleA a s ρ).srcPh = emb (SeqPh.sub a p) ownA a p = s) (i : SeqSite n SA) (ρ : SeqSh n ShA i) :
          ∃ (p : SeqPh n PA), (seqRule one wk rg emb ruleA entry enterSt exitPh i ρ).srcPh = emb p seqOwn ownA p = i

          Every rule of a sequence fires from a phase its site owns; the stages' obligation is the parameter.

          Dependency graph
          theorem DescriptiveComplexity.Draw.seqSep {A Q W P : Type} {n : } {PA SA : Fin nType} {ShA : (a : Fin n) → SA aType} (one : A) (wk rg : W) (emb : SeqPh n PAP) (ruleA : (a : Fin n) → (s : SA a) → ShA a sRule A Q W P) (entry : (a : Fin n) → PA a) (enterSt : Fin n(QA)(WA)QA) (exitPh : P) (hsepA : ∀ (a : Fin n) (s : SA a) (ρ ρ' : ShA a s) (f : QA) (g : WA), (ruleA a s ρ).guard f g(ruleA a s ρ').guard f g(ruleA a s ρ).srcPh = (ruleA a s ρ').srcPhρ = ρ') (i : SeqSite n SA) (ρ ρ' : SeqSh n ShA i) (f : QA) (g : WA) :
          (seqRule one wk rg emb ruleA entry enterSt exitPh i ρ).guard f g(seqRule one wk rg emb ruleA entry enterSt exitPh i ρ').guard f g(seqRule one wk rg emb ruleA entry enterSt exitPh i ρ).srcPh = (seqRule one wk rg emb ruleA entry enterSt exitPh i ρ').srcPhρ = ρ'

          A sequence separates in-shape: the checkpoints by the gadget's guards, the stages by their parameter.

          Dependency graph