[Imprint][Data Privacy Statement][E-Mail]



View long theorem info. View the proof. Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Proof step 5 from proof refine-add (previous step)

((ls(rxs, xs) * ls(rys, ys) * del-list(to_delete, n)))(H), # xs < h0, n + # xs ≤ h0, n ≤ # xs + # ys, ys = [] ∨ # ys = h0 ⊦ ⟪tree_buffer_heap_process_queue#(; H, to_delete); xs_len := # xs; h := h0; choose r with ¬ r ∈ H ∧ r ≠ null in {H := H ++ r; H[r].val := a; H[r].nxt := rxs; if xs_len + 1 = h then {if rys ≠ null then to_delete := rys + to_delete; rys := r; xs_len := 0; rxs := null} else {rxs := r; xs_len := 1 + xs_len}}⟫ ⟨xs_len0 := # xs; caterpillar_add#(a, h0; xs, xs_len0, ys)⟩ ∃ n. ((ls(rxs, xs) * ls(rys, ys) * del-list(to_delete, n)))(H) ∧ n ≤ # xs + # ys ∧ n + # xs ≤ h0 ∧ xs_len = xs_len0

User applied rule insert program lemma

And obtained the following new goals

Rule argument

spec: <toplevel> name: process-queue seq: ((del-list(to_delete, n) * P))(H) ⊦ ⟪tree_buffer_heap_process_queue#(; H, to_delete)⟫ ( (n ≥ 2 → ((del-list(to_delete, n - 2) * P))(H)) ∧ (n < 2 → to_delete = [] ∧ ((del-list([], 0) * P))(H))) subst: [to_delete, H, n, P] → [to_delete, H, n, ls(rys, ys) * ls(rxs, xs)] flags: List([[1,0,0]])

Additional information

Used simplifier rules: sep-ass: ⊦ (P0 * P1) * P2 = P0 * P1 * P2; from specification heap-sep%sep-com: ⊦ P0 * P1 = P1 * P0; from specification heap-sep