| err0 = ESUCCESS, m < # avols[v], ebm-cons(avols), is-aligned(n, EB_PAGE_SIZE), v ∈ avols, 0 + n ≤ # buf, n ≤ LEB_SIZE, n ≤ # buf, LEB_SIZE ≥ n, ⌊err0⌋ ∨ err0 = ESUCCESS ⊦ ebm-cons(avols[v, avols[v][m, mapped(subarray(buf, 0, n) + mkempbuf(LEB_SIZE - n), n)]]) |
m < # avols[v], ebm-cons(avols), is-aligned(n, EB_PAGE_SIZE), v ∈ avols, n ≤ LEB_SIZE, n ≤ # buf, avols[v][m].mapped? → # avols[v][m].data = LEB_SIZE ∧ avols[v][m].fill ≤ LEB_SIZE ∧ is-aligned(avols[v][m].fill, EB_PAGE_SIZE) ∧ range=(avols[v][m].data, avols[v][m].fill, emptyleb, 0, LEB_SIZE - avols[v][m].fill) ⊦ range=(subarray(buf, 0, n) + mkempbuf(LEB_SIZE - n), n, emptyleb, 0, LEB_SIZE - n)
Used simplifier rules: ⊦ ¬ ⌊ESUCCESS⌋ ; (s)% ⊦ mapped(buf, m).fill = m; (s)% ⊦ 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)% ⊦ # subarray(buf, m, n) = n; (s)% ⊦ #(buf + buf0) = # buf + # buf0; (s)% ⊦ mapped(buf, m).data = buf; (s)% ⊦ mapped(buf, m).mapped?; (s)%⊦ valid-leb(leb) ↔ leb.mapped? → # leb.data = LEB_SIZE ∧ leb.fill ≤ LEB_SIZE ∧ is-aligned(leb.fill, EB_PAGE_SIZE) ∧ range=(leb.data, leb.fill, emptyleb, 0, LEB_SIZE - leb.fill); (s)%⊦ v ∈ avols ∧ m < # avols[v] ∧ ebm-cons(avols) → ( ebm-cons(avols[v, avols[v][m, leb]]) ↔ valid-leb(avols[v][m]) → valid-leb(leb)); (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)% ⊦ n ≥ m ↔ m ≤ n; (s)