Documentation

DescriptiveComplexity.Problems.Wide.DrawIxPack

A gated position's semantic pack, at an arbitrary file and phase #

What a leg of the evaluation is run with is a pack per position and VAL content: the points the position's argument blocks encode. This file builds them – it does not assume them – from the two bridges a coarse file needs (hpassEnc, hgateEnc) and nothing else, so the space-bounded program and the clocked one get their packs from the same place.

The construction is one step: a gated position's blocks are encodings (ixIsEnc_of_gatedAt, the bridge read forwards), and ixPassSem turns encodings into a pack. ixGatedSem is that pack at the state the matrix's atoms run at, ixGatedSem₀ at the round's own, and ixGatedSem_eq_semCastT says the first is the second transported – which is what the VAL loop's bridge asks of a threaded family. The transport lemmas under them (ixPassW_congr, ixKindSemCast_passSem, and the one-pack family) say the same thing once: a pack sees the state through the mirror and VAL alone.

theorem DescriptiveComplexity.Draw.Data.ixPassW_congr {L : FirstOrder.Language} (dt : Data L) {A R P : Type} [LinearOrder A] [LinearOrder R] [LinearOrder P] [FirstOrder.Language.wide.Structure (Univ A R P dt.KIx dt.dd)] [Finite A] {I : Type} (F : LaidFile dt A R P I) {elt : IUniv A R P dt.KIx dt.dd} [Nonempty A] [L.Structure A] {zero one : A} (hzo : zero one) (hpassEnc' : ∀ (vi : dt.VarIx) (stV : TapeSt dt A R P I) ( : Fin (dt.nIn vi)), dt.ixIGPassP F zero one vi stV IsEnc dt.ly zero one (wmBlk (ixAddr elt stV.val) (Tag.arg (toLex (dt.igBlk vi ))))) (_hlin : IsLinOrd WMLe) (vi : dt.VarIx) {st st' : TapeSt dt A R P I} (hmir : st.mir = st'.mir) (hval : st.val = st'.val) (hp : ∀ ( : Fin (dt.nIn vi)), dt.ixIGPassP F zero one vi st ) (hp' : ∀ ( : Fin (dt.nIn vi)), dt.ixIGPassP F zero one vi st' ) (mbW : Fin (dt.arOf vi)dt.X.Map A) (hmb : ∀ ( : Fin (dt.arOf vi)), wmBlk (ixAddr elt st.mir) (Tag.arg (toLex (Sum.inl (Fin.castLE )))) = encMap dt.ly zero one (mbW )) (hmb' : ∀ ( : Fin (dt.arOf vi)), wmBlk (ixAddr elt st'.mir) (Tag.arg (toLex (Sum.inl (Fin.castLE )))) = encMap dt.ly zero one (mbW )) :
dt.ixPassW F zero one hpassEnc' vi st hp mbW = dt.ixPassW F zero one hpassEnc' vi st' hp' mbW

A passing round's valuation depends on the registers alone: both states' choices encode the same block value, and the encoding is injective.

Dependency graph
theorem DescriptiveComplexity.Draw.Data.ixKindSemCast_passSem {L : FirstOrder.Language} (dt : Data L) {A R P : Type} [LinearOrder A] [LinearOrder R] [LinearOrder P] [FirstOrder.Language.wide.Structure (Univ A R P dt.KIx dt.dd)] [Finite A] {I : Type} (F : LaidFile dt A R P I) {elt : IUniv A R P dt.KIx dt.dd} [Nonempty A] [L.Structure A] {zero one : A} (hzo : zero one) (hpassEnc' : ∀ (vi : dt.VarIx) (stV : TapeSt dt A R P I) ( : Fin (dt.nIn vi)), dt.ixIGPassP F zero one vi stV IsEnc dt.ly zero one (wmBlk (ixAddr elt stV.val) (Tag.arg (toLex (dt.igBlk vi ))))) (hlin : IsLinOrd WMLe) (vi : dt.VarIx) {st st' : TapeSt dt A R P I} (hmir : st.mir = st'.mir) (hval : st.val = st'.val) (hp : ∀ ( : Fin (dt.nIn vi)), dt.ixIGPassP F zero one vi st ) (hp' : ∀ ( : Fin (dt.nIn vi)), dt.ixIGPassP F zero one vi st' ) (mbW : Fin (dt.arOf vi)dt.X.Map A) (hmb : ∀ ( : Fin (dt.arOf vi)), wmBlk (ixAddr elt st.mir) (Tag.arg (toLex (Sum.inl (Fin.castLE )))) = encMap dt.ly zero one (mbW )) (hmb' : ∀ ( : Fin (dt.arOf vi)), wmBlk (ixAddr elt st'.mir) (Tag.arg (toLex (Sum.inl (Fin.castLE )))) = encMap dt.ly zero one (mbW )) (b : Fin (dt.natOf vi)) :
dt.ixKindSemCast zero one vi hmir hval (dt.kindOf vi b) (dt.ixPassSem F hpassEnc' vi st hp mbW hmb b) = dt.ixPassSem F hpassEnc' vi st' hp' mbW hmb' b

The pass's pack transports to the pass's pack: what a spine position's hsem is discharged by, when its pack is the entry state's carried forward by ixKindSemCast.

Dependency graph
noncomputable def DescriptiveComplexity.Draw.Data.ixSpineSem {L : FirstOrder.Language} (dt : Data L) {A R P : Type} [LinearOrder A] [LinearOrder R] [LinearOrder P] [FirstOrder.Language.wide.Structure (Univ A R P dt.KIx dt.dd)] [Finite A] {I : Type} (F : LaidFile dt A R P I) {elt : IUniv A R P dt.KIx dt.dd} [Nonempty A] [L.Structure A] {ιV : Type} (zero one : A) (vi : dt.VarIx) {st₀ st : TapeSt dt A R P I} (mV : ιVIProp) (sem₀ : (a : ιV) → (∀ ( : Fin (dt.nIn vi)), dt.ixIGPassP F zero one vi (dt.ixRoundSt st₀ (mV a)) )(b : Fin (dt.natOf vi)) → dt.IxKindSem zero one vi (dt.ixRoundSt st₀ (mV a)) elt (dt.kindOf vi b)) (hmir : st.mir = st₀.mir) (a : ιV) (hp : ∀ ( : Fin (dt.nIn vi)), dt.ixIGPassP F zero one vi (dt.ixRoundSt st (mV a)) ) (b : Fin (dt.natOf vi)) :
dt.IxKindSem zero one vi (dt.ixRoundSt st (mV a)) elt (dt.kindOf vi b)

One pack, carried to every position of the spine: the packs of the positions are the entry state's, transported. This is what makes the per-position family definable – the recursion that builds the tape family needs a pack at each of its own states, and here it has one as soon as the mirror rides.

Equations
Instances For
    Dependency graph
    noncomputable def DescriptiveComplexity.Draw.Data.ixSpineSemT {L : FirstOrder.Language} (dt : Data L) {A R P : Type} [LinearOrder A] [LinearOrder R] [LinearOrder P] [FirstOrder.Language.wide.Structure (Univ A R P dt.KIx dt.dd)] [Finite A] {I : Type} (F : LaidFile dt A R P I) {elt : IUniv A R P dt.KIx dt.dd} [Nonempty A] [L.Structure A] {ιV : Type} (zero one : A) (vi : dt.VarIx) {st₀ st : TapeSt dt A R P I} {v : Univ A R P dt.KIx dt.ddProp} (mV : ιVIProp) (sem₀ : (a : ιV) → (∀ ( : Fin (dt.nIn vi)), dt.ixIGPassP F zero one vi (dt.ixRoundSt st₀ (mV a)) )(b : Fin (dt.natOf vi)) → dt.IxKindSem zero one vi (dt.ixRoundSt st₀ (mV a)) elt (dt.kindOf vi b)) (hmir : st.mir = st₀.mir) (p : dt.IxScratch A R P I) (a : ιV) (hp : ∀ ( : Fin (dt.nIn vi)), dt.ixIGPassP F zero one vi (ixVarRdSt st p (mV a)) ) (b : Fin (dt.natOf vi)) :
    dt.IxKindSem zero one vi (dt.ixMatSt vi (ixVarRdSt st p (mV a)) v b) elt (dt.kindOf vi b)

    One pack, carried to every round of every position – threaded: as DescriptiveComplexity.Draw.Data.ixSpineSem, at the states the VAL loop's own thread produces. Those differ from the position's entry state in the two scratch registers and the register they enumerate, and a pack reads the state through the mirror and VAL alone, so the entry state's pack transports to all of them.

    Equations
    Instances For
      Dependency graph

      What a gated position knows #

      The branch DescriptiveComplexity.Draw.Data.ixGatedAt takes is not merely the one where the machine runs the machinery: it is the one where the argument blocks are encodings, which is what a semantic pack needs to exist at all. DescriptiveComplexity.Draw.Data.gate_trichotomy says the three legs are exhaustive; read in the other direction it says a gated position's blocks encode points.

      theorem DescriptiveComplexity.Draw.Data.ixIsEnc_of_gatedAt {L : FirstOrder.Language} (dt : Data L) {A R P : Type} [Fintype dt.SlotIx] [LinearOrder A] [LinearOrder R] [LinearOrder P] [FirstOrder.Language.wide.Structure (Univ A R P dt.KIx dt.dd)] [Finite A] {PR : Prog A R P dt.CtlIx dt.SlotIx dt.KIx dt.dd} {I : Type} (F : LaidFile dt A R P I) {elt : IUniv A R P dt.KIx dt.dd} [Nonempty A] [L.Structure A] (hgateEnc : ∀ (j : Fin dt.nv) (st : TapeSt dt A R P I), dt.ixGatedAt F j st ∀ ( : Fin (dt.arOf (dt.varAt j))), IsEnc dt.ly PR.zero PR.one (wmBlk (ixAddr elt st.mir) (Tag.arg (toLex (Sum.inl (Fin.castLE )))))) (j : Fin dt.nv) (st : TapeSt dt A R P I) (hg : dt.ixGatedAt F j st) ( : Fin (dt.arOf (dt.varAt j))) :
      IsEnc dt.ly PR.zero PR.one (wmBlk (ixAddr elt st.mir) (Tag.arg (toLex (Sum.inl (Fin.castLE )))))

      A gated position's argument blocks are encodings – the converse of testOf_of_encMap/wit_of_encMap/domHolds_of_encMap, off the trichotomy. This is what makes a position's semantic pack constructible rather than assumed: at a junk position no pack exists, and at a gated one the points are the blocks' own.

      Dependency graph
      noncomputable def DescriptiveComplexity.Draw.Data.ixGatedSem {L : FirstOrder.Language} (dt : Data L) {A R P : Type} [Fintype dt.SlotIx] [LinearOrder A] [LinearOrder R] [LinearOrder P] [FirstOrder.Language.wide.Structure (Univ A R P dt.KIx dt.dd)] [Finite A] {PR : Prog A R P dt.CtlIx dt.SlotIx dt.KIx dt.dd} {I : Type} (F : LaidFile dt A R P I) {elt : IUniv A R P dt.KIx dt.dd} [Nonempty A] [L.Structure A] (hpassEnc : ∀ (vi : dt.VarIx) (stV : TapeSt dt A R P I) ( : Fin (dt.nIn vi)), dt.ixIGPassP F PR.zero PR.one vi stV IsEnc dt.ly PR.zero PR.one (wmBlk (ixAddr elt stV.val) (Tag.arg (toLex (dt.igBlk vi ))))) (hgateEnc : ∀ (j : Fin dt.nv) (st : TapeSt dt A R P I), dt.ixGatedAt F j st ∀ ( : Fin (dt.arOf (dt.varAt j))), IsEnc dt.ly PR.zero PR.one (wmBlk (ixAddr elt st.mir) (Tag.arg (toLex (Sum.inl (Fin.castLE )))))) (_hzo : PR.zero PR.one) (_hlin : IsLinOrd WMLe) {v : Univ A R P dt.KIx dt.ddProp} {ιV : Type} (mV : ιVIProp) (j : Fin dt.nv) (st : TapeSt dt A R P I) (hg : dt.ixGatedAt F j st) (p : dt.IxScratch A R P I) (a : ιV) (hp : ∀ ( : Fin (dt.nIn (dt.varAt j))), dt.ixIGPassP F PR.zero PR.one (dt.varAt j) (ixVarRdSt st p (mV a)) ) (b : Fin (dt.natOf (dt.varAt j))) :
      dt.IxKindSem PR.zero PR.one (dt.varAt j) (dt.ixMatSt (dt.varAt j) (ixVarRdSt st p (mV a)) v b) elt (dt.kindOf (dt.varAt j) b)

      A gated position's semantic pack, built – not assumed. The blocks are encodings (ixIsEnc_of_gatedAt), so their points are the valuation the pass decodes, and ixPassSem builds the pack there; ixKindSemCast carries it to the state the matrix's atoms run at, which differs from it in the two scratch registers alone. This is what a branched leg's semT is.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        Dependency graph
        noncomputable def DescriptiveComplexity.Draw.Data.ixGatedSem₀ {L : FirstOrder.Language} (dt : Data L) {A R P : Type} [Fintype dt.SlotIx] [LinearOrder A] [LinearOrder R] [LinearOrder P] [FirstOrder.Language.wide.Structure (Univ A R P dt.KIx dt.dd)] [Finite A] {PR : Prog A R P dt.CtlIx dt.SlotIx dt.KIx dt.dd} {I : Type} (F : LaidFile dt A R P I) {elt : IUniv A R P dt.KIx dt.dd} [Nonempty A] [L.Structure A] (hpassEnc : ∀ (vi : dt.VarIx) (stV : TapeSt dt A R P I) ( : Fin (dt.nIn vi)), dt.ixIGPassP F PR.zero PR.one vi stV IsEnc dt.ly PR.zero PR.one (wmBlk (ixAddr elt stV.val) (Tag.arg (toLex (dt.igBlk vi ))))) (hgateEnc : ∀ (j : Fin dt.nv) (st : TapeSt dt A R P I), dt.ixGatedAt F j st ∀ ( : Fin (dt.arOf (dt.varAt j))), IsEnc dt.ly PR.zero PR.one (wmBlk (ixAddr elt st.mir) (Tag.arg (toLex (Sum.inl (Fin.castLE )))))) (_hzo : PR.zero PR.one) (_hlin : IsLinOrd WMLe) {ιV : Type} (mV : ιVIProp) (j : Fin dt.nv) (st : TapeSt dt A R P I) (hg : dt.ixGatedAt F j st) (a : ιV) (hp : ∀ ( : Fin (dt.nIn (dt.varAt j))), dt.ixIGPassP F PR.zero PR.one (dt.varAt j) (dt.ixRoundSt st (mV a)) ) (b : Fin (dt.natOf (dt.varAt j))) :
        dt.IxKindSem PR.zero PR.one (dt.varAt j) (dt.ixRoundSt st (mV a)) elt (dt.kindOf (dt.varAt j) b)

        The gated position's pack at the round state – the same points, at the state the semantics names. ixGatedSem is this pack transported (ixGatedSem_eq_semCastT), which is what the VAL loop's bridge asks of a threaded family.

        Equations
        Instances For
          Dependency graph
          theorem DescriptiveComplexity.Draw.Data.ixGatedSem_eq_semCastT {L : FirstOrder.Language} (dt : Data L) {A R P : Type} [Fintype dt.SlotIx] [LinearOrder A] [LinearOrder R] [LinearOrder P] [FirstOrder.Language.wide.Structure (Univ A R P dt.KIx dt.dd)] [Finite A] {PR : Prog A R P dt.CtlIx dt.SlotIx dt.KIx dt.dd} {I : Type} (F : LaidFile dt A R P I) {elt : IUniv A R P dt.KIx dt.dd} [Nonempty A] [L.Structure A] (hpassEnc : ∀ (vi : dt.VarIx) (stV : TapeSt dt A R P I) ( : Fin (dt.nIn vi)), dt.ixIGPassP F PR.zero PR.one vi stV IsEnc dt.ly PR.zero PR.one (wmBlk (ixAddr elt stV.val) (Tag.arg (toLex (dt.igBlk vi ))))) (hgateEnc : ∀ (j : Fin dt.nv) (st : TapeSt dt A R P I), dt.ixGatedAt F j st ∀ ( : Fin (dt.arOf (dt.varAt j))), IsEnc dt.ly PR.zero PR.one (wmBlk (ixAddr elt st.mir) (Tag.arg (toLex (Sum.inl (Fin.castLE )))))) {v : Univ A R P dt.KIx dt.ddProp} (hzo : PR.zero PR.one) (hlin : IsLinOrd WMLe) {ιV : Type} (mV : ιVIProp) (j : Fin dt.nv) (st : TapeSt dt A R P I) (hg : dt.ixGatedAt F j st) :
          dt.ixGatedSem F hpassEnc hgateEnc hzo hlin mV j st hg = ixSemCastT F (dt.varAt j) st v mV (dt.ixGatedSem₀ F hpassEnc hgateEnc hzo hlin mV j st hg)

          A gated position's pack is one pack transported: its points are the address's blocks, which the scratch registers do not touch, so the family the machinery is run with is ixSemCastT at DescriptiveComplexity.Draw.Data.ixGatedSem₀ – the hypothesis the VAL loop's bridge (ixVarFMT_eq_varFM) is stated under.

          Dependency graph

          The gates' bridge, proved #

          hgateEnc is a hypothesis of the layers above because an arbitrary file need not have a register for every element it is asked about. Where it does – any file laid by blocks and tuples – the bridge is the elementwise one (gate_trichotomy and testOf_of_encMap) read through DescriptiveComplexity.Draw.Data.wellShapedG_ixBack_iff.

          theorem DescriptiveComplexity.Draw.Data.ixGatedAt_iff_isEnc {L : FirstOrder.Language} (dt : Data L) {A R P : Type} [Fintype dt.SlotIx] [LinearOrder A] [LinearOrder R] [LinearOrder P] [FirstOrder.Language.wide.Structure (Univ A R P dt.KIx dt.dd)] [Finite A] {PR : Prog A R P dt.CtlIx dt.SlotIx dt.KIx dt.dd} {I : Type} (F : LaidFile dt A R P I) {elt : IUniv A R P dt.KIx dt.dd} (hinj : Function.Injective elt) (hix : IsLinOrd F.le) (hblkP : ∀ (u : I), F.blk u = tagBlk (elt u).1) [Nonempty A] [L.Structure A] (RF : RegFile (Univ A R P dt.KIx dt.dd)) (hargP : ∀ (u : I), F.arg u = (elt u).2) (hzo : PR.zero PR.one) (hlin : IsLinOrd WMLe) (j : Fin dt.nv) (st : TapeSt dt A R P I) :
          dt.ixGatedAt F j st ∀ ( : Fin (dt.arOf (dt.varAt j))), IsEnc dt.ly PR.zero PR.one (wmBlk (ixAddr elt st.mir) (Tag.arg (toLex (Sum.inl (Fin.castLE )))))

          The gates' bridge at a coarse file, proved: a position is gated exactly when the blocks of its mirror's address below the variable's arity are encodings. This is hgateEnc, at any file whose registers stand for elements, whose tuples are their elements' (hargP). Nothing has to be said about which elements have registers: a failing element is one the address holds, hence a register's already.

          Dependency graph
          theorem DescriptiveComplexity.Draw.Data.ixIGPassP_iff_isEnc {L : FirstOrder.Language} (dt : Data L) {A R P : Type} [Fintype dt.SlotIx] [LinearOrder A] [LinearOrder R] [LinearOrder P] [FirstOrder.Language.wide.Structure (Univ A R P dt.KIx dt.dd)] [Finite A] {PR : Prog A R P dt.CtlIx dt.SlotIx dt.KIx dt.dd} {I : Type} (F : LaidFile dt A R P I) {elt : IUniv A R P dt.KIx dt.dd} (hinj : Function.Injective elt) (hix : IsLinOrd F.le) (hblkP : ∀ (u : I), F.blk u = tagBlk (elt u).1) [Nonempty A] [L.Structure A] (hargP : ∀ (u : I), F.arg u = (elt u).2) (hzo : PR.zero PR.one) (vi : dt.VarIx) (stV : TapeSt dt A R P I) ( : Fin (dt.nIn vi)) :
          dt.ixIGPassP F PR.zero PR.one vi stV IsEnc dt.ly PR.zero PR.one (wmBlk (ixAddr elt stV.val) (Tag.arg (toLex (dt.igBlk vi ))))

          The inner gates' bridge at a coarse file, proved: a level's gate passes exactly when the block of VAL's address is an encoding. This is hpassEnc, and it asks less than the gates' bridge did: only that the registers stand for elements and that their tuples are their elements'. Nothing has to be said about which elements have registers, because the members of the block are the marked registers' own tuples. The verdict half is DescriptiveComplexity.Draw.Data.igVerdict_iff_isEnc, which asks only that the block's members be encoding-shaped, and that is what the shape test says.

          Dependency graph