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