| abs-node(buf, nd0), 2 * NODE_HEADER_SIZE + nd1.alignedsize ≤ # buf + # buf0 ⊦ abs-node(subarray(buf + buf0, 0, 2 * NODE_HEADER_SIZE + nd1.alignedsize), nd1) ↔ nd0 = nd1 |
# buf2 = nd0.alignedsize, # buf1 = NODE_HEADER_SIZE, is-encoded(nodeheader(node-size-headerless(nd0), false), buf1), is-encoded(nd0, subarray(buf2, 0, node-size-headerless(nd0))), nd1.alignedsize ≤ nd0.alignedsize + # buf0 ⊦ (∃ buf4, buf3. subarray((buf1 + buf2 + validtrailer) + buf0, 0, 2 * NODE_HEADER_SIZE + nd1.alignedsize) = buf4 + buf3 + validtrailer ∧ is-encoded(nodeheader(node-size-headerless(nd1), false), buf4) ∧ is-encoded(nd1, subarray(buf3, 0, node-size-headerless(nd1))) ∧ # buf3 = nd1.alignedsize) ↔ nd0 = nd1
Used simplifier rules: abs-node: ⊦ abs-node(buf, nd) ↔ (∃ buf0, buf1. buf = buf0 + buf1 + validtrailer ∧ is-encoded(nodeheader(node-size-headerless(nd), false), buf0) ∧ is-encoded(nd, subarray(buf1, 0, node-size-headerless(nd))) ∧ # buf1 = nd.alignedsize);% ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s)%c: ⊦ m + n = n + m; 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% ⊦ m0 * 1 = m0; (s)%m2 ≠ 0 ⊦ (* m2) * m + n ≤ m + n0 ↔ (m2 - 1) * m + n ≤ n0; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%append-a: ⊦ (buf + buf0) + buf1 = buf + buf0 + buf1; from specification array-splice[buffer]% ⊦ # validtrailer = NODE_HEADER_SIZE; (s)% ⊦ #(buf + buf0) = # buf + # buf0; (s)%is-encoded-size: ⊦ is-encoded(ndhd, buf) → # buf = NODE_HEADER_SIZE; (forward) from specification encoding-fixed-size-nonempty[encoding-node-header]