Documentation

CslibFrontier.Algorithms.Lean.Dijkstra.Native.Source

Bounded-while views of the linked Dijkstra client #

The edge scan and main loop use the existing boundedWhile source representation. Their equalities hold for every memory method table, without assuming correctness or admissibility of its implementation. They retain the complete free-monad program, hence every reached memory and query history. In particular, extracting an empty queue exits immediately.

These source equalities do not provide native code or bound its instructions. The native realization must separately charge arithmetic, argument delivery and control, establish each callee's reached-state domain, and exclude cutoff truncation.

Main definitions #

Main results #

Query the degree, then scan its edge indices in their original order.

The scan view retains the complete linked program, including repeated offset queries.

One extraction and scan, setting the counter to zero when the queue is empty.

The original round cutoff with genuine early exit when extraction returns none.

The main-loop view retains all source behavior, including the empty-queue exit.

Initialize the source distance and queue, then execute the original early-exit loop.

The bounded-while client is exactly the linked original Dijkstra program.