| n0 + n = m0 * VFS_PAGE_SIZE + n2, files1 -- ino = files0 -- ino, VFS_PAGE_SIZE = n4 + n2 + m, files1[ino] = mkfile(m2, md0, # links(ino, dirs), content0), files0[ino] = mkfile(m2, md0, m4, content), n2 < VFS_PAGE_SIZE, afs-cons(dirs, files1), ino ∈ files1, ino ∈ files0, n2 + m ≤ VFS_PAGE_SIZE, m0 * VFS_PAGE_SIZE ≤ n1, m0 * VFS_PAGE_SIZE ≤ n + n0, n + m ≤ # buf, n ≤ # buf, n1 ≤ # buf + n0, n0 + n ≤ n1, m + n2 ≤ VFS_PAGE_SIZE, m0 * VFS_PAGE_SIZE ≤ # buf + n0 ⊦ ((content.stream to n0) + (⌜buf⌝ to n) to m0 * VFS_PAGE_SIZE) + ((((content.stream to n0) + (⌜buf⌝ to n)) + (content.stream from n0 + n) from m0 * VFS_PAGE_SIZE) to n2) + ((⌜buf⌝ from n) to m) + ((((content.stream to n0) + (⌜buf⌝ to n)) + (content.stream from n0 + n) from m0 * VFS_PAGE_SIZE from n2 + m) to n4 to n4) + (content.stream from n0 + n from (VFS_PAGE_SIZE * m0 + VFS_PAGE_SIZE - (#((content.stream to n0) + (⌜buf⌝ to n))).n)) = (content.stream to n0) + (⌜buf⌝ to n + m) + (content.stream from n0 + n + m), n4 + m = 0, #(((content.stream to n0) + (⌜buf⌝ to n)) + (content.stream from n0 + n) from m0 * VFS_PAGE_SIZE) < ⌜VFS_PAGE_SIZE⌝ , ⌜VFS_PAGE_SIZE * m0 + VFS_PAGE_SIZE⌝ < #((content.stream to n0) + (⌜buf⌝ to n)) |
n0 + n = m0 * VFS_PAGE_SIZE + n2, files1 -- ino = files0 -- ino, VFS_PAGE_SIZE = n4 + n2 + m, files1[ino] = mkfile(m2, md0, # links(ino, dirs), content0), files0[ino] = mkfile(m2, md0, m4, content), n2 < VFS_PAGE_SIZE, afs-cons(dirs, files1), ino ∈ files1, ino ∈ files0, n + n0 ≤ VFS_PAGE_SIZE + VFS_PAGE_SIZE * m0, n2 + m ≤ VFS_PAGE_SIZE, m0 * VFS_PAGE_SIZE ≤ n1, m0 * VFS_PAGE_SIZE ≤ n + n0, n + m ≤ # buf, n ≤ # buf, n1 ≤ # buf + n0, n0 + n ≤ n1, m + n2 ≤ VFS_PAGE_SIZE, m0 * VFS_PAGE_SIZE ≤ # buf + n0 ⊦ ((content.stream to n0) + (⌜buf⌝ to n) to m0 * VFS_PAGE_SIZE) + ((((content.stream to n0) + (⌜buf⌝ to n)) + (content.stream from n0 + n) from m0 * VFS_PAGE_SIZE) to n2) + ((⌜buf⌝ from n) to m) + ((((content.stream to n0) + (⌜buf⌝ to n)) + (content.stream from n0 + n) from m0 * VFS_PAGE_SIZE from n2 + m) to n4 to n4) + (content.stream from n0 + n from (VFS_PAGE_SIZE * m0 + VFS_PAGE_SIZE - n0 + n)) = (content.stream to n0) + (⌜buf⌝ to n + m) + (content.stream from n0 + n + m), n4 + m = 0, #(((content.stream to n0) + (⌜buf⌝ to n)) + (content.stream from n0 + n) from m0 * VFS_PAGE_SIZE) < ⌜VFS_PAGE_SIZE⌝
Used simplifier rules: mult-a: ⊦ m0 * m * n = (m0 * m) * n; from specification nat-mult% ⊦ m ≤ m + n; (s)% ⊦ m * n ≤ m1 * n + n ↔ m ≤ m1 + 1 ∨ n = 0; (s)%let: ⊦ n ≤ n0 ∧ n0 ≤ n1 → n ≤ n1; (forward) from specification nat%mult-c: ⊦ m * n = n * m; from specification nat-mult% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ ⌜n⌝ + ⌜m⌝ < ⌜n0⌝ + ⌜n1⌝ ↔ n + m < n0 + n1; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s)%add-comm: ⊦ n∞1 + n∞2 = n∞2 + n∞1; from specification nat-inf%add-assoc: ⊦ (n∞ + n∞1) + n∞2 = n∞ + n∞1 + n∞2; from specification nat-inf% ⊦ ⌜m⌝ .n = m; (s)%n∞ ≠ ∞ ⊦ (⌜m⌝ + n∞).n = m + n∞.n; (s)% ⊦ ⌜m⌝ ≠ ∞; (s)%append-assoc: ⊦ (σ0 + σ3) + σ4 = σ0 + σ3 + σ4; from specification stream[buffer-inf]% ⊦ m ≤ n → (n < m ↔ false); (s)% ⊦ ⌜m⌝ < ⌜n⌝ ↔ m < n; (s)% ⊦ # ⌜buf⌝ = ⌜# buf⌝ ; (s)%¬ # σ0 < ⌜n⌝ ⊦ #(σ0 to n) = ⌜n⌝ ; (s)% ⊦ ¬ ∞ < n∞; (s)% ⊦ # content.stream = ∞; (s)% ⊦ #(σ0 + σ2) = # σ0 + # σ2; (s)