| # 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 = [] |
# y = m + # z, a0 ' + y = firstn(m, a0 ' + y) + a ' + z, # z ≤ 1 + # y, a0 ' + y = firstn(# y - # z, a0 ' + y) + a ' + z → (a0 ' + firstn(m, y)).butlast = firstn(# y - # z, a0 ' + y), a0 ∈ firstn(m, a0 ' + y) ∨ a0 = a ∨ a0 ∈ z ⊦ (a0 ' + firstn(m, y)).butlast = firstn(m, a0 ' + y)
Used simplifier rules: ⊦ a ∈ b ' ↔ a = b; (s)% ⊦ a ∈ x + y ↔ a ∈ x ∨ a ∈ y; (s)%in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list% ⊦ m + n - n + n1 = m - n1; (s)% ⊦ a ' + x ≠ []; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m + n = m + n0 ↔ n = n0; (s)% ⊦ # a ' = 0 +1; (s)% ⊦ #(x + y) = # x + # y; (s)%a: ⊦ (x + y) + z = x + y + z; from specification list% ⊦ a + x = a ' + x; (s)