| # x0 = (m + 1) + # z, x0 = firstn(m, x0) + a ' + z, # z ≤ # x0, x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → (x0.head ' + firstn(m, x0.tail)).butlast = firstn(# x0 - 1 + # z, x0) ⊦ (x0.head ' + firstn(m, x0.tail)).butlast = firstn(m, x0) |
# x0 = (m + 1) + # z, x0 = firstn(m, x0) + a ' + z, x0 = a0 + y, # z ≤ # x0, x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → (a0 ' + firstn(m, y)).butlast = firstn(# x0 - 1 + # z, x0) ⊦ (a0 ' + firstn(m, y)).butlast = firstn(m, x0), x0 = []
Used simplifier rules: ⊦ # [] = 0; (s)% ⊦ m + 1 ≠ 0; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic%x ≠ [] ⊦ a = x.head ∧ y = x.tail ↔ x = a + y; (elim) Used terms: x0, a0, y