| # subarray(buf1, 0, EB_PAGE_SIZE) = # emptypage, # buf = n0 + ENCODED_ELEM_SIZE, # buf1 = n0 + ENCODED_ELEM_SIZE, subarray(buf1, ENCODED_ELEM_SIZE, n0) = subarray(buf, ENCODED_ELEM_SIZE, n0), is-encoded(a, subarray(buf1, 0, ENCODED_ELEM_SIZE)), EB_PAGE_SIZE ≤ n0 + ENCODED_ELEM_SIZE, ENCODED_ELEM_SIZE ≤ EB_PAGE_SIZE, ∀ n. n < # subarray(buf1, 0, EB_PAGE_SIZE) → subarray(buf1, 0, EB_PAGE_SIZE)[n] = (emptypage)[n] ⊦ subarray(buf1, 0, ENCODED_ELEM_SIZE) = mkempbuf(ENCODED_ELEM_SIZE) |
# buf1 = n0 + ENCODED_ELEM_SIZE, # buf = n0 + ENCODED_ELEM_SIZE, subarray(buf1, ENCODED_ELEM_SIZE, n0) = subarray(buf, ENCODED_ELEM_SIZE, n0), is-encoded(a, subarray(buf1, 0, ENCODED_ELEM_SIZE)), ENCODED_ELEM_SIZE ≤ EB_PAGE_SIZE, EB_PAGE_SIZE ≤ n0 + ENCODED_ELEM_SIZE, ∀ n. n < EB_PAGE_SIZE → buf1[n] = empty ⊦ subarray(buf1, 0, ENCODED_ELEM_SIZE) = mkempbuf(ENCODED_ELEM_SIZE)
Used simplifier rules: n < # emptypage ⊦ (emptypage)[n] = empty; (s)% ⊦ m < n → (n ≤ m ↔ false); (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ n + 0 = n; (s)% ⊦ n0 < n → subarray(buf, m, n)[n0] = buf[m + n0]; (s)% ⊦ # emptypage = EB_PAGE_SIZE; (s)% ⊦ # subarray(buf, m, n) = n; (s)