| # buf1 = ENCODED_NAT_SIZE, ENCODED_NAT_SIZE * m2 = # buf2, # buf0 + ENCODED_NAT_SIZE + ENCODED_NAT_SIZE * m2 = # orphans1 * ENCODED_NAT_SIZE, orphans ∩ orphans0 = ∅, is-encoded(n, buf1), is-encoded(orphans1, buf0 + buf1 + buf2), is-encoded(orphans0, buf0), ∃ n, buf0, buf3. n ∈ orphans ∧ buf1 + buf2 = buf0 + buf3 ∧ is-encoded(n, buf0) ∧ is-encoded(orphans -- n, buf3) ⊦ orphans = ∅, is-encoded(orphans0 ++ n, buf0 + buf1) ∧ (∃ orphans2. is-encoded(orphans2, buf2) ∧ orphans2 ∩ (orphans0 ++ n) = ∅) |
# buf3 = ENCODED_NAT_SIZE, ENCODED_NAT_SIZE * m2 = # buf, # buf0 + ENCODED_NAT_SIZE + ENCODED_NAT_SIZE * m2 = # orphans1 * ENCODED_NAT_SIZE, orphans ∩ orphans0 = ∅, is-encoded(n0, buf3), is-encoded(orphans1, buf0 + buf3 + buf), is-encoded(orphans0, buf0), is-encoded(orphans -- n0, buf), n0 ∈ orphans ⊦ # orphans = 0, orphans = ∅, is-encoded(orphans0 ++ n0, buf0 + buf3)
Used simplifier rules: ls-del-notin: ¬ n ∈ ns ⊦ ns -- n = ns;%is-encoded-size: ⊦ is-encoded(n, buf) → # buf = ENCODED_NAT_SIZE; (forward) from specification encoding-fixed-size[encoding-nat]%int-c: ⊦ ns ∩ ns0 = ns0 ∩ ns; from specification set-union[nat-set]%int-a: ⊦ (ns ∩ ns0) ∩ ns1 = ns ∩ ns0 ∩ ns1; from specification set-union[nat-set]% ⊦ ¬ n ∈ ∅; (s)% ⊦ (ns ++ n) ∩ (ns0 -- n) = (ns ∩ ns0) -- n; (s)% ⊦ is-encoded(ns0, buf) → (is-encoded(ns1, buf) ↔ ns0 = ns1); (s)%size-zero-01: ⊦ ns ≠ ∅ → # ns ≠ 0; (forward) from specification set-basic[nat-set]%ne-01: ⊦ n ∈ ns → ns ≠ ∅; (forward) from specification set-basic[nat-set]%⊦ # buf = # buf0 → (buf + buf1 = buf0 + buf2 ↔ buf = buf0 ∧ buf1 = buf2); (ws)%⊦ buf0 + buf1 = buf2 + buf3 ∧ is-encoded(n, buf0) → (is-encoded(n0, buf2) ↔ # buf0 = # buf2 ∧ n = n0); (ws)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]