The cons push, and the assembled dispatch simulation #
The one non-destructive copy of the machine: dispatching a cons copies the
value into a fresh cons₁ frame at endL, priming each letter on the way so
the scan finds the next one, then unprimes the value and dispatches the first
child. DescriptiveComplexity.HaltHard.cp_loop is the copy loop – one
iteration primes one letter, carries it home and returns – and
DescriptiveComplexity.HaltHard.norm_cons wraps it with the header write and
the unpriming sweep.
With every code shape handled,
DescriptiveComplexity.HaltHard.sim_norm assembles the whole dispatch phase:
from the dispatch of the code at p, the machine reaches the resting
configuration of DescriptiveComplexity.HaltHard.pStepNormal p k v, by
induction on the size of the dispatched code.
Priming #
Marking a letter as copied.
Equations
Instances For
Dependency graph
Unmarking a letter.
Equations
Instances For
Dependency graph
Dependency graph
Dependency graph
Fused step-and-walk combinators #
One left move, then a leftward walk over passed letters: the fused form every carry uses, sound whether or not the walked span is empty.
Dependency graph
One right move, then a rightward walk over passed letters.
Dependency graph
One right move, then a rightward transducing walk.
Dependency graph
Pass lemmas for the copy #
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The scan passes blanks and primed letters.
Dependency graph
The unpriming sweep, as a transducing pass.
Dependency graph
The copy loop #
One iteration of the copy: with the scan on the next unprimed letter,
prime it, carry it home to endL, write it by the endL-shift and walk back
onto the gap – the loop entry one letter further. Stated over an abstract
carry state so the digit and separator instances share the proof.
Dependency graph
One pass of the copy loop, iterated to the end of the value: with the
prefix P already primed and copied and U still to do, the scan fetches
each letter of U in turn, carries it to endL, writes it by the endL-shift
and returns; the loop ends with the scan on endR. The copied content sits
between endL and the old frame region, spatially reversed – which is what
makes it encVal v when the value region held (encVal v).reverse.
Dependency graph
Unpriming undoes priming, letterwise on a value word.
Dependency graph
The cons dispatch: copy the value into a fresh cons₁ frame at
endL – mirrored back to straight by the endL-shifts – write the header,
unprime the value, and dispatch the first child.
Dependency graph
Reading pStepNormal off the code shape #
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
Dependency graph
The assembled dispatch phase #
Every code has size at least one.
Dependency graph
The dispatch phase of the simulation: from the dispatch of the code
at p – any state that hands over to dispatch p on mid – the machine
reaches the resting configuration of pStepNormal p k v, by induction on the
size of the dispatched code.