| # x = n2 + n1, ⌜n1 + n⌝ < #((σ to n) + ⌜x⌝ ), finp((σ to n) + ⌜x⌝ ) ⊦ n2 = 0, x = [], # σ < ⌜n⌝ , ⌜(#((σ to n) + ⌜x⌝ )).n - n1 + n⌝ = ⌜n2⌝ ∧ (n0 < n2 → ((σ to n) + ⌜x⌝ from n1 + n)[n0] = x[n1 + n0]) |
# x = n2 + n1, ⌜x0⌝ = (σ to n) + ⌜x⌝ , n0 < n2 ⊦ (x0 from n1 + n)[n0] = x[n1 + n0], x = [], # σ < ⌜n⌝
Used simplifier rules: size-append: ⊦ #(σ + σ1) = # σ + # σ1;%size-to: ¬ # σ < ⌜n⌝ ⊦ #(σ to n) = ⌜n⌝ ;%size-fin: ⊦ # ⌜x⌝ = ⌜# x⌝ ;%append-assoc: ⊦ (σ + σ1) + σ2 = σ + σ1 + σ2;%from-fin: ⊦ ⌜x⌝ from n = ⌜x from n⌝ ;%sel-fin: ⊦ ⌜x⌝ [n] = x[n];% ⊦ ⌜x⌝ = ⌜x0⌝ ↔ x = x0; (s)% ⊦ finp(⌜x⌝ ); (s)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic% ⊦ m < n → n ≠ 0; (s)% ⊦ m + n < m + n0 ↔ n < n0; (s)% ⊦ m + n - m = n; (s)% ⊦ m < m + n ↔ n ≠ 0; (s)%stream-fin-forward: ⊦ finp(σ) → (∃ x. ⌜x⌝ = σ); (forward) from specification stream-basic%n0 ≤ n ⊦ m < n - n0 ↔ m + n0 < n; (s)% ⊦ m < n → ¬ n < m; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)% ⊦ ⌜m⌝ = ⌜m0⌝ ↔ m = m0; (s)% ⊦ m + n - n + n1 = m - n1; (s)% ⊦ ⌜m⌝ .n = m; (s)%n∞ ≠ ∞ ⊦ (⌜m⌝ + n∞).n = m + n∞.n; (s)% ⊦ ⌜m⌝ ≠ ∞; (s)% ⊦ ⌜n⌝ + n∞1 = ∞ ↔ n∞1 = ∞; (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 < n; (s)% ⊦ ⌜n⌝ + n∞1 < ⌜n⌝ + n∞2 ↔ n∞1 < n∞2; (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)