| # buf0 = # buf1, files[ino] = mkfile(m, md, # links(ino, dirs), content), ⌜buf1⌝ = ((content.stream from n0) to n) + (⌜buf0⌝ from n), afs-cons(dirs, files), ino ∈ files, n0 + n ≤ n1, n0 + n ≤ m, n1 ≤ # buf1 + n0, n ≤ # buf1 ⊦ # copy((content.stream to m).buf, n0, buf0, 0, n) = # buf1 ∧ (∀ n1. n1 < # copy((content.stream to m).buf, n0, buf0, 0, n) → copy((content.stream to m).buf, n0, buf0, 0, n)[n1] = buf1[n1]) |
# buf0 = # buf1, files[ino] = mkfile(m, md, # links(ino, dirs), content), ⌜buf1⌝ = ((content.stream from n0) to n) + (⌜buf0⌝ from n), n2 < # buf1, afs-cons(dirs, files), ino ∈ files, n0 + n ≤ n1, n0 + n ≤ m, n1 ≤ # buf1 + n0, n ≤ # buf1 ⊦ (n ≤ n2 ⊃ buf0[n2];getbyte(n2 + n0, content)) = buf1[n2]
Used simplifier rules: lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic% ⊦ content.stream[n] = getbyte(n, content); (s)%m < n, ¬ # σ0 < ⌜n⌝ ⊦ (σ0 to n)[m] = σ0[m]; (s)%finp(σ), ⌜n⌝ < # σ ⊦ σ.buf[n] = σ[n]; (s)% ⊦ m < n → (n ≤ m ↔ false); (s)% ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s)% ⊦ m < n → n ≠ 0; (s)%let: ⊦ n ≤ n0 ∧ n0 ≤ n1 → n ≤ n1; (forward) from specification nat%fle: ⊦ m < n ∧ n ≤ n0 → m < n0; (forward) from specification nat%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ m < n ↔ ¬ n ≤ m; (ss)%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% ⊦ ⌜n⌝ + ⌜m⌝ < ⌜n0⌝ ↔ n + m < n0; (s)%¬ # σ0 < ⌜n⌝ ⊦ #(σ0 to n) = ⌜n⌝ ; (s)% ⊦ ¬ ∞ < n∞; (s)% ⊦ # content.stream = ∞; (s)% ⊦ ⌜m + n⌝ = ⌜m⌝ + ⌜n⌝ ; (s)% ⊦ finp(σ0 to m); (s)% ⊦ m - 0 = m; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ n + 0 = n; (s)% ⊦ ¬ m < 0; (s)%⊦ m0 < # buf → copy(buf0, n, buf, n0, m)[m0] = (m0 < n0 ∨ n0 + m ≤ m0 ⊃ buf[m0];buf0[m0 + n - n0]); (s)% ⊦ # copy(buf, m, buf0, m0, n) = # buf0; (s)