[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 get-last-nonempty (conclusion) (back to tree)

⊦ n = # x - 1 ∧ 0 < # x → x[n] = x.last

System applied rule normalize

And obtained the following new goals

Rule argument

Additional information

Proof step 2 from proof get-last-nonempty (previous step) (back to tree)

n = # x - 1, x[n] ≠ x.last, 0 < # x ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ # x = 0 ↔ x = []; (s) ⊦ 0 < m ↔ m ≠ 0; (s)

Proof step 3 from proof get-last-nonempty (previous step) (back to tree)

x[# x - 1] ≠ x.last, x ≠ [] ⊦

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] → [# x, m]

Additional information

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

Proof step 4 from proof get-last-nonempty (previous step) (back to tree)

# x = m + 1, # x ≠ 0, x[m] ≠ x.last, x ≠ [] ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ # x = 0 ↔ x = []; (s)

Proof step 5 from proof get-last-nonempty (previous step) (back to tree)

# x = m + 1, x[m] ≠ x.last, x ≠ [] ⊦

User applied rule constructor cut

And obtained the following new goals

Rule argument

var: x

Additional information

Used simplifier rules: list freely generated by [], +;;

Proof step 6 from proof get-last-nonempty (previous step) (back to tree)

# x = m + 1, x = a + x0, x[m] ≠ x.last, x ≠ [] ⊦

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 ' + x ≠ []; (s) ⊦ a + x = a ' + x; (s) 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) ⊦ # a ' = 0 +1; (s) ⊦ #(x + y) = # x + # y; (s)

Proof step 7 from proof get-last-nonempty (previous step) (back to tree)

(a ' + x0)[# x0] ≠ (a ' + x0).last ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:get-last2, seq: ⊦ (a ' + x)[# x] = (a ' + x).last, subst:[x, a] → [x0, a], <all paths>

Additional information

Used terms: x0, a

Proof step 8 from proof get-last-nonempty (previous step) (back to tree)

⊦ (a ' + x)[# x] = (a ' + x).last

Lemma get-last2

Proof Tree for get-last-nonempty (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