| # x0 = n1 + # z, a0 ' + x0 = firstn(n1, a0 ' + x0) + a ' + z, a0 ∈ firstn(n1, a0 ' + x0), # z ≤ # x0 ⊦ firstn(n1, x0).last = a, n1 = 0, x0 = firstn(# x0 - 1 + # z, x0) + a ' + z |
Used simplifier rules: firstN-empty: ⊦ firstn(n, x) = [] ↔ n = 0;%firstN-rec: ⊦ firstn(n + 1, x) = x.head + firstn(n, x.tail);% ⊦ m + 1 ≤ n ↔ m < n; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ m < n → m ≤ n; (s)%eqs: ⊦ m = n + n0 ∧ m = n + n1 → n0 = n1; (forward) from specification nat-basic%f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic%lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic% ⊦ (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)% ⊦ x + y = x + z ↔ y = z; (s)% ⊦ m < n ↔ ¬ n ≤ m; (ss)% ⊦ m ≤ n → (n ≤ m ↔ m = n); (s)% ⊦ # y = # y0 → (x + y = z + y0 ↔ x = z ∧ y = y0); (ws)% ⊦ a ' = x + b ' ↔ a = b ∧ x = []; (ws)%n ≤ m ⊦ n0 = m - n ↔ m = n0 + n; (elim) Used terms: # x0, 1 + # z, n