| n + m ≤ m0, m0 ≤ # x0 + 1, n + m ≤ # x0 + 1, ∀ n, m, m0, n0. n + m ≤ m0 ∧ n0 + m0 ≤ # x0 → firstn(m, restn(n, firstn(m0, restn(n0, x0)))) = firstn(m, restn(n0 + n, x0)) ⊦ firstn(m, restn(n, firstn(m0, a ' + x0))) = firstn(m, restn(n, a ' + x0)) |
n ≠ 0 ⊦ firstn((* n), x) = x.first ' + firstn(n -1, x.rest)
m0 ≠ 0, n + m ≤ m0, m0 ≤ # x0 + 1, n + m ≤ # x0 + 1, ∀ n, m, m0, n0. n + m ≤ m0 ∧ n0 + m0 ≤ # x0 → firstn(m, restn(n, firstn(m0, restn(n0, x0)))) = firstn(m, restn(n0 + n, x0)) ⊦ firstn(m, restn(n, (a ' + x0).first ' + firstn(m0 -1, (a ' + x0).rest))) = firstn(m, restn(n, a ' + x0))
Used simplifier rules: firstN-zero: ⊦ firstn(0, x) = [];%restN-zero: ⊦ restn(0, x) = x;%lez-01: ⊦ m ≤ 0 ↔ m = 0; from specification nat%z-01: ⊦ m + n = 0 ↔ m = 0 ∧ n = 0; from specification nat-basic2%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic2%c: ⊦ m + n = n + m; from specification nat-basic2%lez: ⊦ 0 ≤ m; from specification nat Used terms: a ' + x0, m0