| # buf1 = n2 + n1 + m, ⌜# buf1⌝ = ⌜n1⌝ + #((⌜buf0⌝ from n0) to m) + #(⌜buf1⌝ from n1 + m), n < # buf1, n1 + m ≤ # buf1, n0 + m ≤ # buf0 ⊦ (n < n1 ∨ n1 + m ≤ n ⊃ buf1[n];buf0[n + n0 - n1]) = ((⌜buf1⌝ to n1) + ((⌜buf0⌝ from n0) to m) + (⌜buf1⌝ from n1 + m))[n], ⌜n⌝ < #(⌜buf1⌝ to n1) |
# buf1 = n2 + n1 + m, ⌜# buf1⌝ = ⌜n1⌝ + #((⌜buf0⌝ from n0) to m) + #(⌜buf1⌝ from n1 + m), n < # buf1, n1 < # buf1, n0 + m ≤ # buf0, n1 + m ≤ # buf1, n1 ≤ n ⊦ n2 + m = 0, (n1 + m ≤ n ⊃ buf1[n];buf0[(n - n1) + n0]) = (((⌜buf0⌝ from n0) to m) + (⌜buf1⌝ from n1 + m))[n - n1]
Used simplifier rules: ⊦ m < m + n ↔ n ≠ 0; (s)%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic% ⊦ n ≤ m → m + n0 - n = (m - n) + n0; (s)% ⊦ m ≤ n → (n < m ↔ false); (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)%append-assoc: ⊦ (σ0 + σ3) + σ4 = σ0 + σ3 + σ4; from specification stream[buffer-inf]% ⊦ ⌜m⌝ .n = m; (s)%¬ # σ0 < ⌜n⌝ ⊦ #(σ0 to n) = ⌜n⌝ ; (s)% ⊦ m + m0 < n → ¬ n + n0 < m; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m +1 = m + 1; (s)% ⊦ m < n → n ≠ 0; (s)%lf-02: ⊦ m < n ∧ m = n0 → n0 < n; (forward) from specification nat-basic%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%fle-01: ⊦ m ≤ n ∧ n < n0 → m < n0; (forward) from specification nat%trans: ⊦ n < n0 ∧ n0 < n1 → n < n1; (forward) from specification nat-basic%lf: ⊦ m < n ∧ n < n0 → m +1 < n0; (forward) from specification nat-basic% ⊦ ⌜m⌝ < ⌜n⌝ ↔ m < n; (s)% ⊦ # ⌜buf⌝ = ⌜# buf⌝ ; (s)% ⊦ ¬ ⌜m⌝ < # σ0 → (σ0 + σ2)[m] = σ2[m - (# σ0).n]; (s)