| avol[n + m0].mapped?, n + m0 + 1 < # avol, n + m0 < # avol, ebm-vol-inv(avol), ∀ n, avol. n + m0 < # avol ∧ ebm-vol-inv(avol) → # lebs(avol, n, m0) = m0 * LEB_SIZE ⊦ # lebs(avol, n, m0) + #(avol[n + m0].data + mkempbuf(LEB_SIZE - # avol[n + m0].data)) = LEB_SIZE * m0 + LEB_SIZE |
avol[n + m0] = mapped(buf), n + m0 < # avol, n + m0 + 1 < # avol, ebm-vol-inv(avol), ∀ n, avol. n + m0 < # avol ∧ ebm-vol-inv(avol) → # lebs(avol, n, m0) = m0 * LEB_SIZE ⊦ # lebs(avol, n, m0) = LEB_SIZE * m0
Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic% ⊦ m + n = m + n0 ↔ n = n0; (s)%n ≤ m ⊦ (m - n) + n0 = n1 ↔ m + n0 = n + n1; (s)%⊦ n < # avol ∧ avol[n] = mapped(buf) ∧ ebm-vol-inv(avol) → ¬ LEB_SIZE < # buf; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ mapped(buf).data = buf; (s)% ⊦ aleb.mapped? ↔ (∃ buf. aleb = mapped(buf)); (as)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]% ⊦ # mkempbuf(n) = n; (s)% ⊦ #(buf + buf0) = # buf + # buf0; (s)