| n < m0 +1, m0 +1 ≤ 1 + # x0, n ≤ # x0, ∀ n0, m0. n0 < m0 ∧ n0 < # x0 ∧ m0 ≤ # x0 → firstn(m0, x0)[n0] = x0[n0], ∀ n, x0, a. n < m0 ∧ n ≤ # x0 ∧ m0 ≤ 1 + # x0 ∧ (∀ n0, m0. n0 < m0 ∧ n0 < # x0 ∧ m0 ≤ # x0 → firstn(m0, x0)[n0] = x0[n0]) → firstn(m0, a ' + x0)[n] = (a ' + x0)[n] ∨ x0 = [] ⊦ firstn(m0 +1, a ' + x0)[n] = (a ' + x0)[n], x0 = [] |
⊦ x ≠ [] ∧ n ≠ 0 → x[n] = x.tail[n - 1]
n < m0 +1, n ≤ # x0, m0 +1 ≤ 1 + # x0, ∀ n, x0, a. n < m0 ∧ n ≤ # x0 ∧ m0 ≤ 1 + # x0 ∧ (∀ n0, m0. n0 < m0 ∧ n0 < # x0 ∧ m0 ≤ # x0 → firstn(m0, x0)[n0] = x0[n0]) → firstn(m0, a ' + x0)[n] = (a ' + x0)[n] ∨ x0 = [], ∀ n0, m0. n0 < m0 ∧ n0 < # x0 ∧ m0 ≤ # x0 → firstn(m0, x0)[n0] = x0[n0] ⊦ firstn(m0 +1, a ' + x0).tail[n - 1] = (a ' + x0)[n], firstn(m0 +1, a ' + x0) = [], n = 0, x0 = []
Used simplifier rules: firstN-rec: ⊦ firstn(n + 1, x) = x.head + firstn(n, x.tail);%get-zero-01: ⊦ (a ' + x)[0] = a;% ⊦ m +1 = m + 1; (s)% ⊦ (a ' + x).head = a; (s)%a: ⊦ (x + y) + z = x + y + z; from specification list% ⊦ (a ' + x).tail = x; (s)% ⊦ a + x = a ' + x; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s)% ⊦ m < n + 1 ↔ ¬ n < m; (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ x + y = [] ↔ x = [] ∧ y = []; (as)% ⊦ a ' ≠ []; (s) Used terms: n, firstn(m0 +1, a ' + x0)