| 〈build_rec#(i + 1; x2, to3)〉 (x2 = x1 ∧ to3 = to1), ∀ 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)), x2 = d ' + y, to3 = fail, max(d ' + y) ≤ i1 + i, i < d, 0 ≤ i1, x = x2, to1 ≠ fail → x = depths(to1 .t, i + 1) + x1, to1 ≠ fail, to2 = fail ⊦ 〈build_rec#(i + 1; x1, to2)〉 〈if to2 = fail then to0 := fail else to0 := some(Node(to1 .t, to2 .t))〉 (to0 ≠ fail → d ' + y = depths(to0 .t, i) + x1) |
〈build_rec#(i + 1; x2, to2)〉 (x2 = x1 ∧ to2 = to1), ∀ 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)), d ' + y = depths(to1 .t, i + 1) + x1, to2 = fail, x2 = d ' + y, to1 ≠ fail, d ∈ depths(to1 .t, i + 1), 0 ≤ i1, i < d, max(d ' + y) ≤ i1 + i ⊦ 〈build_rec#(i + 1; x1, to2)〉 〈if to2 = fail then to0 := fail else to0 := some(Node(to1 .t, to2 .t))〉 (to0 ≠ fail → d ' + y = depths(to0 .t, i) + x1)
[[CONCRETESIMPRULES : ([CSIMPSEQ : ⊦ d ∈ x → d ∈ x + y], [CSIMPFORWARD : ⊦ d ' + x = y → d ∈ y], [CSIMPSEQ : ⊦ (x + y) + z = x + y + z], [CSIMPFORWARD : ⊦ depths(t, i) + x = d ' + y → d ∈ depths(t, i)])]]