| n = m2 + 1, m1 ≤ # x0, n + m ≤ m1 + 1, n + m ≤ 1 + # x0, ∀ n0, m0, n, m. n0 + m0 ≤ # x0 ∧ n + m ≤ m0 → firstn(m, restn(n, firstn(m0, restn(n0, x0)))) = firstn(m, restn(n0 + n, x0)) ⊦ firstn(m, restn(m2, firstn(m1, x0))) = firstn(m, restn(n, a ' + x0)), n = 0 |
m1 ≤ # x0, m2 + m ≤ m1, m2 + m ≤ # x0, ∀ n0, m0, n, m. n0 + m0 ≤ # x0 ∧ n + m ≤ m0 → firstn(m, restn(n, firstn(m0, restn(n0, x0)))) = firstn(m, restn(n0 + n, x0)) ⊦ firstn(m, restn(m2, firstn(m1, x0))) = firstn(m, restn(m2, x0))
Used simplifier rules: restN-rec: ⊦ restn(n + 1, x) = restn(n, x.tail);%let: ⊦ n ≤ n0 ∧ n0 ≤ n1 → n ≤ n1; (forward) from specification nat% ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s)%a: ⊦ (x + y) + z = x + y + z; from specification list% ⊦ (a ' + x).tail = x; (s)%c: ⊦ m + n = n + m; from specification nat-basic%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic% ⊦ m + 1 ≠ 0; (s)