| # buf = VFS_PAGE_SIZE ⊦ content[n, buf].stream = (content.stream to n * VFS_PAGE_SIZE) + ⌜buf⌝ + (content.stream from (n + 1) * VFS_PAGE_SIZE) |
# buf = VFS_PAGE_SIZE ⊦ ⌜λ n0. (n0 / VFS_PAGE_SIZE ∈ content[n, buf] ⊃ content[n, buf][n0 / VFS_PAGE_SIZE];zeropage)[n0 % VFS_PAGE_SIZE]⌝ = ⌜(λ n. (n / VFS_PAGE_SIZE ∈ content ⊃ content[n / VFS_PAGE_SIZE];zeropage)[n % VFS_PAGE_SIZE]) to n * VFS_PAGE_SIZE⌝ + ⌜buf⌝ + ⌜(λ n. (n / VFS_PAGE_SIZE ∈ content ⊃ content[n / VFS_PAGE_SIZE];zeropage)[n % VFS_PAGE_SIZE]) from VFS_PAGE_SIZE * n + VFS_PAGE_SIZE⌝
Used simplifier rules: stream: ⊦ content.stream = ⌜λ n. getbyte(n, content)⌝ ;%getbyte: ⊦ getbyte(m, content) = getpage(m / VFS_PAGE_SIZE, content)[m % VFS_PAGE_SIZE];%getpage: ⊦ getpage(n, content) = (n ∈ content ⊃ content[n];zeropage);%append-assoc: ⊦ (σ0 + σ3) + σ4 = σ0 + σ3 + σ4; from specification stream[buffer-inf]% ⊦ ⌜nf0⌝ from n = ⌜nf0 from n⌝ ; (s)%mult-c: ⊦ m * n = n * m; from specification nat-mult%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m * (n + 1) = m * n + m; (s)% ⊦ ⌜nf0⌝ to n = ⌜nf0 to n⌝ ; (s)