| # x0 = n0 + # z ∧ # z ≤ # x0, a0 ' + x0 = firstn(n0, a0 ' + x0) + a ' + z, ∀ z, a. x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → firstn(# x0 - # z, x0).butlast = firstn(# x0 - 1 + # z, x0), a0 ∈ firstn(n0, a0 ' + x0) ∨ a0 = a ∨ a0 ∈ z ⊦ firstn(# x0 + 1 - # z, a0 ' + x0).butlast = firstn(n0, a0 ' + x0) |
a0 ' + x0 = firstn(n0, a0 ' + x0) + a ' + z, # x0 = n0 + # z, # z ≤ # x0, ∀ z, a. x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → firstn(# x0 - # z, x0).butlast = firstn(# x0 - 1 + # z, x0), a0 ∈ firstn(n0, a0 ' + x0) ∨ a0 = a ∨ a0 ∈ z ⊦ (a0 ' + firstn(# x0 - # z, x0)).butlast = firstn(n0, a0 ' + x0)
Used simplifier rules: firstN-rec: ⊦ firstn(n + 1, x) = x.first + firstn(n, x.rest);%in-rec: ⊦ a ∈ b ' + x ↔ ¬ ¬(a = b ∨ a ∈ x); from specification list%in-append: ⊦ a ∈ x + y ↔ ¬ ¬(a ∈ x ∨ a ∈ y); from specification list%in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list%c: ⊦ a + x = a ' + x; from specification list%c-08: ⊦ (a ' + x).first = a; from specification list%a: ⊦ (x + y) + z = x + y + z; from specification list%c-07: ⊦ (a ' + x).rest = x; from specification list%c: ⊦ m + n = n + m; from specification nat-basic2%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic2%add-01: ⊦ n ≤ m → m + n0 - n = (m - n) + n0; from specification nat