| x = a + y, (m0 + 1) + n < # x, ∀ n0, x0. m0 + n0 < # x0 → restn(m0, x0).head ' + firstn(n0, restn(m0, x0).tail) = firstn(n0, restn(m0, x0)) + x0[m0 + n0] ' ⊦ restn(m0, y).head ' + firstn(n, restn(m0, y).tail) = firstn(n, restn(m0, y)) + y[m0 + n] ', x = [] |
m0 + n < # y, ∀ n0, x0. m0 + n0 < # x0 → restn(m0, x0).head ' + firstn(n0, restn(m0, x0).tail) = firstn(n0, restn(m0, x0)) + x0[m0 + n0] ' ⊦ restn(m0, y).head ' + firstn(n, restn(m0, y).tail) = firstn(n, restn(m0, y)) + y[m0 + n] ', y = []
Used simplifier rules: ⊦ # x = 0 ↔ x = []; (s)%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%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 ≠ []; (s)% ⊦ a + x = a ' + x; (s)