Shared reached-state reasoning for native Dijkstra clients #
These are the original binary consumer's abstract history, key-bound and scan/round facts, shared with the Fibonacci consumer. They use the existing indexed-queue specification and refinements, without assuming a heap representation or a zero potential. They certify source and domain transport, not native instruction bounds.
Main definitions #
remainingEdges: the original remaining adjacency scan.abstractLoopStep: the original extraction/scan round.
Main results #
remainingEdges_step,scan_valid_remainingEdges: refinement and suffix validity along a scan.abstractLoopStep_extract: extraction-to-scan refinement and key-bound transport for one round.client_keys: the queued-key bound after an admissible client.loopStep_eq_link: complete program equality for the original round.initial_loop_safe_insert: initial loop admissibility after setting the source distance and inserting the source into the queue.
The original relaxation history supplies the reached insert or decrease-key precondition.
A nonempty scan suffix exposes its next relaxation and remaining suffix.
A valid scan suffix retains the refinement invariant and next suffix validity.
An admissible scan u du history supplies an admissible remainingEdges suffix from 0.
Every word-level round lowers the remaining-round counter, including the empty exit.
A positive original loop exposes one complete round before its remainder.
The word-free round view is exactly the original linked abstract round.
An admissible indexed-queue step preserves the bound on every present key.
An admissible Dijkstra history preserves the bound on every queued key.
A valid Dijkstra client preserves the bound on every queued key.
A refinement and the original remaining scan justify every reached native step domain. The proof excludes truncation by the actual increasing index, not by assuming a loop result.
The original remaining-round history and a strictly decreasing native counter justify a complete early-exit loop. The existing key invariant is retained through every abstract step.
Running an erased native extractMin on an admissible abstractLoopStep state either yields
none or yields some (u.val, du) for some u : Fin n with du ≤ K and an admissible scan u du
in the post-extraction state.
Installing the source distance word at f + G.source.val and executing the queue insertion
ins0 leaves an admissible main loop with queued keys bounded by K.