| n ≤ # x, x ≠ [] → x = y + a ', ∀ x0, n. # x0 < # x → n ≤ # x0 → butlastn(n, x0) + lastn(n, x0) = x0 ⊦ butlastn(n, x) + lastn(n, x) = x |
n ≤ # x, x ≠ [] → x = y + a ', ∀ x0, n. # x0 < # x → n ≤ # x0 → butlastn(n, x0) + lastn(n, x0) = x0 ⊦ x = [], butlastn(n, x) + lastn(n, x) = x
Used simplifier rules: lastN-zero: ⊦ lastn(0, x) = [];%size-01: ⊦ # [] = 0; from specification list-data%lez-01: ⊦ m ≤ 0 ↔ m = 0; from specification nat%butlastN-base: ⊦ butlastn(0, x) = x; from specification list-last%Nil: ⊦ [] + x = x; from specification list%a: ⊦ (x + y) + z = x + y + z; from specification list Used formulas: x = []