| # ns = m + 1, # buf1 = ENCODED_NAT_SIZE, # buf2 = ENCODED_NAT_SIZE, # buf = m * ENCODED_NAT_SIZE, is-encoded(n, buf1), is-encoded(ns -- n0, buf), is-encoded(n0, buf2), n0 ∈ ns, ∀ ns0, buf0, ns2, buf1, n0. # ns0 < #(ns ++ n) → # buf0 = # ns2 * ENCODED_NAT_SIZE ∧ # buf1 = ENCODED_NAT_SIZE ∧ is-encoded(n0, buf1) ∧ is-encoded(ns2, buf0) → (is-encoded(ns0, buf0 + buf1) ↔ ns0 = ns2 ++ n0) ∨ n0 ∈ ns2 ⊦ ns = ∅, #((ns -- n0) ++ n) < #(ns ++ n), n ∈ ns, ∃ n0, buf4, buf3. (n0 = n ∨ n0 ∈ ns) ∧ (buf2 + buf) + buf1 = buf4 + buf3 ∧ is-encoded(n0, buf4) ∧ is-encoded((ns ++ n) -- n0, buf3) |
# ns = m + 1, # buf1 = ENCODED_NAT_SIZE, # buf2 = ENCODED_NAT_SIZE, # buf = m * ENCODED_NAT_SIZE, m + 1 < #((ns -- n0) ++ n), is-encoded(n, buf1), is-encoded(ns -- n0, buf), is-encoded(n0, buf2), n0 ∈ ns, ∀ ns0, buf0, ns2, buf1, n0. # ns0 < #(ns ++ n) → # buf0 = # ns2 * ENCODED_NAT_SIZE ∧ # buf1 = ENCODED_NAT_SIZE ∧ is-encoded(n0, buf1) ∧ is-encoded(ns2, buf0) → (is-encoded(ns0, buf0 + buf1) ↔ ns0 = ns2 ++ n0) ∨ n0 ∈ ns2 ⊦ ns = ∅, n ∈ ns, ∃ n0, buf4, buf3. (n0 = n ∨ n0 ∈ ns) ∧ (buf2 + buf) + buf1 = buf4 + buf3 ∧ is-encoded(n0, buf4) ∧ is-encoded((ns ++ n) -- n0, buf3)
Used simplifier rules: ⊦ m < n → n ≠ 0; (s)%lf-02: ⊦ m < n ∧ m = n0 → n0 < n; (forward) from specification nat-basic%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m < n + 1 ↔ ¬ n < m; (s)% ⊦ ¬ n ∈ ns → #(ns ++ n) = # ns + 1; (s)