Correctness of the iterative fan-in-d Cook–Mertz controller #
A call evaluates the existing recursive procedure while preserving its caller's continuation
stack. Node access is supplied by a path lookup agreeing with a subtree. In particular, using
an existing Ary.Tree as the lookup yields a terminating root call with exactly Ary.procWith's
registers. No separate tree or evaluation semantics is introduced.
Main results #
Cslib.TreeEval.Ary.Iter.exists_runFrom_call: a subtree call implementsAry.procWith.Cslib.TreeEval.Ary.Iter.exists_runFrom_root: the complete root call returns and halts.
References #
- O. Goldreich, On the Cook–Mertz Tree Evaluation procedure, Algorithm 1. The loop follows the signed calls of the existing fan-in-d algebra.
This proves pure control-loop correspondence, not a native implicit-input space theorem. The gate extension is supplied; its implementation and same-input subroutine composition are separate from the control-loop correspondence.
A call on any subtree implemented by the supplied lookup runs the existing recursive procedure and returns to the same continuation stack, from arbitrary global register contents.
The complete root call terminates with exactly the recursive procedure's registers.