| # buf = (n2 + n1) * LEB_SIZE, avol[n3 + n1] = mapped(buf0), subarray(buf, 0, n1 * LEB_SIZE) = lebs(avol, n3, n1), n3 + n1 < # avol, ebm-vol-inv(avol), mapped-full?(avol, n3, n2 + n1), n3 + n2 + n1 ≤ # avol, LEB_SIZE ≤ # buf0 + (LEB_SIZE - # buf0), # buf0 ≤ LEB_SIZE, 1 ≤ n2, LEB_SIZE ≤ #(buf0 + mkempbuf(LEB_SIZE - # buf0)), n1 * LEB_SIZE + LEB_SIZE ≤ # buf ⊦ n2 = 0, subarray ( subarray(buf, 0, n1 * LEB_SIZE) + subarray(buf0 + mkempbuf(LEB_SIZE - # buf0), 0, LEB_SIZE) + subarray(buf, n1 * LEB_SIZE + LEB_SIZE, # buf - n1 * LEB_SIZE - LEB_SIZE), 0, LEB_SIZE * n1 + LEB_SIZE) = lebs(avol, n3, n1 + 1) |
# buf = (n2 + n1) * LEB_SIZE, avol[n3 + n1] = mapped(buf0), subarray(buf, 0, n1 * LEB_SIZE) = lebs(avol, n3, n1), n3 + n1 < # avol, ebm-vol-inv(avol), mapped-full?(avol, n3, n2 + n1), 1 ≤ n2, # buf0 ≤ LEB_SIZE, n3 + n2 + n1 ≤ # avol, n1 * LEB_SIZE + LEB_SIZE ≤ # buf, LEB_SIZE ≤ # buf0 + (LEB_SIZE - # buf0) ⊦ lebs(avol, n3, n1) + buf0 + mkempbuf(LEB_SIZE - # buf0) = lebs(avol, n3, n1 + 1), n2 = 0
Used simplifier rules: n = # buf ⊦ subarray(buf + buf0, 0, n) = buf; (s)% ⊦ m + n = m + n0 ↔ n = n0; (s)%mult-c: ⊦ m * n = n * m; from specification nat-mult% ⊦ n ≤ n0 → (m + (n0 - n)) + n = m + n0; (s)%n + m < # avol ⊦ ebm-vol-inv(avol) → # lebs(avol, n, m) = m * LEB_SIZE; (s)% ⊦ m < n → (n ≤ m ↔ false); (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)%# buf = n ⊦ subarray(buf, 0, n) = buf; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ n ≤ m → ((m - n) + n0 = m ↔ n = n0); (s)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]% ⊦ # mkempbuf(n) = n; (s)% ⊦ #(buf + buf0) = # buf + # buf0; (s)