[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 elim-add (conclusion) (back to tree)

⊦ x ≠ [] → (head = x.first ∧ tail = x.rest ↔ x = head + tail)

System applied rule normalize

And obtained the following new goals

Rule argument

Additional information

Proof step 2 from proof elim-add (previous step) (back to tree)

¬(head = x.first ∧ tail = x.rest ↔ x = head + tail), x ≠ [] ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: array-listops, name:first, seq: ⊦ ar.first = ar[0], subst:[ar] → [x], <all paths>

Additional information

Used terms: x

Proof step 3 from proof elim-add (previous step) (back to tree)

⊦ ar.first = ar[0]

A spec-lemma

Proof step 4 from proof elim-add (previous step) (back to tree)

¬(head = x[0] ∧ tail = x.rest ↔ x = head + tail), x ≠ [] ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: array-listops, name:rest, seq: ⊦ ar.rest = subarray(ar, 1, # ar - 1), subst:[ar] → [x], <all paths>

Additional information

Used terms: x

Proof step 5 from proof elim-add (previous step) (back to tree)

⊦ ar.rest = subarray(ar, 1, # ar - 1)

A spec-lemma

Proof step 6 from proof elim-add (previous step) (back to tree)

¬(head = x[0] ∧ tail = subarray(x, 1, # x - 1) ↔ x = head + tail), x ≠ [] ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: array-listops, name:nil, seq: ⊦ [] = mkarray(0), subst:, <all paths>

Additional information

Used terms:

Proof step 7 from proof elim-add (previous step) (back to tree)

⊦ [] = mkarray(0)

A spec-lemma

Proof step 8 from proof elim-add (previous step) (back to tree)

¬(head = x[0] ∧ tail = subarray(x, 1, # x - 1) ↔ x = head + tail), x ≠ mkarray(0) ⊦

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, n0]

Additional information

Used simplifier rules: ⊦ # ar = 0 → (mkarray(0) = ar ↔ true); (ss) n ≠ 0 ⊦ m = n - 1 ↔ n = m + 1; (elim) Used terms: # x, m

Proof step 9 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, # x ≠ 0, ¬(head = x[0] ∧ tail = subarray(x, 1, n0) ↔ x = head + tail), x ≠ mkarray(0) ⊦

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 + 1 ≠ 0; (s)

Proof step 10 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, ¬(head = x[0] ∧ tail = subarray(x, 1, n0) ↔ x = head + tail), x ≠ mkarray(0) ⊦

User applied rule case distinction

And obtained the following new goals

Rule argument

pos: left 2

Additional information

Proof step 11 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, head = x[0], tail = subarray(x, 1, n0), x ≠ head + tail, x ≠ mkarray(0) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 12 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, x ≠ x[0] + subarray(x, 1, n0), x ≠ mkarray(0) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: array, name:Extension, seq:⊦ ar1 = ar2 ↔ # ar1 = # ar2 ∧ (∀ n. n < # ar1 → ar1[n] = ar2[n]), subst:[ar1, ar2] → [x, x[0] + subarray(x, 1, n0)], <all paths>

Additional information

Used terms: x, x[0] + subarray(x, 1, n0)

Proof step 13 from proof elim-add (previous step) (back to tree)

⊦ ar1 = ar2 ↔ # ar1 = # ar2 ∧ (∀ n. n < # ar1 → ar1[n] = ar2[n])

A spec-lemma

Proof step 14 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, x ≠ mkarray(0), # x ≠ #(x[0] + subarray(x, 1, n0)) ∨ (∃ n. ¬(n < # x → x[n] = (x[0] + subarray(x, 1, n0))[n])) ⊦

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 + 1 ↔ ¬ n < m; (s)

Proof step 15 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, x ≠ mkarray(0), n0 + 1 ≠ #(x[0] + subarray(x, 1, n0)) ∨ ¬(¬ n0 < n → x[n] = (x[0] + subarray(x, 1, n0))[n]) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:size-add, seq: ⊦ #(a + x) = (# x)+1, subst:[a, x] → [x[0], subarray(x, 1, n0)], <all paths>

Additional information

Used terms: x[0], subarray(x, 1, n0)

Proof step 16 from proof elim-add (previous step) (back to tree)

⊦ #(a + x) = (# x)+1

Lemma size-add

Proof step 17 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, x ≠ mkarray(0), n0 + 1 ≠ (# subarray(x, 1, n0))+1 ∨ ¬(¬ n0 < n → x[n] = (x[0] + subarray(x, 1, n0))[n]) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ m < n ↔ ¬ n ≤ m; (ss) 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 = m + 1; (s) ⊦ # subarray(ar, m, n) = n; (s)

Proof step 18 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, x[n] ≠ (x[0] + subarray(x, 1, n0))[n], x ≠ mkarray(0), n ≤ n0 ⊦

User applied rule constructor cut

And obtained the following new goals

Rule argument

var: n

Additional information

Used simplifier rules: nat freely generated by 0, +1;;

Proof step 19 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, n = 0, x[n] ≠ (x[0] + subarray(x, 1, n0))[n], x ≠ mkarray(0), n ≤ n0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ 0 ≤ m; (s)

Proof step 20 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, x[0] ≠ (x[0] + subarray(x, 1, n0))[0], x ≠ mkarray(0) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:get-zero, seq: ⊦ (a + x)[0] = a, subst:[a, x] → [x[0], subarray(x, 1, n0)], <all paths>

Additional information

Used terms: x[0], subarray(x, 1, n0)

Proof step 21 from proof elim-add (previous step) (back to tree)

⊦ (a + x)[0] = a

Lemma get-zero

Proof step 22 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, n = n1 +1, x[n] ≠ (x[0] + subarray(x, 1, n0))[n], x ≠ mkarray(0), n ≤ n0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ m < n → n ≠ 0; (s) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ m + 1 ≤ n ↔ m < n; (s) ⊦ m +1 = m + 1; (s)

Proof step 23 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, x[n1 + 1] ≠ (x[0] + subarray(x, 1, n0))[n1 + 1], x ≠ mkarray(0), n1 < n0 ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:get-succ, seq: ⊦ (a + x)[n + 1] = x[n], subst:[a, x, n] → [x[0], subarray(x, 1, n0), n1], <all paths>

Additional information

Used simplifier rules: ⊦ n0 < n → subarray(ar, m, n)[n0] = ar[m + n0]; (s) c: ⊦ m + n = n + m; from specification nat-basic Used terms: x[0], subarray(x, 1, n0), n1

Proof step 24 from proof elim-add (previous step) (back to tree)

⊦ (a + x)[n + 1] = x[n]

Lemma get-succ

Proof step 25 from proof elim-add (previous step) (back to tree)

# x = n0 + 1, x = head + tail, x ≠ mkarray(0) ⊦ head = x[0] ∧ tail = subarray(x, 1, n0)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 26 from proof elim-add (previous step) (back to tree)

#(head + tail) = n0 + 1, head + tail ≠ mkarray(0) ⊦ head = (head + tail)[0] ∧ tail = subarray(head + tail, 1, n0)

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:size-add, seq: ⊦ #(a + x) = (# x)+1, subst:[a, x] → [head, tail], <all paths>

Additional information

Used terms: head, tail

Proof step 27 from proof elim-add (previous step) (back to tree)

⊦ #(a + x) = (# x)+1

Lemma size-add

Proof step 28 from proof elim-add (previous step) (back to tree)

(# tail)+1 = n0 + 1, head + tail ≠ mkarray(0) ⊦ head = (head + tail)[0] ∧ tail = subarray(head + tail, 1, n0)

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 = m + 1; (s)

Proof step 29 from proof elim-add (previous step) (back to tree)

head + tail ≠ mkarray(0) ⊦ head = (head + tail)[0] ∧ tail = subarray(head + tail, 1, # tail)

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:get-zero, seq: ⊦ (a + x)[0] = a, subst:[a, x] → [head, tail], <all paths>

Additional information

Used terms: head, tail

Proof step 30 from proof elim-add (previous step) (back to tree)

⊦ (a + x)[0] = a

Lemma get-zero

Proof step 31 from proof elim-add (previous step) (back to tree)

head + tail ≠ mkarray(0) ⊦ head = head ∧ tail = subarray(head + tail, 1, # tail)

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 32 from proof elim-add (previous step) (back to tree)

head + tail ≠ mkarray(0), tail ≠ subarray(head + tail, 1, # tail) ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: array, name:Extension, seq:⊦ ar1 = ar2 ↔ # ar1 = # ar2 ∧ (∀ n. n < # ar1 → ar1[n] = ar2[n]), subst:[ar1, ar2] → [tail, subarray(head + tail, 1, # tail)], <all paths>

Additional information

Used terms: tail, subarray(head + tail, 1, # tail)

Proof step 33 from proof elim-add (previous step) (back to tree)

⊦ ar1 = ar2 ↔ # ar1 = # ar2 ∧ (∀ n. n < # ar1 → ar1[n] = ar2[n])

A spec-lemma

Proof step 34 from proof elim-add (previous step) (back to tree)

head + tail ≠ mkarray(0), # tail ≠ # subarray(head + tail, 1, # tail) ∨ (∃ n. ¬(n < # tail → tail[n] = subarray(head + tail, 1, # tail)[n])) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: ⊦ m < n → n ≠ 0; (s) f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic ⊦ n0 < n → subarray(ar, m, n)[n0] = ar[m + n0]; (s) ⊦ # subarray(ar, m, n) = n; (s)

Proof step 35 from proof elim-add (previous step) (back to tree)

head + tail ≠ mkarray(0), tail[n] ≠ (head + tail)[1 + n], n < # tail ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:get-succ, seq: ⊦ (a + x)[n + 1] = x[n], subst:[a, x, n] → [head, tail, n], <all paths>

Additional information

Used simplifier rules: c: ⊦ m + n = n + m; from specification nat-basic Used terms: head, tail, n

Proof step 36 from proof elim-add (previous step) (back to tree)

⊦ (a + x)[n + 1] = x[n]

Lemma get-succ

Proof Tree for elim-add (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