| buf = mkbuf(encoding-size(sb, EB_PAGE_SIZE)), m = encoding-size(sb, EB_PAGE_SIZE), # avol ≠ 0, ebm-vol-inv(avol), encoding-size(sb, EB_PAGE_SIZE) ≤ LEB_SIZE ⊦ ⟪encode_superblock#(sb, 0, EB_PAGE_SIZE; buf, m; err); avol0 := avol; if err = ESUCCESS then ebm_avol_change#(0, m, buf; avol; err)⟫ ( (err = ESUCCESS ∨ ⌊err⌋ ) ∧ ebm-vol-inv(avol) ∧ (err = ESUCCESS → id○(avol, avol0, 0) ∧ (∃ buf. is-encoded(sb, buf) ∧ avol[0] = mapped(buf))) ∧ (err ≠ ESUCCESS → avol = avol0)) |
n + encoding-size(sb, EB_PAGE_SIZE) ≤ # buf, buf0 = buf ⊦ ⟪encode_superblock#(sb, n, EB_PAGE_SIZE; buf, n0; err)⟫ ( (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # buf = # buf0 ∧ (err = ESUCCESS → is-encoded(sb, subarray(buf, n, encoding-size(sb, EB_PAGE_SIZE))) ∧ n0 = encoding-size(sb, EB_PAGE_SIZE)))
buf = mkbuf(encoding-size(sb, EB_PAGE_SIZE)), buf = buf, buf1 = buf, m = encoding-size(sb, EB_PAGE_SIZE), n1 = 0, sb0 = sb, ebm-vol-inv(avol), encoding-size(sb, EB_PAGE_SIZE) ≤ LEB_SIZE, 0 + encoding-size(sb, EB_PAGE_SIZE) ≤ # buf ⊦ [encode_superblock#(sb, 0, EB_PAGE_SIZE; buf, m; err)] ( (err = ESUCCESS ∨ ⌊err⌋ ) ∧ # buf = # buf1 ∧ (err = ESUCCESS → is-encoded(sb0, subarray(buf, n1, encoding-size(sb0, EB_PAGE_SIZE))) ∧ m = encoding-size(sb0, EB_PAGE_SIZE)) → ⟪avol0 := avol; if err = ESUCCESS then ebm_avol_change#(0, m, buf; avol; err)⟫ ( (err = ESUCCESS ∨ ⌊err⌋ ) ∧ ebm-vol-inv(avol) ∧ (err = ESUCCESS → id○(avol, avol0, 0) ∧ (∃ buf. is-encoded(sb, buf) ∧ avol[0] = mapped(buf))) ∧ (err ≠ ESUCCESS → avol = avol0))), # avol = 0
Used simplifier rules: ⊦ n + 0 = n; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ # mkbuf(n) = n; (s)% ⊦ m ≤ m; (s)