| n0 = m + 1, # x0 = n0 + # z, x0 = firstn(m, x0) + a ' + z, # z ≤ # x0, x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → firstn(n0, x0).butlast = firstn(# x0 - 1 + # z, x0) ⊦ n0 = 0, (a0 ' + firstn(n0, x0)).butlast = a0 ' + firstn(m, x0) |
# x0 = (m + 1) + # z, x0 = firstn(m, x0) + a ' + z, # z ≤ # x0, x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → (x0.first ' + firstn(m, x0.rest)).butlast = firstn(# x0 - 1 + # z, x0) ⊦ (x0.first ' + firstn(m, x0.rest)).butlast = firstn(m, x0)
Used simplifier rules: firstN-rec: ⊦ firstn(n + 1, x) = x.first + firstn(n, x.rest);%app-08: ⊦ a ' + x = a ' + y ↔ x = y; from specification list%btwo: ⊦ (a ' + b ' + x).butlast = a ' + (b ' + x).butlast; from specification list-last%a: ⊦ (x + y) + z = x + y + z; from specification list%c: ⊦ a + x = a ' + x; from specification list%c: ⊦ m + n = n + m; from specification nat-basic2%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic2%oz: ⊦ m + 1 ≠ 0; from specification nat-basic2