| # x0 = (m + 1) + # z, x0 = firstn(m, x0) + a ' + z, # z ≤ # x0, ∀ z, a. x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → x0 = firstn(# x0 - # z, x0) + z ⊦ x0 = firstn(# x0 - 1 + # z, x0) + a ' + z, x0 = (x0.first ' + firstn(m, x0.rest)) + z |
x0 = a0 + y ∧ x0 ≠ [], # x0 = (m + 1) + # z, x0 = firstn(m, x0) + a ' + z, # z ≤ # x0, ∀ z, a. x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → x0 = firstn(# x0 - # z, x0) + z ⊦ x0 = firstn(# x0 - 1 + # z, x0) + a ' + z, x0 = (a0 ' + firstn(m, y)) + z
Used simplifier rules: size-01: ⊦ # [] = 0; from specification list-data%z-01: ⊦ m + n = 0 ↔ m = 0 ∧ n = 0; from specification nat-basic2%oz: ⊦ m + 1 ≠ 0; from specification nat-basic2%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic2%c: ⊦ m + n = n + m; from specification nat-basic2%x ≠ [] ⊦ a = x.first ∧ y = x.rest ↔ x = a + y; (elim) Used terms: x0, a0, y