| avols[v][m2].mapped?, m2 < # avols[v], ebm-cons(avols), is-aligned(m1, EB_PAGE_SIZE), is-aligned(n, EB_PAGE_SIZE), v ∈ avols, 0 + m1 ≤ # avols[v][m2].data, n2 + n ≤ # buf, m1 + n ≤ LEB_SIZE, n + n2 ≤ # buf, avols[v][m2].fill ≤ m1, LEB_SIZE - m1 ≥ n, LEB_SIZE ≥ m1 ⊦ n = 0, ebm-cons(avols[v, avols[v][m2, mapped(subarray(avols[v][m2].data, 0, m1) + subarray(buf, n2, n) + mkempbuf(LEB_SIZE - m1 - n), m1 + n)]]) |
# avols[v][m2].data = LEB_SIZE, avols[v][m2].mapped?, m2 < # avols[v], ebm-cons(avols), is-aligned(n, EB_PAGE_SIZE), is-aligned(m1, EB_PAGE_SIZE), is-aligned(avols[v][m2].fill, EB_PAGE_SIZE), range=(avols[v][m2].data, avols[v][m2].fill, emptyleb, 0, LEB_SIZE - avols[v][m2].fill), v ∈ avols, n + m1 ≤ LEB_SIZE, avols[v][m2].fill ≤ m1, n + n2 ≤ # buf, m1 + n ≤ LEB_SIZE, n2 + n ≤ # buf, m1 ≤ LEB_SIZE, avols[v][m2].fill ≤ LEB_SIZE ⊦ n = 0, range=(subarray(avols[v][m2].data, 0, m1) + subarray(buf, n2, n) + mkempbuf(LEB_SIZE - m1 - n), m1 + n, emptyleb, 0, LEB_SIZE - m1 + n)
Used simplifier rules: let: ⊦ n ≤ n0 ∧ n0 ≤ n1 → n ≤ n1; (forward) from specification nat%m ≠ 0, is-aligned(n1, m) ⊦ is-aligned(n0 + n1, m) ↔ is-aligned(n0, m); (s)% ⊦ EB_PAGE_SIZE ≠ 0; (s)% ⊦ mapped(buf, m).fill = m; (s)% ⊦ m + n = m + n0 ↔ n = n0; (s)% ⊦ n ≤ n0 → (m + (n0 - n)) + n = m + n0; (s)%n ≤ m ⊦ (m - n) + n0 = n1 ↔ m + n0 = n + n1; (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)%n0 ≤ n ⊦ m ≤ n - n0 ↔ m + n0 ≤ n; (s)% ⊦ m ≤ n → (n < m ↔ false); (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ n ≥ m ↔ m ≤ n; (s)