| # lpt = # avol, avol[m3] = mapped(buf0), m = m2, m1 = m3, n0 = n, n1 = n2, m3 < # avol, ebm-vol-inv(avol), is-aligned(n, EB_PAGE_SIZE), is-aligned(m0, EB_PAGE_SIZE), n2 + n ≤ # buf, m0 + n ≤ LEB_SIZE, # buf0 ≤ m0 ⊦ ⟪fail_or_success#(; ; err); if err = ESUCCESS then if n0 ≠ 0 then avol[m1] := mapped(avol[m1].data + mkempbuf(m0 - # avol[m1].data) + subarray(buf, n1, n0)) else choose n with n < n0 ∧ is-aligned(n, EB_PAGE_SIZE) in if n ≠ 0 then avol[m1] := mapped(avol[m1].data + mkempbuf(m0 - # avol[m1].data) + subarray(buf, n1, n)) ifnone skip⟫ (ebm-vol-inv(avol) ∧ # lpt = # avol) |
# lpt = # avol, avol[m3] = mapped(buf0), m3 < # avol, ebm-vol-inv(avol), is-aligned(n, EB_PAGE_SIZE), is-aligned(m0, EB_PAGE_SIZE), n2 + n ≤ # buf, m0 + n ≤ LEB_SIZE, # buf0 ≤ m0 ⊦ ⟪fail_or_success#(; ; err); if err = ESUCCESS then if n ≠ 0 then avol[m3] := mapped(avol[m3].data + mkempbuf(m0 - # avol[m3].data) + subarray(buf, n2, n)) else choose n1 with n1 < n ∧ is-aligned(n1, EB_PAGE_SIZE) in if n1 ≠ 0 then avol[m3] := mapped(avol[m3].data + mkempbuf(m0 - # avol[m3].data) + subarray(buf, n2, n1)) ifnone skip⟫ (ebm-vol-inv(avol) ∧ # lpt = # avol)
Used simplifier rules: lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic