| # 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 |
# 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) = []
Used simplifier rules: firstN-empty: ⊦ firstn(n, x) = [] ↔ n = 0;%firstN-zero: ⊦ firstn(0, x) = [];%in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list%a: ⊦ (x + y) + z = x + y + z; from specification list% ⊦ n + 0 = n; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ [] + x = x; (s)% ⊦ a ' + x = b ' + y ↔ a = b ∧ x = y; (ws)% ⊦ x + [] = x; (s)% ⊦ a '.last = a; (s) Used formulas: firstn(n1, x0) = []