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