| ∀ 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 → x0 = depths(to .t, i0) + x)), x = x0, x0 ≠ [], max(x0) ≤ i1 + i, 0 ≤ i1, x2 = x ∧ d0 = i, h0 = head(x2), ¬ h0 < d0, h0 ≠ d0 ⊦ 〈let to2 = fail, to1 = fail in { build_rec#(d0 + 1; x2, to2) ; if to2 = fail then to0 := fail else { build_rec#(d0 + 1; x2, to1) ; if to1 = fail then to0 := fail else to0 := some(Node(to2 .t, to1 .t)) } }〉 (to0 ≠ fail → x0 = depths(to0 .t, i) + x2) |
∀ 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 → x0 = depths(to .t, i0) + x)), x = x0, x0 ≠ [], max(x0) ≤ i1 + i, 0 ≤ i1, x2 = x ∧ d0 = i, h0 = head(x2), ¬ h0 < d0, h0 ≠ d0, to = fail, to3 = fail ⊦ 〈build_rec#(d0 + 1; x2, to3)〉 〈if to3 = fail then to0 := fail else { build_rec#(d0 + 1; x2, to) ; if to = fail then to0 := fail else to0 := some(Node(to3 .t, to .t)) }〉 (to0 ≠ fail → x0 = depths(to0 .t, i) + x2)
[[CONCRETESIMPRULES : ()]]