| ⊦ n ≤ # x → # butlastn(n, x) = # x - n |
# butlastn(n, x) ≠ # x - n, n ≤ # x ⊦
| # butlastn(n, x) ≠ # x - n, n ≤ # x ⊦ |
# butlastn(n, x) ≠ # x - n, n ≤ # x ⊦
| # butlastn(n, x) ≠ # x - n, n ≤ # x ⊦ |
# x = n0 + n, # butlastn(n, x) ≠ n0, n ≤ # x ⊦
Used simplifier rules: n ≤ m ⊦ n0 = m - n ↔ m = n0 + n; (elim) Used terms: # x, n, n0
| # x = n0 + n, # butlastn(n, x) ≠ n0, n ≤ # x ⊦ |
# x = n0 + n, # butlastn(n, x) ≠ n0 ⊦
Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m ≤ m + n; (s)
| # x = n0 + n, # butlastn(n, x) ≠ n0 ⊦ |
# x = n0 + n, # butlastn(n, x) ≠ n0, ∀ x0, n0, n. # x0 < # x → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦
Used simplifier rules: <; (wellfounded) Used terms: # x
| # x = n0 + n, # butlastn(n, x) ≠ n0, ∀ x0, n0, n. # x0 < # x → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦ |
# x = n0 + n, # butlastn(n, x) ≠ n0, x ≠ [], ∀ x0, n0, n. # x0 < # x → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦
Used simplifier rules: butlastN-base: ⊦ butlastn(0, x) = x; ⊦ m + n = 0 ↔ m = 0 ∧ n = 0; (ws) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ # [] = 0; (s) Used formulas: x = []
| # x = n0 + n, # butlastn(n, x) ≠ n0, x ≠ [], ∀ x0, n0, n. # x0 < # x → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦ |
⊦ x ≠ [] → (∃ y, a. x = y + a ')
# x = n0 + n, # butlastn(n, x) ≠ n0, x ≠ [], x ≠ [] → (∃ y, a. x = y + a '), ∀ x0, n0, n. # x0 < # x → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦
Used terms: x
| ⊦ x ≠ [] → (∃ y, a. x = y + a ') |
| # x = n0 + n, # butlastn(n, x) ≠ n0, x ≠ [], x ≠ [] → (∃ y, a. x = y + a '), ∀ x0, n0, n. # x0 < # x → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦ |
# y + 1 = n0 + n, # butlastn(n, y + a ') ≠ n0, ∀ x0, n0, n. # x0 < #(y + a ') → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦
Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ a ∈ a0 ' ↔ a = a0; (s) ⊦ a ∈ x + y ↔ a ∈ x ∨ a ∈ y; (s) ⊦ x + a ' ≠ []; (s) ⊦ # a ' = 0 +1; (s) ⊦ #(x + y) = # x + # y; (s) in-15: ⊦ x + a ' = y → a ∈ y; (forward) from specification list
| # y + 1 = n0 + n, # butlastn(n, y + a ') ≠ n0, ∀ x0, n0, n. # x0 < #(y + a ') → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦ |
⊦ n ≠ 0 → butlastn(n, x + a ') = butlastn(n -1, x)
# y + 1 = n0 + n, # butlastn(n -1, y) ≠ n0, n ≠ 0, ∀ x0, n0, n. # x0 < #(y + a ') → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦
Used simplifier rules: butlastN-base: ⊦ butlastn(0, x) = x; ⊦ 0 + m = m; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ #(x + y) = # x + # y; (s) ⊦ # a ' = 0 +1; (s) a: ⊦ (x + y) + z = x + y + z; from specification list Used terms: a, y, n
| ⊦ n ≠ 0 → butlastn(n, x + a ') = butlastn(n -1, x) |
| # y + 1 = n0 + n, # butlastn(n -1, y) ≠ n0, n ≠ 0, ∀ x0, n0, n. # x0 < #(y + a ') → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦ |
# y + 1 = n0 + n, # butlastn(n - 1, y) ≠ n0, n ≠ 0, ∀ x0, n0, n. # x0 < #(y + a ') → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦
Used simplifier rules: ⊦ n -1 = n - 1; (s)
| # y + 1 = n0 + n, # butlastn(n - 1, y) ≠ n0, n ≠ 0, ∀ x0, n0, n. # x0 < #(y + a ') → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦ |
# y + 1 = n0 + n, n = n1 + 1, # butlastn(n1, y) ≠ n0, n ≠ 0, ∀ x0, n0, n. # x0 < #(y + a ') → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦
Used simplifier rules: n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: n, m
| # y + 1 = n0 + n, n = n1 + 1, # butlastn(n1, y) ≠ n0, n ≠ 0, ∀ x0, n0, n. # x0 < #(y + a ') → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦ |
# y = n0 + n1, # butlastn(n1, y) ≠ n0, ∀ x0, n0, n. # x0 < #(y + a ') → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦
Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m + 1 ≠ 0; (s) ⊦ m + n = m + n0 ↔ n = n0; (s)
| # y = n0 + n1, # butlastn(n1, y) ≠ n0, ∀ x0, n0, n. # x0 < #(y + a ') → # x0 = n0 + n ∧ # butlastn(n, x0) ≠ n0 → false ⊦ |
Used simplifier rules: ⊦ #(x + y) = # x + # y; (s) ⊦ # a ' = 0 +1; (s) a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ m < n + 1 ↔ ¬ n < m; (s) ⊦ ¬ n < n; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic Used terms: y, n0, n1
The following image shows the proof tree of sequent calculus. The proved goal is at the bottom. You can click on the nodes to view additional rules. See here for details on colors in a proof tree.