| x0 = 1 ' + 3 ' + 2 ' + 2 ', x1 = x0 ∧ d0 = 0 ⊦ 〈if is_empty(x1) then to0 := fail else let h = head(x1) in if h < d0 then to0 := fail else if h = d0 then { x1 := pop(x1) ; to0 := some(Leaf) } else let to2 = fail, to1 = fail in { build_rec#(d0 + 1; x1, to2) ; if to2 = fail then to0 := fail else { build_rec#(d0 + 1; x1, to1) ; if to1 = fail then to0 := fail else to0 := some(Node(to2 .t, to1 .t)) } }〉 〈to1 := to0 ; if ¬ is_empty(x1) then to1 := fail〉 to1 = fail |
x0 = 1 ' + 3 ' + 2 ' + 2 ', x1 = x0 ∧ d0 = 0 ⊦ 〈let h = head(x1) in if h < d0 then to0 := fail else if h = d0 then { x1 := pop(x1) ; to0 := some(Leaf) } else let to2 = fail, to1 = fail in { build_rec#(d0 + 1; x1, to2) ; if to2 = fail then to0 := fail else { build_rec#(d0 + 1; x1, to1) ; if to1 = fail then to0 := fail else to0 := some(Node(to2 .t, to1 .t)) } }〉 〈to1 := to0 ; if ¬ is_empty(x1) then to1 := fail〉 to1 = fail
[[CONCRETESIMPRULES : ([CSIMPSEQ : ⊦ is_empty(x) ↔ x = []], [CSIMPSEQ : ⊦ d ' + x ≠ []], [CSIMPSEQ : ⊦ (x + y) + z = x + y + z])]]