| # buf = m2 * LEB_SIZE, # buf = m0 * LEB_SIZE, # avol = # avol1, avol0 = avol1, err = ESUCCESS, err0 = ESUCCESS, m = LEB_SIZE, m0 = m2, m1 = n0, n = n1, n2 = 0, n < m0, ebm-vol-inv(avol1), ebm-vol-inv(avol), range=(avol, 0, avol1, 0, m1), range=(avol, m1 + m0, avol1, m1 + m0, # avol1 - m1 + m0), n0 + m2 ≤ # avol1, n ≤ m0, err = ESUCCESS → lebs(avol, m1, n) = subarray(buf, 0, n * LEB_SIZE) ∧ mapped-full?(avol, m1, n), err = ESUCCESS ∨ ⌊err⌋ ⊦ ⟪ebm_avol_remap#(m1 + n; avol; err); if err = ESUCCESS then ebm_avol_write#(m1 + n, 0, n * m, m, buf; avol; err); n := n + 1⟫ ( ( n ≤ m0 ∧ ebm-vol-inv(avol) ∧ # buf = m0 * LEB_SIZE ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # avol = # avol1 ∧ range=(avol, 0, avol1, 0, m1) ∧ range=(avol, m1 + m0, avol1, m1 + m0, # avol1 - m1 + m0) ∧ (err = ESUCCESS → lebs(avol, m1, n) = subarray(buf, 0, n * LEB_SIZE) ∧ mapped-full?(avol, m1, n))) ∧ m0 - n < m0 - n1) |
# buf = m2 * LEB_SIZE, # avol = # avol1, lebs(avol, n0, n1) = subarray(buf, 0, n1 * LEB_SIZE), n1 < m2, ebm-vol-inv(avol1), ebm-vol-inv(avol), mapped-full?(avol, n0, n1), range=(avol, 0, avol1, 0, n0), range=(avol, n0 + m2, avol1, n0 + m2, # avol1 - n0 + m2), n0 + m2 ≤ # avol1 ⊦ ⟪ebm_avol_remap#(n0 + n1; avol; err); n := n1; if err = ESUCCESS then ebm_avol_write#(n0 + n, 0, n * LEB_SIZE, LEB_SIZE, buf; avol; err); n := n + 1⟫ ( n ≤ m2 ∧ ebm-vol-inv(avol) ∧ (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # avol = # avol1 ∧ range=(avol, 0, avol1, 0, n0) ∧ range=(avol, n0 + m2, avol1, n0 + m2, # avol1 - n0 + m2) ∧ (err = ESUCCESS → lebs(avol, n0, n) = subarray(buf, 0, n * LEB_SIZE) ∧ mapped-full?(avol, n0, n)) ∧ m2 < (m2 - n1) + n)
Used simplifier rules: ⊦ m < n → n ≠ 0; (s)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%n0 ≤ n ⊦ n - n0 < m ↔ n < m + n0; (s)% ⊦ m ≤ n → (n < m ↔ false); (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ m < n → m ≤ n; (s)