specs/caterpillar-asm/proofs/1511792328000

initcaterpillar_init#(n; ; h, xs, xs_len, ys){h := n, xs := [], xs_len := 0, ys := []}

<_SIDEGOALS>

00init-proofinit-proof-info

getcaterpillar_get#(h, xs, ys; ; x){x := prefixn(h, xs + ys)}

<_SIDEGOALS>

00get-proofget-proof-info

addcaterpillar_add#(a, h; xs, xs_len, ys){if xs_len + 1 = h then {ys := a + xs; xs_len := 0; xs := []} else {xs := a + xs; xs_len := 1 + xs_len}}

<_SIDEGOALS>

00add-proofadd-proof-info

inv-get# xs < h, # xs = xs_len, # ys = 0 ∨ # ys = h ⊦ ⟪caterpillar_get#(h, xs, ys; ; x)⟫ true

get

<_SIDEGOALS>

04inv-get-proofinv-get-proof-info

inv-add# xs < h, # xs = xs_len, # ys = 0 ∨ # ys = h
⊦ ⟪caterpillar_add#(a, h; xs, xs_len, ys)⟫ (# xs < h ∧ # xs = xs_len ∧ (# ys = 0 ∨ # ys = h))

add

<_SIDEGOALS>

08inv-add-proofinv-add-proof-info

inv-initn > 0 ⊦ ⟪caterpillar_init#(n; ; h, xs, xs_len, ys)⟫ (# xs < h ∧ # xs = xs_len ∧ (# ys = 0 ∨ # ys = h))

init

<_SIDEGOALS>

04inv-init-proofinv-init-proof-info

0