| # subarray(pebs, 0, m0) = # apebs, m0 + 1 = # pebs, pebs[m0] = mkpeb(buf, m, true), ubi-io-initial(pebs), ubi-io-initial(apebs), n ≤ m0, ∀ n. n < # subarray(pebs, 0, m0) → abs-peb(subarray(pebs, 0, m0)[n], apebs[n]) ⊦ abs-peb(pebs[n], copy(apebs, 0, mkapebs(m0 + 1), 0, m0)[m0, mkpeb(empty, empty, mkbuf(LEB_SIZE), 0, true)][n]) |
# apebs + 1 = # pebs, pebs[# apebs] = mkpeb(buf, m, true), ubi-io-initial(pebs), ubi-io-initial(apebs), n ≤ # apebs, ∀ n0. n0 < # apebs → abs-peb(pebs[n0], apebs[n0]) ⊦ abs-peb(pebs[n], copy(apebs, 0, mkapebs(# pebs), 0, # apebs)[# apebs, mkpeb(empty, empty, mkbuf(LEB_SIZE), 0, true)][n])
Used simplifier rules: 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 → subarray(pebs, m, n)[n0] = pebs[m + n0]; (s)% ⊦ # subarray(pebs, m, n) = n; (s)