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 #
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.
Instances For
Dependency graph
The loop count of a domain branch.
Instances For
Dependency graph
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
- dt.KindPh (DescriptiveComplexity.Draw.MatAtom.stage i a) = DescriptiveComplexity.Draw.StagePh (dt.d.B.arity i)
- dt.KindPh (DescriptiveComplexity.Draw.MatAtom.exp e a) = DescriptiveComplexity.Draw.TagPh (k * Fintype.card dt.X.Tag) (Fin k → dt.X.Tag) (dt.relNr e)
- dt.KindPh (DescriptiveComplexity.Draw.MatAtom.eq a a_1) = DescriptiveComplexity.Draw.ElemPh 2
- dt.KindPh (DescriptiveComplexity.Draw.MatAtom.ord a a_1) = DescriptiveComplexity.Draw.ElemPh 2
Instances For
Dependency graph
The machinery sites of an atom kind.
Equations
- dt.KindSite (DescriptiveComplexity.Draw.MatAtom.stage i a) = DescriptiveComplexity.Draw.StageSite (dt.d.B.arity i)
- dt.KindSite (DescriptiveComplexity.Draw.MatAtom.exp e a) = DescriptiveComplexity.Draw.TagSite (k * Fintype.card dt.X.Tag) (Fin k → dt.X.Tag) (dt.relNr e)
- dt.KindSite (DescriptiveComplexity.Draw.MatAtom.eq a a_1) = DescriptiveComplexity.Draw.ElemSite 2
- dt.KindSite (DescriptiveComplexity.Draw.MatAtom.ord a a_1) = DescriptiveComplexity.Draw.ElemSite 2
Instances For
Dependency graph
The rule shape of an atom kind's sites.
Equations
- dt.KindSh (DescriptiveComplexity.Draw.MatAtom.stage i a) = DescriptiveComplexity.Draw.StageSh (dt.d.B.arity i)
- dt.KindSh (DescriptiveComplexity.Draw.MatAtom.exp e a) = DescriptiveComplexity.Draw.TagSh (k * Fintype.card dt.X.Tag) (Fin k → dt.X.Tag) (dt.relNr e)
- dt.KindSh (DescriptiveComplexity.Draw.MatAtom.eq a a_1) = DescriptiveComplexity.Draw.ElemSh 2
- dt.KindSh (DescriptiveComplexity.Draw.MatAtom.ord a a_1) = DescriptiveComplexity.Draw.ElemSh 2
Instances For
Dependency graph
The tower #
The machinery phases of the a-th atom of a variable's matrix.
Instances For
Dependency graph
The machinery sites of the a-th atom.
Instances For
Dependency graph
The rule shapes of the a-th atom's sites.
Instances For
Dependency graph
The matrix's phases: the sequence over the classified atoms.
Equations
- dt.MatrixPh v = DescriptiveComplexity.Draw.SeqPh (dt.natOf v) (dt.AtomPh v)
Instances For
Dependency graph
The matrix's sites.
Equations
- dt.MatrixSite v = DescriptiveComplexity.Draw.SeqSite (dt.natOf v) (dt.AtomSite v)
Instances For
Dependency graph
One gate block's phases: the well-shapedness file test, and the tag-branched domain evaluation.
Equations
- dt.GateBlockPh = (DescriptiveComplexity.Draw.TestPh ⊕ DescriptiveComplexity.Draw.TagPh (Fintype.card dt.X.Tag) dt.X.Tag dt.domNr)
Instances For
Dependency graph
One gate block's sites: the file test's, and the domain evaluation's.
Equations
- dt.GateBlockSite = (Unit ⊕ DescriptiveComplexity.Draw.TagSite (Fintype.card dt.X.Tag) dt.X.Tag dt.domNr)
Instances For
Dependency graph
The rule shape of a gate block's sites.
Equations
- dt.GateBlockSh (Sum.inl val) = (DescriptiveComplexity.Draw.TestRule ⊕ Bool)
- dt.GateBlockSh (Sum.inr s) = DescriptiveComplexity.Draw.TagSh (Fintype.card dt.X.Tag) dt.X.Tag dt.domNr s
Instances For
Dependency graph
The gates' phases: the sequence over the argument blocks.
Equations
- dt.GatesPh v = DescriptiveComplexity.Draw.SeqPh (dt.arOf v) fun (x : Fin (dt.arOf v)) => dt.GateBlockPh
Instances For
Dependency graph
The gates' sites.
Equations
- dt.GatesSite v = DescriptiveComplexity.Draw.SeqSite (dt.arOf v) fun (x : Fin (dt.arOf v)) => dt.GateBlockSite
Instances For
Dependency graph
The number of quantified levels of a variable's pack.
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
- dt.IGatesPh v = DescriptiveComplexity.Draw.SeqPh (dt.nIn v) fun (x : Fin (dt.nIn v)) => dt.GateBlockPh
Instances For
Dependency graph
The inner gates' sites.
Equations
- dt.IGatesSite v = DescriptiveComplexity.Draw.SeqSite (dt.nIn v) fun (x : Fin (dt.nIn v)) => dt.GateBlockSite
Instances For
Dependency graph
One round's machinery phases: the inner gates, the branch, and the matrix.
Equations
- dt.RoundPhF v = DescriptiveComplexity.Draw.RoundPh (dt.IGatesPh v) (dt.MatrixPh v)
Instances For
Dependency graph
One variable's machinery phases, gates and round plugged in.
Instances For
Dependency graph
The enumeration of the fixed-point variables.
Equations
Instances For
Dependency graph
The number of fixed-point variables.
Instances For
Dependency graph
The variable at a spine position.
Instances For
Dependency graph
The evaluation's machinery phases: one copy of the variable machinery per spine position, and the output's.
Instances For
Dependency graph
The evaluation's phases: the spine over the machineries.
Equations
- dt.PEF = DescriptiveComplexity.Draw.EvalPh dt.nv dt.PMF
Instances For
Dependency graph
The program's phases.
Equations
Instances For
Dependency graph
The site tower #
The rule shape of the matrix's sites.
Equations
- dt.MatrixSh v = DescriptiveComplexity.Draw.SeqSh (dt.natOf v) (dt.AtomSh v)
Instances For
Dependency graph
The rule shape of the gates' sites.
Equations
- dt.GatesSh v = DescriptiveComplexity.Draw.SeqSh (dt.arOf v) fun (x : Fin (dt.arOf v)) => dt.GateBlockSh
Instances For
Dependency graph
The rule shape of the inner gates' sites.
Equations
- dt.IGatesSh v = DescriptiveComplexity.Draw.SeqSh (dt.nIn v) fun (x : Fin (dt.nIn v)) => dt.GateBlockSh
Instances For
Dependency graph
One round's machinery sites.
Equations
- dt.RoundSiteF v = DescriptiveComplexity.Draw.RoundSite (dt.IGatesSite v) (dt.MatrixSite v)
Instances For
Dependency graph
The rule shape of one round's machinery sites.
Equations
- dt.RoundShF v = DescriptiveComplexity.Draw.RoundSh (dt.IGatesSite v) (dt.MatrixSite v) (dt.IGatesSh v) (dt.MatrixSh v)
Instances For
Dependency graph
One variable's machinery sites.
Equations
- dt.VarSiteF v = DescriptiveComplexity.Draw.VarSite (dt.GatesSite v) (dt.RoundSiteF v)
Instances For
Dependency graph
The rule shape of one variable's machinery sites.
Equations
- dt.VarShF v = DescriptiveComplexity.Draw.VarSh (dt.GatesSite v) (dt.RoundSiteF v) (dt.GatesSh v) (dt.RoundShF v) dt.CarryB
Instances For
Dependency graph
The evaluation's machinery sites.
Instances For
Dependency graph
The rule shape of the evaluation's machinery sites.
Instances For
Dependency graph
The evaluation's sites.
Equations
- dt.SEF = DescriptiveComplexity.Draw.EvalSite dt.nv dt.SMF
Instances For
Dependency graph
The rule shape of the evaluation's sites.
Instances For
Dependency graph
The program's sites.
Equations
Instances For
Dependency graph
The rule shape of the program's sites.
Equations
- dt.SFSh = DescriptiveComplexity.Draw.OuterSh dt.SEF dt.SESh
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.
The owner map of an atom kind's machinery.
Equations
- dt.kindOwn (DescriptiveComplexity.Draw.MatAtom.stage i a) = DescriptiveComplexity.Draw.stageOwn
- dt.kindOwn (DescriptiveComplexity.Draw.MatAtom.exp e a) = DescriptiveComplexity.Draw.tagOwn
- dt.kindOwn (DescriptiveComplexity.Draw.MatAtom.eq a a_1) = DescriptiveComplexity.Draw.elemOwn
- dt.kindOwn (DescriptiveComplexity.Draw.MatAtom.ord a a_1) = DescriptiveComplexity.Draw.elemOwn
Instances For
Dependency graph
The owner map of a gate block.
Equations
- dt.gateBlockOwn (Sum.inl val) = Sum.inl ()
- dt.gateBlockOwn (Sum.inr p) = Sum.inr (DescriptiveComplexity.Draw.tagOwn p)
Instances For
Dependency graph
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
The owner map of one variable's machinery.
Equations
- dt.varOwnF v = DescriptiveComplexity.Draw.varOwn (DescriptiveComplexity.Draw.seqOwn fun (x : Fin (dt.arOf v)) => dt.gateBlockOwn) (dt.roundOwnF v)
Instances For
Dependency graph
The owner map of the evaluation's machineries.
Equations
Instances For
Dependency graph
The owner map of the evaluation's phases.
Equations
Instances For
Dependency graph
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'.