The runs: the program's rules are its kits' rules #
Every composite of the layer discharges its run theorem from one
hypothesis about the program – hrules : ∀ ρ, PR.rules (rEmb ρ) = κ.rule …,
“my rules are among yours, under this injection of rule names”. For a
program assembled from sites
(DescriptiveComplexity.Draw.Data.progAsm) that hypothesis is
definitional: the rule names are the sigma of the sites' shapes, so a kit's
rule at site i is the program's rule at ⟨i, Sum.inl ρ⟩, verbatim.
This file is that plumbing, one lemma per call site of the outer loop, all
rfl. With it, each composite's run theorem applies to the assembled
program by naming its site; what a leg then needs is only the background
equations, which DescriptiveComplexity.Problems.Wide.DrawBack proves once.
The designated elements #
Dependency graph
Dependency graph
The rules, site by site #
Each lemma names a call site's rule-name injection: the site, and Sum.inl
into its kit's shape.
The startup pattern write of TARGET.
Dependency graph
The startup seek of the working cell to the logical top.
Dependency graph
The startup reset of the marker to the bottom cell.
Dependency graph
The startup clear of the mirror.
Dependency graph
One round of the outer sweep.
Dependency graph
The post-sweep reset of the marker.
Dependency graph
The post-sweep clear of the mirror.
Dependency graph
The convergence sweep.
Dependency graph
The walk home after a failed convergence sweep.
Dependency graph
The copy-back sweep.
Dependency graph
The walk home after the copy-back.
Dependency graph
The walk home before the output evaluation.
Dependency graph
A rule of the assembly drives a step #
The kits' discharges wrap this for their own rules; the program's bespoke rules – the startup step, the sites' exits – cite it directly.
A rightward rule of the assembly is a HasRight witness, at its own
destination data.
Dependency graph
A leftward rule of the assembly is a HasLeft witness.
Dependency graph
Time zero: the initial tape is the empty state's background #
The pass layer walks the background of
DescriptiveComplexity.Draw.Data.back; the initial tape is
DescriptiveComplexity.Draw.Prog.initBack, the marks over the blank. They are
the same function, at the state where every register and marker is clear –
which is why the all-blank start needs no initialization sweep, and what lets
the first leg of the run be stated in the presentation all the others use.
The machine's state at time zero: every register, stage track and marker clear.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The initial tape is the empty state's background.
Dependency graph
The first leg: startup plants the two permanent markers #
The one rule of the start site fires wherever it stands – it stands at the
empty address – writes the working-cell marker and the bottom mark there and
steps right, into the pattern write of TARGET.
The state after the startup step: the marker and the bottom mark at the empty address, everything else still clear.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The startup step: from the initial configuration to the entry of the TARGET pattern write, with both markers planted at the empty address.
Dependency graph
The glue between legs #
A pass presents the tape as DescriptiveComplexity.Draw.Prog.trackTapeAt: the
walked track's digits computed from a set, every other slot read off the
background. Since the background of
DescriptiveComplexity.Draw.Data.back already carries each register's
digits at its own slot, that presentation is the background – which is
what lets one leg's conclusion be the next leg's hypothesis, whichever track
each of them walks.
A pass's presentation is the background it walks, once the walked slot's state agrees with the set the pass carries. Stated with the state after the pass, so it also reads a pass's result back into the state.
Dependency graph
Handing the walk between tracks costs nothing: two passes walking different registers of the same state present the same tape.
Dependency graph
The four machine registers carry their track's digits at their own slot, which is the hypothesis both glue lemmas ask for.
Dependency graph
Dependency graph
Dependency graph
The second leg: startup writes the logical top into TARGET #
The pattern write of DescriptiveComplexity.Draw.MapKit: a round trip up the
register file writing, at each cell, the digit its other tracks decide –
here “this cell's element carries an argument tag”, read off the one-hot
blk marks. The result is the address of the logical top, which the seek
that follows takes the working cell to.
The state after startup's pattern write: TARGET holds the logical top – the cells of the argument-tagged elements.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The pattern write's leg: from the entry of the trip to its return at the marker, with TARGET holding the logical top.
Dependency graph
The run so far, chained: from the initial configuration – the marks over the blank, the head on the empty address – to the return of the pattern write, with both markers planted and TARGET holding the logical top.
Dependency graph
The third leg: the working cell seeks the logical top #
The random access of DescriptiveComplexity.Draw.SeekKit, at the target
TARGET now holds. Two single steps bracket it: the pattern write's exit
steps right off the marker into the seek's loop head (as every exit into a
loop head does), and the loop head's stay rule walks straight back down to
it.
The state with the working-cell marker at a given address.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The state after the seek: the marker and the mirror both at the target.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The successor of the empty address is not empty: it holds the greatest element.
Dependency graph
The pattern write's exit: off the marker, rightwards, into the seek's loop head.
Dependency graph
The seek's loop head walks back to the marker: the one step the rightward exit above owes.
Dependency graph
The seek's leg: from the loop head at the empty address to the passing verdict on the target's cell, marker and mirror in tow.
Dependency graph
Startup, up to the logical top: from the initial configuration to the verdict of the seek – the marker and the mirror on the last logical address, where the end marker is about to be planted.
Dependency graph
The fourth leg: the end marker is planted and the marker goes home #
The seek's exit is the erasing step the reset asks for as its one hypothesis:
at the logical top it clears the working-cell marker, plants the permanent
ltp end marker there and steps right; the reset then scans down to the
bot cell, writes the marker and bounces back.
The state after the seek's exit: the marker erased, the end marker planted at the last logical address.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The reset's leg, the seek's exit included: from the passing verdict at the logical top to the reset's landing phase on the empty address, with the end marker planted.
Dependency graph
The last leg of startup: the mirror is cleared #
The reset left the mirror holding the logical top; the evaluation wants it
at the empty address, matching the marker. One DescriptiveComplexity.Draw.ClearKit
trip does it, entered by the reset's exit.
The reset's exit: off the marker, rightwards, into the mirror clear.
Dependency graph
The mirror clear's leg: the trip that empties the mirror register, returning to the marker at the empty address.
Dependency graph
The state startup leaves behind: the bottom mark at the empty address, the end marker at the logical top, TARGET holding that address, the mirror and the working-cell marker home at the empty address, every stage track still clear – which is stage zero of the iteration.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
STARTUP, proved: from the initial configuration – the marks over the blank – to the entry of the per-address evaluation, with the machine's two permanent markers planted and every register where the loop expects it.
Dependency graph
The convergence sweep #
COMPARE is a plain sweep – one step per address, no register visit – whose
verdict rides in the state (DescriptiveComplexity.sweepState): the passing
phase exactly while every address below has agreed. Its per-cell question is
read off the stage tracks, which is what
DescriptiveComplexity.Draw.Data.compareKit fixes.
The convergence sweep's leg: from the empty address to the end-marked one, the verdict accumulated in the phase.
Dependency graph
The copy-back sweep #
COPY is the other plain sweep: one rewrite per address, every stage track
taking its successor's digit, so that the next round's old is this round's
new. Its background is a family indexed by the sweep's frontier – the
addresses already passed hold the new stage, the others the old one.
The state during the copy-back, at frontier s: the addresses
strictly below s have taken their next-stage digits.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The copy-back's leg: from the empty address to the end-marked one, every stage track rewritten on the way.
Dependency graph
The walks home #
A plain sweep leaves the machine at the top of the stretch while the marker never moved, so getting back is a scan: one phase, one rule. The outer program does it three times – after the convergence sweep, after the copy-back, and before the output evaluation – and they differ only in which phase they walk in.
A walk home: from anywhere at or above the marker, back to it. The rule-name injection is the parameter, so the three home sites of the outer program instantiate it directly.
Dependency graph
The walk home after a failed convergence sweep.
Dependency graph
The walk home after the copy-back.
Dependency graph
The walk home before the output evaluation.
Dependency graph
One round of the outer sweep #
ADVANCE is the round every sweep repeats: erase the marker, step on, write
it at the next address, walk up to the register file, increment the mirror
there so that it keeps mirroring the marker's address, and come back. Its
entry – the erasing step – is the caller's rule, exactly as the reset's is,
so the evaluation's boundary rule is what this leg takes as its h₀.
The state with the marker erased: the middle of a marker move.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
One round of the outer sweep: the marker and the mirror both step on, in lockstep.