| n0 < # x, ∀ x0. n0 ≠ 0 ∧ n0 ≤ # x0 → firstn(n0, x0) = firstn(n0 - 1, x0) + x0[n0 - 1] ' ⊦ x.first ' + firstn(n0, x.rest) = firstn(n0, x) + x[n0] ', x = [] |
n0 = m + 1 ∧ n0 ≠ 0, n0 < # x, ∀ x0. n0 ≠ 0 ∧ n0 ≤ # x0 → firstn(n0, x0) = firstn(m, x0) + x0[m] ' ⊦ x.first ' + firstn(n0, x.rest) = firstn(n0, x) + x[n0] ', x = []
Used simplifier rules: firstN-zero: ⊦ firstn(0, x) = [];%get-zero: ⊦ x ≠ [] → x[0] = x.first;%app: ⊦ x + [] = x; from specification list%a: ⊦ (x + y) + z = x + y + z; from specification list%Nil: ⊦ [] + x = x; from specification list%c-04: ⊦ a ' = b ' ↔ a = b; from specification list%n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: n0, m