| log = nx, lpt0 = lpt ⊦ ⟪gc_heap_empty#(; gch); let n = 0 in while n < # lpt do {/* (prepost-create-gcheap : invariant n ≤ # lpt ∧ bin-heap-inv(gch, lpt) ∧ gc-heap(lpt, log, n) = keyset(gch) ∧ id-idx(lpt`, lpt) wfbound # lpt - n) */; if lpt[n].flags = LP_GROUP_NODES ∧ ¬ n ∈ log then let ki = key-index(lpt[n].ref-size, n) in gc_heap_insert#(ki; gch, lpt); n := n + 1}⟫ (bin-heap-inv(gch, lpt) ∧ gc-heap(lpt0, nx) = keyset(gch) ∧ id-idx(lpt0, lpt)) |
log = nx, lpt0 = lpt ⊦ ⟪bh := bin-heap(mkkeyarray(1), 0); let n = 0 in {gch := bh; while n < # lpt do {/* (prepost-create-gcheap : invariant n ≤ # lpt ∧ bin-heap-inv(gch, lpt) ∧ gc-heap(lpt, log, n) = keyset(gch) ∧ id-idx(lpt`, lpt) wfbound # lpt - n) */; if lpt[n].flags = LP_GROUP_NODES ∧ ¬ n ∈ log then let ki = key-index(lpt[n].ref-size, n) in gc_heap_insert#(ki; gch, lpt); n := n + 1}}⟫ (bin-heap-inv(gch, lpt) ∧ gc-heap(lpt0, nx) = keyset(gch) ∧ id-idx(lpt0, lpt))
Used simplifier rules: gc_heap_empty#(; bh){bh := bin-heap(mkkeyarray(1), 0)};