Uniform result words for the original Fibonacci extraction source #
The original extractor returns a typed handle. Erasing only that handle's type gives one result type for every runtime capacity, without changing any memory query, state or operation history. There is no new checked-pair decoder or extraction algorithm here.
Main definitions #
extractRaw: the exact optional-pair erasure of the originalextractMinprogram.
Main results #
link_extractRaw_eq: erasure commutes with the original record-to-memory interpretation.runClient_extractRaw: full result, memory/frontier and history transport at every width.
theorem Cslib.DataStructure.PriorityQueue.FibonacciHeap.Native.link_extractRaw_eq {n : ℕ} (L : Record.Layout (Cell.ok n)) (handlerWidth : ℕ) :
DataStructure.link (L.methods handlerWidth) (extractRaw n) = (Option.map fun (a : Fin n × ℕ) => (↑a.1, a.2)) <$> DataStructure.link (L.methods handlerWidth) (extractMin n)
The same erasure applies after interpreting the record, as an equality of whole programs.
theorem Cslib.DataStructure.PriorityQueue.FibonacciHeap.Native.runClient_extractRaw {n : ℕ} (L : Record.Layout (Cell.ok n)) (handlerWidth w : ℕ) (mem : Memory.State) :
(Memory.spec w).runClient mem (DataStructure.link (L.methods handlerWidth) (extractRaw n)) = (Option.map (fun (a : Fin n × ℕ) => (↑a.1, a.2))
((Memory.spec w).clientResult mem (DataStructure.link (L.methods handlerWidth) (extractMin n))), (Memory.spec w).clientState mem (DataStructure.link (L.methods handlerWidth) (extractMin n)), (Memory.spec w).clientHistory mem (DataStructure.link (L.methods handlerWidth) (extractMin n)))
Result erasure retains every memory cell, the frontier and the complete query history. Handler width and execution width are independent; validity remains a separate source premise.