| # buf1 = ENCODED_NAT_SIZE, # buf0 = m * ENCODED_NAT_SIZE, # ns0 = m + 1, # ns1 * ENCODED_NAT_SIZE = # ns0 * ENCODED_NAT_SIZE, ENCODED_NAT_SIZE + # buf0 = # ns0 * ENCODED_NAT_SIZE, is-encoded(ns1, buf1 + buf0), is-encoded(ns0 -- n, buf0), is-encoded(n, buf1), n ∈ ns0, ∀ ns, buf, ns1. # ns < # ns0 → # buf = # ns1 * ENCODED_NAT_SIZE ∧ # buf = # ns * ENCODED_NAT_SIZE ∧ is-encoded(ns, buf) ∧ is-encoded(ns1, buf) → ns = ns1 ⊦ # ns0 = 0, ns0 = ns1, ns0 = ∅ |
# buf1 = ENCODED_NAT_SIZE, # buf0 = m * ENCODED_NAT_SIZE, # ns0 = m + 1, m + 1 = # ns1, is-encoded(ns1, buf1 + buf0), is-encoded(ns0 -- n, buf0), is-encoded(n, buf1), n ∈ ns0, ∀ ns, buf, ns1. # ns < m + 1 → # buf = # ns1 * ENCODED_NAT_SIZE ∧ # buf = # ns * ENCODED_NAT_SIZE ∧ is-encoded(ns, buf) ∧ is-encoded(ns1, buf) → ns = ns1 ⊦ ns0 = ns1, ns0 = ∅
Used simplifier rules: ⊦ m + 1 ≠ 0; (s)% ⊦ m + n = m + n0 ↔ n = n0; (s)% ⊦ ENCODED_NAT_SIZE ≠ 0; (s)% ⊦ m * n + n = m1 * n ↔ m + 1 = m1 ∨ n = 0; (s)%mult-c: ⊦ m * n = n * m; from specification nat-mult%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m * (n + 1) = m * n + m; (s)