| # buf = align↑(node-size-headerless(nd0), 2 * NODE_HEADER_SIZE), # buf2 = nd0.alignedsize, # buf3 = NODE_HEADER_SIZE, node-size-headerless(nd1) = node-size-headerless(nd0), subarray(buf2 + validtrailer + buf0, 0, NODE_HEADER_SIZE + # buf) = buf + validtrailer, is-encoded(nd0, subarray(buf2, 0, node-size-headerless(nd0))), is-encoded(nodeheader(node-size-headerless(nd0), false), buf3), is-encoded(nd1, subarray(buf, 0, node-size-headerless(nd0))), # buf ≤ nd0.alignedsize + # buf0 ⊦ nd0 = nd1 |
⊦ nd.alignedsize = align↑(node-size-headerless(nd), 2 * NODE_HEADER_SIZE)
Used simplifier rules: ⊦ #(buf + buf0) = # buf + # buf0; (s)% ⊦ # validtrailer = NODE_HEADER_SIZE; (s)%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ ¬ m + n < m; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic%m ≤ # buf ⊦ subarray(buf0 + buf, 0, # buf0 + m) = buf0 + subarray(buf, 0, m); (s)%n = # buf ⊦ subarray(buf + buf0, 0, n) = buf; (s)%⊦ # buf = # buf0 → (buf + buf1 = buf0 + buf2 ↔ buf = buf0 ∧ buf1 = buf2); (ws)% ⊦ m ≤ m + n; (s)% ⊦ 2 * m = 0 ↔ m = 0; (s)% ⊦ NODE_HEADER_SIZE ≠ 0; (s)%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult%mult-c: ⊦ m * n = n * m; from specification nat-mult% ⊦ is-encoded(nd, buf) → (is-encoded(nd0, buf) ↔ nd = nd0); (s)%n ≠ 0, m % n = 0 ⊦ align↑(m, n) = m; (s)%# buf = n ⊦ subarray(buf, 0, n) = buf; (s) Used terms: nd0