| # lpt1 = n1 + n0, lpt1[n0] = mklp(m, m0, LP_GROUP_NODES, m1), gc-heap(lpt2, log, n0) = keyset(gch), n1 ≠ 0, bin-heap-inv(gch, lpt1), id-idx(lpt2, lpt1), ¬ n0 ∈ log ⊦ ⟪gc_heap_insert#(key-index(m, n0); gch, lpt1); n := n0 + 1⟫ (n ≤ # lpt1 ∧ bin-heap-inv(gch, lpt1) ∧ gc-heap(lpt2, log, n) = keyset(gch) ∧ id-idx(lpt2, lpt1) ∧ # lpt1 < n1 + n) |
bin-heap-inv(bh, lpt), lpt0 = lpt, bh0 = bh, ki.idx < # lpt, ∀ ki0. ki0 ∈ keyset(bh0) → ki0.idx ≠ ki.idx ⊦ ⟪gc_heap_insert#(ki; bh, lpt)⟫ (bin-heap-inv(bh, lpt) ∧ id-idx(lpt0, lpt) ∧ keyset(bh) = keyset(bh0) ++ ki)
# lpt1 = n1 + n0, lpt1[n0] = mklp(m, m0, LP_GROUP_NODES, m1), gc-heap(lpt2, log, n0) = keyset(gch), bin-heap-inv(gch, lpt1), id-idx(lpt2, lpt1) ⊦ n1 = 0, n0 ∈ log, bin-heap-inv(gch, lpt1) ∧ lpt1 = lpt1 ∧ gch = gch ∧ key-index(m, n0).idx < # lpt1 ∧ (∀ ki0. ki0 ∈ keyset(gch) → ki0.idx ≠ key-index(m, n0).idx)
# lpt1 = n1 + n0, lpt1[n0] = mklp(m, m0, LP_GROUP_NODES, m1), bh1 = gch, gc-heap(lpt2, log, n0) = keyset(gch), gch = gch, ki0 = key-index(m, n0), lpt1 = lpt1, lpt3 = lpt1, key-index(m, n0).idx < # lpt1, bin-heap-inv(gch, lpt1), id-idx(lpt2, lpt1), ∀ ki0. ki0 ∈ keyset(gch) → ki0.idx ≠ key-index(m, n0).idx ⊦ [gc_heap_insert#(key-index(m, n0); gch, lpt1)] ( bin-heap-inv(gch, lpt1) ∧ id-idx(lpt3, lpt1) ∧ keyset(gch) = keyset(bh1) ++ ki0 → ⟪n := n0 + 1⟫ (n ≤ # lpt1 ∧ bin-heap-inv(gch, lpt1) ∧ gc-heap(lpt2, log, n) = keyset(gch) ∧ id-idx(lpt2, lpt1) ∧ # lpt1 < n1 + n)), n1 = 0, n0 ∈ log