| # x0 = n1 + # z, a0 ' + x0 = firstn(n1, a0 ' + x0) + a ' + z, # z ≤ # x0, ∀ z, a. x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → firstn(# x0 - # z, x0).last = a, a0 ∈ firstn(n1, a0 ' + x0) ∨ a0 = a ∨ a0 ∈ z ⊦ (a0 ' + firstn(n1, x0)).last = a, firstn(n1, x0) = [] |
# x0 = n1 + # z, a0 ' + x0 = firstn(n1, a0 ' + x0) + a ' + z, a0 ∈ firstn(n1, a0 ' + x0), # z ≤ # x0, ∀ z, a. x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → firstn(# x0 - # z, x0).last = a ⊦ (a0 ' + firstn(n1, x0)).last = a, n1 = 0
Used simplifier rules: firstN-empty: ⊦ firstn(n, x) = [] ↔ n = 0;%a: ⊦ (x + y) + z = x + y + z; from specification list% ⊦ ¬ a ∈ y → (y + c ' + z = a ' + z0 ↔ y = [] ∧ c = a ∧ z = z0); (ws)