Iteration forms of the Fibonacci heap's memory programs #
These source equations expose the existing record programs to the realization rules. They preserve the entire memory-oracle program, rather than only its result on valid heaps. No instruction or amortized bound is claimed here; those require the method certificates and their reached-state domains.
Main definitions #
gatherStep: one consolidation-table slot scan, returning the next degree.scatterListStep: one root-list step, retaining the next root and largest placed degree.cascadeStep,scatterStep: the original stopping/continuing branches of the fuel recursions.
Main results #
link_gather_eq_iterate: the existing gather program is the shared fixed-iteration source.link_scatterList_eq_iterate: the existing root-list traversal has the same iteration form.link_cascade_succ_eq_step,link_scatter_succ_eq_step: memory-level step equations for the early-exit recursions, without changing their cutoff behavior.link_cascade_eq_boundedWhile: the same finite cascade source in the shared while form; its native realization still needs a nontruncation proof.link_scatter_eq_boundedWhile: the finite consolidation source in while form, preserving both its pending root and its maximum degree, including truncation.gather_iterations_le_memoryCost,scatterList_iterations_le_memoryCost: each fixed iteration issues a real query, so the iteration count can pay control work through the memory charge.
Scan one consolidation-table slot and return the next degree. The record operations are
exactly those in gather; its continuation is exposed for the shared iteration rule.
Linking the existing gather program into memory is exactly a fixed number of applications
of gatherStep. The returned degree is discarded, as in the original unit-valued program.
Linking the root-list traversal into memory is the shared fixed-iteration source, with the root pointer and maximum degree as its state. This preserves nested scatter calls too.
One source cascade step preserves both stopping branches and the recursive parent exactly. This equation makes no assertion that the original fuel cannot run out.
The existing cascade is exactly the shared finite while source, with an explicit presence
tag for its pending handle. This preserves cutoff truncation; whileSafe is a separate native
obligation, and a pending handle at zero fuel does not satisfy it. The body begins with the
original parent query; its absent-state payload is never used because the guard has stopped.
The linked consolidation recursion has exactly the original stop/continue memory effect and carries the original maximum degree, including when the cutoff truncates a collision chain.
Consolidation has the same finite while form with a pending root and an unchanged
maximum-degree accumulator. A live handle at the cutoff remains truncated; this equality
does not prove the separate native whileSafe obligation. Every body begins with the original
degree query, and the absent-state payload is unused because its guard has stopped.
Every consolidation-table scan reads its slot, even when that slot is empty. This is a lower bound on the oracle charge, not an instruction bound or an admissibility assertion.
Every root-list step reads its successor before preparation and the inner scatter. Thus even zero inner fuel cannot turn a fixed iteration into free native control work.