| m0 + n < # x ⊦ (restn(m0, x).head ' + firstn(n, restn(m0, x).tail)).last = x[m0 + n], x = [] |
m0 + n0 +1 < # x, ∀ m0, x. m0 + n0 < # x → (restn(m0, x).head ' + firstn(n0, restn(m0, x).tail)).last = x[m0 + n0] ∨ x = [] ⊦ (restn(m0, x).head ' + firstn(n0 +1, restn(m0, x).tail)).last = x[m0 + n0 +1], x = []
Used simplifier rules: firstN-zero: ⊦ firstn(0, x) = [];%restn-first-get: ⊦ n < # x → restn(n, x).head = x[n];%nat freely generated by 0, +1;;% ⊦ x + [] = x; (s)%a: ⊦ (x + y) + z = x + y + z; from specification list% ⊦ a '.last = a; (s)% ⊦ 0 + m = m; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic