| #(y0.butlast + y0.last ') = m + 1, y0 = y0.butlast + y0.last ' ⊦ y0.butlast + y0.last ' = [], (y0.butlast + y0.last ')[m, a] = firstn(m, y0.butlast + y0.last ') + a ' |
⊦ # x ≤ n → (x + y)[n, a] = x + y[n - # x, a]
#(y0.butlast + y0.last ') = m + 1, y0 = y0.butlast + y0.last ', # y0.butlast ≤ m ⊦ y0.butlast + y0.last '[m - # y0.butlast, a] = firstn(m, y0.butlast + y0.last ') + a ', y0.butlast + y0.last ' = []
Used simplifier rules: put-last: ⊦ n = # x → (x + a ')[n, b] = x + b ';%firstN-len: ⊦ firstn(# x, x + y) = x;% ⊦ #(x + y) = # x + # y; (s)% ⊦ # a ' = 0 +1; (s)%a: ⊦ (x + y) + z = x + y + z; from specification list% ⊦ m + n = m + n0 ↔ n = n0; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ x + y = z + y ↔ x = z; (s)% ⊦ x + a ' ≠ []; (s)% ⊦ m ≤ n ↔ ¬ n < m; (ss)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%lf-02: ⊦ m < n ∧ m = n0 → n0 < n; (forward) from specification nat-basic%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic% ⊦ # x = 0 ↔ x = []; (s)% ⊦ ¬ n < n; (s)%x ≠ [] ⊦ x.butlast + x.last ' = x; (s) Used terms: a, m, y0.last ', y0.butlast