Documentation

DescriptiveComplexity.Problems.Wide.DrawTuple

The tuple loop: copying a block bit by bit #

The stage atoms of the EXPSPACE program build their TARGET register by copying a block of VAL or MIRROR into a block of TARGET, one bit per named cell: a loop over the tuples the control enumerates in its loop-variable slots, each round a read trip at the source cell, a write trip at the destination cell, and an advance-or-exit dispatch.

This is the first client of the chain combinator (DescriptiveComplexity.Problems.Wide.DrawChain): three checkpoints around two stages – a DescriptiveComplexity.Draw.ReadKit whose verdict exits store the bit into the control, and a DescriptiveComplexity.Draw.WriteKit whose written bit reads it back – with the loop's back edge a plain descriptor (the combinator's dispatches may target any phase). The loop-variable updates (initLv, advLv) and the exhaustion guard (IsMaxLv) stay parameters: their content – the lexicographic enumeration, tied to DescriptiveComplexity.Draw.reflTransGen_of_tupLoop – is fixed with the runs.

The shapes #

@[reducible, inline]

The stage phases of a tuple loop: the read trip's and the write trip's.

Equations
Instances For
    Dependency graph
    @[reducible, inline]

    The stage sites: false the read trip, true the write trip.

    Equations
    Instances For
      Dependency graph
      Dependency graph
      Dependency graph
      noncomputable def DescriptiveComplexity.Draw.tupleStageRule {A Q W P : Type} [DecidableEq W] (zero one : A) (wk rg : W) (emb : ChainPh 3 TuplePS → P) (tSrc tDst : W) (MatchS MatchD : (Q → A) → (W → A) → Prop) (bitFlag : (Q → A) → Prop) (setBit : Bool → (Q → A) → (W → A) → Q → A) (s : TupleSS) :
      TupleSh s → Rule A Q W P

      The stage rules: the read kit with its bit-storing verdict exits, the write kit with its return exit.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph
        def DescriptiveComplexity.Draw.tupleDsp {A Q W P : Type} (one : A) (wk rg : W) (emb : ChainPh 3 TuplePS → P) (initLv advLv : (Q → A) → (W → A) → Q → A) (IsMaxLv : (Q → A) → Prop) (exitPh : P) :
        Fin 3 → Bool → PreRule A Q W P

        The dispatch descriptors: begin the first round (initializing the loop variables), hand the stored bit to the write trip, and advance or leave.

        Equations
        • One or more equations did not get rendered due to their size.
        Instances For
          Dependency graph
          noncomputable def DescriptiveComplexity.Draw.tupleRule {A Q W P : Type} [DecidableEq W] (zero one : A) (wk rg : W) (emb : ChainPh 3 TuplePS → P) (tSrc tDst : W) (MatchS MatchD : (Q → A) → (W → A) → Prop) (bitFlag : (Q → A) → Prop) (setBit : Bool → (Q → A) → (W → A) → Q → A) (initLv advLv : (Q → A) → (W → A) → Q → A) (IsMaxLv : (Q → A) → Prop) (exitPh : P) (i : ChainSite 3 TupleSS) :
          ChainSh 3 TupleSS TupleSh i → Rule A Q W P

          The rules of a tuple loop, assembled by the chain combinator.

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