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