| x0 = a0 + y ∧ x0 ≠ [], # x0 = (m + 1) + # z, x0 = firstn(m, x0) + a ' + z, # z ≤ # x0, ∀ z, a. x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → x0 = firstn(# x0 - # z, x0) + z ⊦ x0 = firstn(# x0 - 1 + # z, x0) + a ' + z, x0 = (a0 ' + firstn(m, y)) + z |
a0 ' + y = firstn(m, a0 ' + y) + a ' + z, # y = m + # z, # z ≤ # y + 1, ∀ z0, a1. a0 ' + y = firstn(# y - # z0, a0 ' + y) + a1 ' + z0 → a0 ' + y = firstn(# y + 1 - # z0, a0 ' + y) + z0, a0 ∈ firstn(m, a0 ' + y) ∨ a0 = a ∨ a0 ∈ z ⊦ y = firstn(m, y) + z, a0 ' + y = firstn(# y - # z, a0 ' + y) + a ' + z
Used simplifier rules: 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%e-01: ⊦ a ' + x ≠ []; from specification list%app-08: ⊦ a ' + x = a ' + y ↔ x = y; from specification list%cancel-01: ⊦ m + n - n + n1 = m - n1; from specification nat%c: ⊦ m + n = n + m; from specification nat-basic2%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic2%eq-01: ⊦ m + n = m + n0 ↔ n = n0; from specification nat-basic2%a: ⊦ (x + y) + z = x + y + z; from specification list%succ: ⊦ m +1 = m + 1; from specification nat-basic2%len-05: ⊦ #(a ' + x) = (# x)+1; from specification list%c: ⊦ a + x = a ' + x; from specification list