[Imprint][Data Privacy Statement][E-Mail]



View long theorem info. View the proof. Back to main index. View the specification. View theorem base summary, View theorem base listing, the used properties by spec, the dependency list, the symbol table,

Proof step 1 from proof lastN-blastN (conclusion) (back to tree)

⊦ n ≤ # x → butlastn(n, x) + lastn(n, x) = x

System applied rule normalize

And obtained the following new goals

Rule argument

Additional information

Proof step 2 from proof lastN-blastN (previous step) (back to tree)

butlastn(n, x) + lastn(n, x) ≠ x, n ≤ # x ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 3 from proof lastN-blastN (previous step) (back to tree)

butlastn(n, x) + lastn(n, x) ≠ x, n ≤ # x ⊦

User applied rule induction

And obtained the following new goals

Rule argument

indvar: # x wfpred: <

Additional information

Used simplifier rules: <; (wellfounded) Used terms: # x

Proof step 4 from proof lastN-blastN (previous step) (back to tree)

butlastn(n, x) + lastn(n, x) ≠ x, n ≤ # x, ∀ x0, n. # x0 < # x → butlastn(n, x0) + lastn(n, x0) ≠ x0 ∧ n ≤ # x0 → false ⊦

User applied rule apply lemma

And obtained the following new goals

Rule argument

spec: list, name:lastdiv, seq: ⊦ x ≠ [] → (∃ y, a. x = y + a '), subst:[x] → [x]

Additional information

Used terms: x

Proof step 5 from proof lastN-blastN (previous step) (back to tree)

⊦ x ≠ [] → (∃ y, a. x = y + a ')

A spec-lemma

Proof step 6 from proof lastN-blastN (previous step) (back to tree)

butlastn(n, x) + lastn(n, x) ≠ x, n ≤ # x, x ≠ [] → (∃ y, a. x = y + a '), ∀ x0, n. # x0 < # x → butlastn(n, x0) + lastn(n, x0) ≠ x0 ∧ n ≤ # x0 → false ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 7 from proof lastN-blastN (previous step) (back to tree)

butlastn(n, x) + lastn(n, x) ≠ x, n ≤ # x, x ≠ [] → x = y + a ', ∀ x0, n. # x0 < # x → butlastn(n, x0) + lastn(n, x0) ≠ x0 ∧ n ≤ # x0 → false ⊦

User applied rule cut formula

And obtained the following new goals

Rule argument

fma: x = []

Additional information

Used simplifier rules: lastN-zero: ⊦ lastn(0, x) = []; ⊦ # [] = 0; (s) ⊦ m ≤ 0 ↔ m = 0; (s) ⊦ butlastn(0, x) = x; (s) ⊦ [] + x = x; (s) a: ⊦ (x + y) + z = x + y + z; from specification list Used formulas: x = []

Proof step 8 from proof lastN-blastN (previous step) (back to tree)

butlastn(n, x) + lastn(n, x) ≠ x, x ≠ [], n ≤ # x, x ≠ [] → x = y + a ', ∀ x0, n. # x0 < # x → butlastn(n, x0) + lastn(n, x0) ≠ x0 ∧ n ≤ # x0 → false ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ # a ' = 0 +1; (s) ⊦ #(x + y) = # x + # y; (s) ⊦ a ∈ a0 ' ↔ a = a0; (s) ⊦ a ∈ x + y ↔ a ∈ x ∨ a ∈ y; (s) ⊦ x + a ' ≠ []; (s) in-15: ⊦ x + a ' = y → a ∈ y; (forward) from specification list

Proof step 9 from proof lastN-blastN (previous step) (back to tree)

butlastn(n, y + a ') + lastn(n, y + a ') ≠ y + a ', n ≤ # y + 1, ∀ x0, n. # x0 < #(y + a ') → butlastn(n, x0) + lastn(n, x0) ≠ x0 ∧ n ≤ # x0 → false ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:num-lastN, seq:0 < n ⊦ lastn((* n), x + a ') = lastn(n -1, x) + a ', subst:[a, x, n] → [a, y, n], <all paths>

Additional information

Used simplifier rules: lastN-zero: ⊦ lastn(0, x) = []; ⊦ 0 < m ↔ m ≠ 0; (s) ⊦ butlastn(0, x) = x; (s) ⊦ x + [] = x; (s) ⊦ x + y = x + z ↔ y = z; (s) a: ⊦ (x + y) + z = x + y + z; from specification list Used terms: a, y, n

Proof step 10 from proof lastN-blastN (previous step) (back to tree)

0 < n ⊦ lastn((* n), x + a ') = lastn(n -1, x) + a '

Lemma num-lastN

Proof step 11 from proof lastN-blastN (previous step) (back to tree)

butlastn(n, y + a ') + lastn(n -1, y) + a ' ≠ y + a ', 0 < n, n ≤ # y + 1, ∀ x0, n. # x0 < #(y + a ') → butlastn(n, x0) + lastn(n, x0) ≠ x0 ∧ n ≤ # x0 → false ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ 0 < m ↔ m ≠ 0; (s) a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ x + y = z + y ↔ x = z; (s) ⊦ n -1 = n - 1; (s)

Proof step 12 from proof lastN-blastN (previous step) (back to tree)

butlastn(n, y + a ') + lastn(n - 1, y) ≠ y, n ≠ 0, n ≤ # y + 1, ∀ x0, n. # x0 < #(y + a ') → butlastn(n, x0) + lastn(n, x0) ≠ x0 ∧ n ≤ # x0 → false ⊦

Heuristic elimination applied rule apply elim lemma

And obtained the following new goals

Rule argument

spec: nat, name:elim-pred-c, seq:n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1, subst:[n, m] → [n, m]

Additional information

Used simplifier rules: n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: n, m

Proof step 13 from proof lastN-blastN (previous step) (back to tree)

n = m + 1, butlastn(n, y + a ') + lastn(m, y) ≠ y, n ≠ 0, n ≤ # y + 1, ∀ x0, n. # x0 < #(y + a ') → butlastn(n, x0) + lastn(n, x0) ≠ x0 ∧ n ≤ # x0 → false ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s) ⊦ m + 1 ≠ 0; (s) a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ (x + a ').butlast = x; (s) ⊦ butlastn(n + 1, x) = butlastn(n, x.butlast); (s)

Proof step 14 from proof lastN-blastN (previous step) (back to tree)

butlastn(m, y) + lastn(m, y) ≠ y, m ≤ # y, ∀ x0, n. # x0 < #(y + a ') → butlastn(n, x0) + lastn(n, x0) ≠ x0 ∧ n ≤ # x0 → false ⊦

User applied rule apply induction

And closed the goal!

Rule argument

subst: [x0, n] → [y, m]

Additional information

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, m

Proof Tree for lastN-blastN (View conclusion)

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.

the proof tree