Algo.dijkstra.priority_queue.Generated definitions
DefinitionAlgo_dijkstra_priority_queue_GeneratedDefinitions and required structural lemmas from Algo.dijkstra.priority_queue.Generated. Source declarations are retained by compiler-reported ranges; imports are redirected to the corresponding definition bundles. This bundle contains no theorem stubs.
Algo2Lean provenance and reproduction. These definitions target Algo2Lean v0.1.4, using the compiler source at public commit 0f79d5e4242e6477531c9ee4410409f5b1c92f76, and Lean 4.33.1. The versioned compiler location is Algo2Lean v0.1.4. Compile all supplied .algo files and imports to reproduce the raw generated definitions. Release publication and exact website parity require their separately recorded checks; this metadata alone does not assert them. Prove2Me imports and declaration packaging are mechanically adapted, with original hashes, compiler-reported source ranges, and adaptations recorded in transplant provenance. Exact reproduction does not prove the compiler correct.
import Definitions.Def_Algo2LeanLib_Modules
import Definitions.Def_Algo2LeanLib_Interface
set_option autoImplicit true
set_option backward.isDefEq.respectTransparency false
set_option backward.defeqAttrib.useBackward true
-- Generated by Algo2Lean 0.1.4 https://github.com/lunjiah/algo2lean
namespace Algo.«dijkstra».«priority_queue»
open _root_.Algo2LeanGenerated
-- Independently compiled module; imported algorithms keep their own transitions.
namespace «PriorityQueue»
inductive Result where
| fn_PriorityQueue_push_or_decrease (value : Unit)
| fn_PriorityQueue_pop_min (value : Int)
| fn_PriorityQueue_is_empty (value : Bool)
/-- Executable method entries; behavior and cost laws are separate assumptions. -/
structure Code extends Algo2LeanCore.InterfaceCode Heap Result where
valid : Heap → ObjectRef → Bool
entry_PriorityQueue_push_or_decrease : ObjectRef × Int × Int → Frame
entry_PriorityQueue_pop_min : ObjectRef → Frame
entry_PriorityQueue_is_empty : ObjectRef → Frame
/-- The supplied code executes this operation with the stated heap effects. -/
def push_or_decrease.Call (code : Code) (before : Heap) (input : ObjectRef × Int × Int)
(after : Heap) (output : Unit) : Prop :=
code.valid before input.1 = true ∧
Algo2LeanCore.Summary code.Step before (code.entry_PriorityQueue_push_or_decrease input) after (.fn_PriorityQueue_push_or_decrease output)
/-- The supplied code executes this operation with the stated heap effects. -/
def pop_min.Call (code : Code) (before : Heap) (input : ObjectRef)
(after : Heap) (output : Int) : Prop :=
code.valid before input = true ∧
Algo2LeanCore.Summary code.Step before (code.entry_PriorityQueue_pop_min input) after (.fn_PriorityQueue_pop_min output)
/-- The supplied code executes this operation with the stated heap effects. -/
def is_empty.Call (code : Code) (before : Heap) (input : ObjectRef)
(after : Heap) (output : Bool) : Prop :=
code.valid before input = true ∧
Algo2LeanCore.Summary code.Step before (code.entry_PriorityQueue_is_empty input) after (.fn_PriorityQueue_is_empty output)
end «PriorityQueue»
namespace Algo2LeanGenerated
abbrev Ref_PriorityQueue := ObjectRef
inductive Frame where
| invalid
inductive Result where
| unused
abbrev Configuration := Algo2LeanCore.Config Heap (Frame) Result
abbrev Stack := Algo2LeanCore.Stack (Frame) Result
abbrev Transcript := List (Configuration)
inductive Step : Configuration → Configuration → Prop where
theorem terminal (h : Heap) (result : Result) :
Algo2LeanCore.Terminal Step (.done h result) := by
intro next transition
cases transition
end Algo2LeanGenerated
open Algo2LeanGenerated
end Algo.«dijkstra».«priority_queue»