| # lpt = # avol, avol[m1] = mapped(buf0), m = buffered(m1).leb, buffered(m1).isbuf?, n < # buf, m1 < # avol, n < n2, awbuf-inv(avol, buffered(m1)), is-aligned(# buf0 + n, EB_PAGE_SIZE), avol0 ↓ avol[m1, mapped(buf0 + subarray(buf, 0, n))], n2 ≤ # buf, # buf0 + n2 ≤ LEB_SIZE, EB_PAGE_SIZE ≤ # buf0 % EB_PAGE_SIZE + n, ⌊err2⌋ ⊦ (∀ n1. (n1 ≠ 0 → n1 < n2 → avol[m].mapped? ∧ m < # avol) ∧ ¬(n1 ≠ 0 ∧ n1 < n2 ∧ is-aligned(# avol[m].data + n1, EB_PAGE_SIZE))) ∧ ⟨skip; isbuf := true⟩ (synced(avol) ∧ avol0 ↓ avol), ∃ n1. (n1 ≠ 0 → n1 < n2 → avol[m].mapped? ∧ m < # avol) ∧ (n1 ≠ 0 ∧ n1 < n2 ∧ is-aligned(# avol[m].data + n1, EB_PAGE_SIZE)) ∧ ⟨avol[m] := mapped(avol[m].data + subarray(buf, 0, n1)); isbuf := true⟩ (synced(avol) ∧ avol0 ↓ avol), n = 0, synced(avol) ∧ avol0 ↓ avol |
# lpt = # avol, avol[m1] = mapped(buf0), n ≠ 0, n < n2, m1 < # avol, n < # buf, awbuf-inv(avol, buffered(m1)), is-aligned(# buf0 + n, EB_PAGE_SIZE), avol0 ↓ avol[m1, mapped(buf0 + subarray(buf, 0, n))], EB_PAGE_SIZE ≤ # buf0 % EB_PAGE_SIZE + n, # buf0 + n2 ≤ LEB_SIZE, n2 ≤ # buf, ⌊err2⌋ ⊦ (n0 ≠ 0 → n0 < n2 → avol[m1].mapped?) ∧ (n0 = 0 ∨ ¬ n0 < n2 ∨ ¬ is-aligned(# avol[m1].data + n0, EB_PAGE_SIZE)) ∧ ⟨skip; isbuf := true⟩ (synced(avol) ∧ avol0 ↓ avol), avol[m1].mapped? ∧ (∃ n1. n1 ≠ 0 ∧ n1 < n2 ∧ is-aligned(# avol[m1].data + n1, EB_PAGE_SIZE) ∧ ⟨avol[buffered(m1).leb] := mapped(avol[buffered(m1).leb].data + subarray(buf, 0, n1)); isbuf := true⟩ (synced(avol) ∧ avol0 ↓ avol)), synced(avol) ∧ avol0 ↓ avol
Used simplifier rules: ⊦ buffered(m).leb = m; (s)% ⊦ buffered(m).isbuf?; (s)