| # 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(orphans, buf1 + buf2), is-encoded(orphans0, buf0), is-encoded(orphans1, buf0 + buf1 + buf2), is-encoded(n, buf1) ⊦ is-encoded(orphans0 ++ n, buf0 + buf1) ∧ (∃ orphans2. is-encoded(orphans2, buf2) ∧ orphans2 ∩ (orphans0 ++ n) = ∅) |
⊦ ns ≠ ∅ → (is-encoded(ns, buf) ↔ (∃ n, buf0, buf1. n ∈ ns ∧ buf = buf0 + buf1 ∧ is-encoded(n, buf0) ∧ is-encoded(ns -- n, buf1)))
# 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) = ∅)
Used simplifier rules: ⊦ ns ∩ ∅ = ∅; (s)%int-a: ⊦ (ns ∩ ns0) ∩ ns1 = ns ∩ ns0 ∩ ns1; from specification set-union[nat-set]%int-c: ⊦ ns ∩ ns0 = ns0 ∩ ns; from specification set-union[nat-set]% ⊦ is-encoded(∅, buf) ↔ buf = mkbuf(0); (s)% ⊦ buf + buf0 = mkbuf(0) ↔ buf = mkbuf(0) ∧ buf0 = mkbuf(0); (ws)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]% ⊦ # mkbuf(n) = n; (s)% ⊦ ENCODED_NAT_SIZE ≠ 0; (s) Used terms: buf1 + buf2, orphans