Verified direct next-atom generation #
This module exposes exact contracts for the four executable branches used by the packed-step generator: state, head, immutable-cell copy, and writable-cell update. The step dispatcher uses the update routine only at positive positions; its numeric schedule contract itself remains valid at every in-range position. Input cells and writable marker cells share the same copy routine because their canonical raw schedules are literally identical.
One immutable-cell copy is sound.
The arithmetic and emission scratch required by an immutable-cell copy.
An immutable-cell copy has an all-prefix width certificate when its fixed selectors and the complete absolute-reference arithmetic fit one width.
An immutable-cell copy restores its scratch and advances the frontier by exactly one gate.
An immutable input or writable marker cell emits its literal canonical one-gate copy schedule.
Complete state-atom next-formula generation is sound.
Clean case-formula scratch suffices for a complete state-atom formula.
Complete state-atom generation has an all-prefix width certificate under one envelope covering its frontier, nested selected-effect references, and the fixed child-size polynomial evaluator.
State-atom generation restores every owned register and advances only the wire frontier by its exact schedule size.
State-atom generation emits the canonical numeric halted-or schedule byte for byte.
Complete head-atom next-formula generation is sound.
Clean moved-head scratch, a positive horizon, and an in-range target suffice for a complete head-atom formula.
Complete head-atom generation has an all-prefix width certificate under one envelope covering the moved-head child, predecessor arithmetic, both polynomial evaluators, and every absolute configuration reference.
Head-atom generation restores every owned register and advances only the wire frontier by its exact schedule size.
Head-atom generation emits the canonical numeric moved-head wrapper schedule byte for byte.
Complete positive writable-cell next-formula generation is sound.
Clean writable-cell scratch and an in-range position suffice for a complete positive writable-cell formula.
Complete writable-cell generation has an all-prefix width certificate under one envelope covering its halted wrapper, nested selected-write child, absolute references, and child-size polynomial evaluator.
Writable-cell generation restores every owned register and advances only the wire frontier by its exact schedule size.
Writable-cell generation emits the canonical numeric halted-or schedule byte for byte.
Exact selected-effect child size for a state atom.
Exact complete state-atom schedule size.
Exact moved-head child size for a head atom.
Exact complete head-atom schedule size.
Exact written-cell child size for a writable-cell atom.
Exact complete writable-cell schedule size.
A complete state-atom formula always emits at least one gate.
A complete head-atom formula always emits at least one gate.
A complete writable-cell formula always emits at least one gate.