| # pebs0 = n + m1, # pebs1 = n + m1, # buf1 = EB_PAGE_SIZE, pebs1[m1] = mkpeb(buf0, m2, false), is-encoded(echdr((err1 = ESUCCESS ∧ aehdr0.valid? ⊃ aehdr0.ec + 1;0)), buf1), mtd-cons(pebs0), mtd-cons(pebs1), mtd-cons(pebs1[m1, mkpeb(emptypeb, 0, false)]), mtd-cons(pebs1[m1, mkpeb(copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE), EB_PAGE_SIZE, false)]), ubi-io-initial(subarray(pebs1, 0, m1)), EB_PAGE_SIZE ≤ PEB_SIZE ⊦ n = 0, EB_PAGE_SIZE + LEB_SIZE + EB_PAGE_SIZE ≤ # copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE) ∧ EB_PAGE_SIZE + LEB_SIZE + EB_PAGE_SIZE ≤ # emptypeb ∧ (∀ n. n < LEB_SIZE + EB_PAGE_SIZE → copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE)[EB_PAGE_SIZE + n] = (emptypeb)[EB_PAGE_SIZE + n]) |
# pebs0 = n + m1, # pebs1 = n + m1, # buf1 = EB_PAGE_SIZE, pebs1[m1] = mkpeb(buf0, m2, false), n0 < LEB_SIZE + EB_PAGE_SIZE, is-encoded(echdr((err1 = ESUCCESS ∧ aehdr0.valid? ⊃ aehdr0.ec + 1;0)), buf1), mtd-cons(pebs0), mtd-cons(pebs1), mtd-cons(pebs1[m1, mkpeb(emptypeb, 0, false)]), mtd-cons(pebs1[m1, mkpeb(copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE), EB_PAGE_SIZE, false)]), ubi-io-initial(subarray(pebs1, 0, m1)), EB_PAGE_SIZE ≤ PEB_SIZE ⊦ copy(buf1, 0, emptypeb, 0, EB_PAGE_SIZE)[EB_PAGE_SIZE + n0] = empty, n = 0
Used simplifier rules: ⊦ EB_PAGE_SIZE + n = 0 ↔ false; (s)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%n < # emptypeb ⊦ (emptypeb)[n] = empty; (s)% ⊦ PEB_SIZE ≤ EB_PAGE_SIZE + n → ¬ n < LEB_SIZE + EB_PAGE_SIZE; (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ m ≤ m; (s)% ⊦ # emptypeb = PEB_SIZE; (s)% ⊦ # copy(buf, m, buf0, m0, n) = # buf0; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%mult-c: ⊦ m * n = n * m; from specification nat-mult%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult% ⊦ LEB_SIZE + 2 * EB_PAGE_SIZE = PEB_SIZE; (s)% ⊦ m + m = 2 * m; (s)