| err = ESUCCESS, err0 = err1, f = fs[fh.fid], fh = ofh[fd], n0 = n1, root.dir?, fids-cons(root, fs, ofh), pre-write(fd, buf, n0, err, user, root, fs, ofh), fh.fid ∈ fs, fd ∈ ofh, n1 ≤ # buf, n ≤ n0 ⊦ fids-cons(root, fs[fh.fid, f.content:= splice(buf, 0, f.content, fh.pos, n)], ofh[fd, ofh[fd].pos:= (fh.pos + n)]) |
⊦ fids-cons(tree0, fs0, ofh0) → (fids-cons(tree1, fs1, ofh1) ↔ (∀ fid. (fid ∈ fs0 ↔ fid ∈ tree0.fids ∨ fid ∈ ofh0.fids) → (fid ∈ fs1 ↔ fid ∈ tree1.fids ∨ fid ∈ ofh1.fids)))
fid ∈ fs ↔ fid ∈ root.fids ∨ fid ∈ ofh.fids, root.dir?, fids-cons(root, fs, ofh), fd ∈ ofh, ofh[fd].fid ∈ fs, n ≤ n1, n1 ≤ # buf, n ≤ # buf, ofh[fd].mode = MODE_W ∨ ofh[fd].mode = MODE_RW ⊦ fid ∈ fs[ofh[fd].fid, mkfile(fs[ofh[fd].fid].meta, splice(buf, 0, fs[ofh[fd].fid].content, ofh[fd].pos, n))] ↔ fid ∈ root.fids ∨ fid ∈ ofh[fd, mkfh(ofh[fd].fid, ofh[fd].mode, ofh[fd].pos + n)].fids
Used simplifier rules: fids-cons-reduce: ⊦ fids-cons(tree0, fs0, ofh0) → ( fids-cons(tree1, fs1, ofh1) ↔ (∀ fid. (fid ∈ fs0 ↔ fid ∈ tree0.fids ∨ fid ∈ ofh0.fids) → (fid ∈ fs1 ↔ fid ∈ tree1.fids ∨ fid ∈ ofh1.fids)));%let: ⊦ n ≤ n0 ∧ n0 ≤ n1 → n ≤ n1; (forward) from specification nat% ⊦ fh.pos:= m = mkfh(fh.fid, fh.mode, m); (s)% ⊦ f.content:= buf = mkfile(f.meta, buf); (s)%⊦ pre-write(fd, buf, n, ESUCCESS, user, root, fs, ofh) ↔ fd ∈ ofh ∧ (ofh[fd].mode = MODE_W ∨ ofh[fd].mode = MODE_RW); (s)