| # x0 = (m + 1) + # z, x0 = firstn(m, x0) + a ' + z, x0 = a0 + y, # z ≤ # x0, ∀ z, a. x0 = firstn(# x0 - 1 + # z, x0) + a ' + z → x0 = firstn(# x0 - # z, x0) + z ⊦ x0 = (a0 ' + firstn(m, y)) + z, x0 = firstn(# x0 - 1 + # z, x0) + a ' + z, x0 = [] |
# y = m + # z, a0 ' + y = firstn(m, a0 ' + y) + a ' + z, # z ≤ 1 + # y, ∀ z0, a1. a0 ' + y = firstn(# y - # z0, a0 ' + y) + a1 ' + z0 → a0 ' + y = firstn(1 + # y - # z0, a0 ' + y) + z0, a0 ∈ firstn(m, a0 ' + y) ∨ a0 = a ∨ a0 ∈ z ⊦ a0 ' + y = firstn(# y - # z, a0 ' + y) + a ' + z, y = firstn(m, y) + z
Used simplifier rules: ⊦ a ∈ b ' ↔ a = b; (s)% ⊦ a ∈ x + y ↔ a ∈ x ∨ a ∈ y; (s)%in-14: ⊦ a ' + x = y → a ∈ y; (forward) from specification list% ⊦ x + y = x + z ↔ y = z; (s)% ⊦ m + n - n + n1 = m - n1; (s)% ⊦ a ' + x ≠ []; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m + n = m + n0 ↔ n = n0; (s)% ⊦ # a ' = 0 +1; (s)% ⊦ #(x + y) = # x + # y; (s)%a: ⊦ (x + y) + z = x + y + z; from specification list% ⊦ a + x = a ' + x; (s)