| 〈build_rec#(i + 1; x, to2)〉 (x = [] ∧ to2 = some(t0)), ∀ j0, i0, x, x0, to. i→n(j0 - i0) < i→n(i1) → (x = x0 ∧ x0 ≠ [] ∧ i0 ≤ j0 ∧ max(x0) ≤ j0 → 〈build_rec#(i0; x, to)〉 (to = fail → (∀ t, x1. x0 ≠ depths(t, i0) + x1))), x2 = [], x = depths(t0, i + 1), to2 = fail, d ' + y = depths(t0, i + 1), 0 ≠ i1, d ∈ depths(t0, i + 1), max(depths(t0, i + 1)) ≤ i1 + i, i < d, 0 < i1 ⊦ 〈if is_empty(x2) then to := fail else let h = head(x2) in if h < i + 1 then to := fail else if h = i + 1 then { x := pop(x2) ; to := some(Leaf) } else let to0 = fail, to1 = fail in { build_rec#((i + 1) + 1; x2, to0) ; if to0 = fail then to := fail else { build_rec#((i + 1) + 1; x2, to1) ; if to1 = fail then to := fail else to := some(Node(to0 .t, to1 .t)) } }〉 〈if to = fail then to0 := fail else to0 := some(Node(t0, to .t))〉 (to0 = fail → (∀ t, x. d ' + y ≠ depths(t, i) + x)) |
〈build_rec#(i + 1; x, to2)〉 (x = [] ∧ to2 = some(t0)), ∀ j0, i0, x, x0, to. i→n(j0 - i0) < i→n(i1) → (x = x0 ∧ x0 ≠ [] ∧ i0 ≤ j0 ∧ max(x0) ≤ j0 → 〈build_rec#(i0; x, to)〉 (to = fail → (∀ t, x1. x0 ≠ depths(t, i0) + x1))), x2 = [], x = depths(t0, i + 1), to2 = fail, d ' + y = depths(t0, i + 1), 0 ≠ i1, d ∈ depths(t0, i + 1), max(depths(t0, i + 1)) ≤ i1 + i, i < d, 0 < i1 ⊦ 〈to := fail〉 〈if to = fail then to0 := fail else to0 := some(Node(t0, to .t))〉 (to0 = fail → (∀ t, x. d ' + y ≠ depths(t, i) + x))
[[CONCRETESIMPRULES : ([CSIMPSEQ : ⊦ is_empty(x) ↔ x = []])]]