Documentation

CslibFrontier.DataStructure.PriorityQueue.FibonacciHeap.Native.Backend

A uniform native method family for the original indexed Fibonacci heap #

Five fixed certificates choose the bank, body emitters and one exchange factor before every runtime capacity, key bound, layout base, width and heap. The original memory refinement supplies full source correctness, histories and the nonzero amortized potential. Typed observation uses the existing generic partial inverse of handle erasure; it executes no decoder instructions.

These are method-body contracts. Calling-convention installation is external and uncharged; initialization, paid argument delivery, complete callers and abstract space bounds remain separate obligations. In particular, the amortized result is not a per-operation worst-case logarithmic bound for extraction or decrease-key.

Main definitions #

Main results #

The bank and factor are fixed before all runtime heap arguments.

Constructor selection and runtime arguments for the existing indexed queue. Typed result observation is proof-only: the partial inverse is applied only to actual erased source results.

theorem Cslib.DataStructure.PriorityQueue.FibonacciHeap.Native.implements {w n K base : ℕ} (hn : WordRAM.Fits w n) (hK : WordRAM.Fits w K) (hfit : WordRAM.Fits w (base + (9 * n + 5))) :
(backend n K base).Implements (memRefinement hn hK base)

Full method runs agree with the original refinement, including every memory cell, frontier and source-history entry. The original queue validity supplies each native entry domain.

noncomputable def Cslib.DataStructure.PriorityQueue.FibonacciHeap.Native.implementation {w n K base : ℕ} (hn : WordRAM.Fits w n) (hK : WordRAM.Fits w K) (hfit : WordRAM.Fits w (base + (9 * n + 5))) :

The shared native execution adapter, with argument installation external to its clock.

The native family retains the original potential, scaled by one factor fixed before all runtime parameters. Its charges are the existing constant read/update and logarithmic extract amortized charges, plus the shared body-entry/exit unit.

theorem Cslib.DataStructure.PriorityQueue.FibonacciHeap.Native.modifies {w n K base : ℕ} (hn : WordRAM.Fits w n) (hK : WordRAM.Fits w K) (hfit : WordRAM.Fits w (base + (9 * n + 5))) {s : (indexedMinPQSpec n K).State} {x y : WordRAM.Data (WordRAM.Realization.Backend.registers certificates)} {o : IndexedMinPQ.Op n} {a : o.Result} {steps : ℕ} (hr : (implementation hn hK hfit).rep s x) (hv : IndexedMinPQ.valid K s o) (he : (backend n K base).exec w x o a y steps) :

Every native method body preserves every cell outside the old source footprint.