| n2 = 0, r0 = rxs, x0 = [], ((ls(rxs, xs) * ls(rys, ys) * del-list(to_delete, n0)))(H), n < h0, # xs < h0, n0 ≤ # xs + # ys, n0 + # xs ≤ h0, ∃ x1. ( xs = x + x1 ∧ ((lls(rxs, r, x) * ls(r, x1) * ls(rys, ys) * del-list(to_delete, n0)))(H) ∧ n0 ≤ # xs + # ys ∧ n0 + # xs ≤ h0 ∧ n = # x) ∧ n = n1, ys = [] ∨ # ys = h0 ⊦ r = null, ∃ x1. ( xs = (x + H[r].val ') + x1 ∧ ((lls(rxs, H[r].nxt, x + H[r].val ') * ls(H[r].nxt, x1) * ls(rys, ys) * del-list(to_delete, n0)))(H) ∧ n0 ≤ # xs + # ys ∧ n0 + # xs ≤ h0 ∧ n + 1 = #(x + H[r].val ')) ∧ h0 - n + 1 < h0 - n1 |
((ls(rxs, x + x1) * ls(rys, ys) * del-list(to_delete, n0)))(H), ((lls(rxs, r, x) * ls(r, x1) * ls(rys, ys) * del-list(to_delete, n0)))(H), # x < h0, # x + # x1 < h0, n0 + # x + # x1 ≤ h0, n0 ≤ (# x + # x1) + # ys, ys = [] ∨ # ys = h0 ⊦ r = null, ∃ x0. x1 = H[r].val ' + x0 ∧ (∃ r0. (((lls(rxs, r0, x) * r0 => H[r].val × H[r].nxt) * ls(H[r].nxt, x0) * ls(rys, ys) * del-list(to_delete, n0)))(H)) ∧ n0 ≤ (# x + # x0 + 1) + # ys ∧ n0 + # x + # x0 < h0
Used simplifier rules: ⊦ ¬ n < n; (s)% ⊦ m < n + 1 ↔ ¬ n < m; (s)% ⊦ n < m → (m - n) + n = m; (s)%n0 ≤ n ⊦ n - n0 < m ↔ n < m + n0; (s)% ⊦ m < n → (n ≤ m ↔ false); (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ m + n = m + n0 ↔ n = n0; (s)% ⊦ # a ' = 0 +1; (s)%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ m + 1 ≤ n ↔ m < n; (s)% ⊦ m +1 = m + 1; (s)% ⊦ #(a ' + x) = (# x)+1; (s)%sep-com: ⊦ P0 * P1 = P1 * P0; from specification heap-sep%sep-ass: ⊦ (P0 * P1) * P2 = P0 * P1 * P2; from specification heap-sep% ⊦ ((_∃ rP * P))(H) ↔ (∃ r. ((rP(r) * P))(H)); (s)% ⊦ lls(r0, r2, x + a ') = _∃(λ r1. lls(r0, r1, x) * r1 => a × r2); (s)% ⊦ x + y = x + z ↔ y = z; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%a: ⊦ (x + y) + z = x + y + z; from specification list% ⊦ #(x + y) = # x + # y; (s)