| # y = n0, x0 = y + z, n0 ≤ # x0, n1 < # x0 ∧ n0 = n1 ∨ n0 = # x0 ∧ # x0 ≤ n1 ∧ x1 = [] ∨ n0 = # x0 ∧ n1 = # x0 ∧ x1 ≠ [] ⊦ y = (n1 ≤ # x0 + # x1 ⊃ firstn(n1, x0 + x1);x0 + x1) |
z ≠ [] ∧ # y = n1 ∨ z = [] ∧ # y ≤ n1 ∧ x1 = [] ∨ z = [] ∧ n1 = # y ∧ x1 ≠ [] ⊦ y = (n1 ≤ (# y + # z) + # x1 ⊃ firstn(n1, (y + z) + x1);(y + z) + x1)
Used simplifier rules: ⊦ x + [] = x; (s)% ⊦ m = m + n ↔ n = 0; (s)% ⊦ # x = 0 ↔ x = []; (s)% ⊦ m < m + n ↔ n ≠ 0; (s)%c: ⊦ m + n = n + m; from specification nat-basic% ⊦ m ≤ m + n; (s)%a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic%a: ⊦ (x + y) + z = x + y + z; from specification list% ⊦ #(x + y) = # x + # y; (s)