| n = n0 * VFS_PAGE_SIZE + n1, n1 < VFS_PAGE_SIZE ⊦ (content upto n).stream = (content.stream to (n0 + 1) * VFS_PAGE_SIZE) + σ⊥, n1 = 0 |
n1 < VFS_PAGE_SIZE ⊦ n1 = 0, ⌜λ n. (n / VFS_PAGE_SIZE * VFS_PAGE_SIZE < n0 * VFS_PAGE_SIZE + n1 ∧ n / VFS_PAGE_SIZE ∈ content ⊃ content[n / VFS_PAGE_SIZE];zeropage) [n % VFS_PAGE_SIZE ] ⌝ = ⌜(λ n. (n / VFS_PAGE_SIZE ∈ content ⊃ content[n / VFS_PAGE_SIZE];zeropage)[n % VFS_PAGE_SIZE]) to VFS_PAGE_SIZE * n0 + 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);% ⊦ VFS_PAGE_SIZE ≠ 0; (s)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic% ⊦ ⌜nf0⌝ to n = ⌜nf0 to n⌝ ; (s)%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)%⊦ m * VFS_PAGE_SIZE < n ∧ m ∈ content → (content upto n)[m] = content[m]; (s)%mult-c: ⊦ m * n = n * m; from specification nat-mult%mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult% ⊦ m ∈ content upto n ↔ m * VFS_PAGE_SIZE < n ∧ m ∈ content; (s)