[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 nodups-butlastn (conclusion) (back to tree)

⊦ ¬ dups(x) ∧ n ≤ # x → (dups(butlastn(n, x)) ↔ false)

System applied rule normalize

And obtained the following new goals

Rule argument

Additional information

Proof step 2 from proof nodups-butlastn (previous step) (back to tree)

¬(dups(butlastn(n, x)) ↔ false), n ≤ # x, ¬ dups(x) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 3 from proof nodups-butlastn (previous step) (back to tree)

dups(butlastn(n, x)), n ≤ # x, ¬ dups(x) ⊦

Heuristic structural induction applied rule structural induction

And obtained the following new goals

Rule argument

term: x

Additional information

Used simplifier rules: butlastN-base: ⊦ butlastn(0, x) = x; list('a) freely generated by [], +;; ⊦ # [] = 0; (s) ⊦ m ≤ 0 ↔ m = 0; (s) ⊦ ¬ dups([]); (s)

Proof step 4 from proof nodups-butlastn (previous step) (back to tree)

dups(butlastn(n, a + x0)), n ≤ #(a + x0), ¬ dups(a + x0), ∀ n. ¬(dups(butlastn(n, x0)) ∧ n ≤ # x0 ∧ ¬ dups(x0)) ⊦

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 ⊦ dups(a ' + x) ↔ a ∈ x ∨ dups(x); (s) ⊦ a + x = a ' + x; (s) ⊦ m +1 = m + 1; (s) ⊦ #(a ' + x) = (# x)+1; (s)

Proof step 5 from proof nodups-butlastn (previous step) (back to tree)

dups(butlastn(n, a ' + x0)), n ≤ # x0 + 1, ¬ dups(x0), ¬ a ∈ x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0 ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:blastN-rec-01, seq: ⊦ n ≤ # x → butlastn(n, a ' + x) = a ' + butlastn(n, x), subst:[x, a, n] → [x0, a, n], <all paths>

Additional information

Used terms: x0, a, n

Proof step 6 from proof nodups-butlastn (previous step) (back to tree)

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

Lemma blastN-rec-01

Proof step 7 from proof nodups-butlastn (previous step) (back to tree)

dups(butlastn(n, a ' + x0)), n ≤ # x0 + 1, ¬ dups(x0), ¬ a ∈ x0, ¬ n ≤ # x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: butlastN-rec: ⊦ butlastn(n + 1, x) = butlastn(n, x.butlast); c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ¬ n < n; (s) ⊦ m < n + 1 ↔ ¬ n < m; (s) ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s) ⊦ m + 1 ≠ 0; (s) lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic eqle-one: ⊦ m = n + 1 ∧ n < n0 → m ≤ n0; (forward) from specification nat ⊦ m < n → (n ≤ m + 1 ↔ n = m + 1); (s) ⊦ m ≤ n ↔ ¬ n < m; (ss)

Proof step 8 from proof nodups-butlastn (previous step) (back to tree)

dups(butlastn(# x0, (a ' + x0).butlast)), ¬ dups(x0), ¬ a ∈ x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0 ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:bapp, seq: ⊦ y ≠ [] → (x + y).butlast = x + y.butlast, subst:[y, x] → [x0, a '], <all paths>

Additional information

Used simplifier rules: butlast-one: ⊦ a '.butlast = []; butlastN-base: ⊦ butlastn(0, x) = x; ⊦ # [] = 0; (s) ⊦ x + [] = x; (s) a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ ¬ dups([]); (s) Used terms: x0, a '

Proof step 9 from proof nodups-butlastn (previous step) (back to tree)

⊦ y ≠ [] → (x + y).butlast = x + y.butlast

Lemma bapp

Proof step 10 from proof nodups-butlastn (previous step) (back to tree)

x0 ≠ [], dups(butlastn(# x0, a ' + x0.butlast)), ¬ dups(x0), ¬ a ∈ x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0 ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 11 from proof nodups-butlastn (previous step) (back to tree)

x0 ≠ [], dups(butlastn(# x0, a ' + x0.butlast)), ¬ dups(x0), ¬ a ∈ x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0 ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:blastN-all-01, seq:n = # x ⊦ butlastn(n, x) = [], subst:[x, n] → [a ' + x0.butlast, # x0], <all paths>

Additional information

Used simplifier rules: lb: ⊦ x ≠ [] → # x.butlast = # x - 1; lb: ⊦ x ≠ [] → # x.butlast = # x - 1; ⊦ #(a ' + x) = (# x)+1; (s) ⊦ m +1 = m + 1; (s) a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ m ≤ n ↔ ¬ n < m; (ss) ⊦ m < 1 ↔ m = 0; (s) ⊦ # x = 0 ↔ x = []; (s) n ≤ m ⊦ (m - n) + n0 = n1 ↔ m + n0 = n + n1; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ ¬ dups([]); (s) Used terms: a ' + x0.butlast, # x0

Proof step 12 from proof nodups-butlastn (previous step) (back to tree)

n = # x ⊦ butlastn(n, x) = []

Lemma blastN-all-01

Proof step 13 from proof nodups-butlastn (previous step) (back to tree)

dups(a ' + butlastn(n, x0)), n ≤ # x0 + 1, n ≤ # x0, ¬ dups(x0), ¬ a ∈ x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0 ⊦

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 ⊦ dups(a ' + x) ↔ a ∈ x ∨ dups(x); (s)

Proof step 14 from proof nodups-butlastn (previous step) (back to tree)

n ≤ # x0, n ≤ # x0 + 1, ¬ dups(x0), ¬ a ∈ x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0, a ∈ butlastn(n, x0) ∨ dups(butlastn(n, x0)) ⊦

Heuristic cut applied rule cut formula

And obtained the following new goals

Rule argument

fma: a ∈ butlastn(n, x0)

Additional information

Used formulas: a ∈ butlastn(n, x0)

Proof step 15 from proof nodups-butlastn (previous step) (back to tree)

a ∈ butlastn(n, x0), n ≤ # x0 + 1, n ≤ # x0, ¬ dups(x0), ¬ a ∈ x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0, a ∈ butlastn(n, x0) ∨ dups(butlastn(n, x0)) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 16 from proof nodups-butlastn (previous step) (back to tree)

a ∈ butlastn(n, x0), n ≤ # x0, n ≤ # x0 + 1, ¬ dups(x0), ¬ a ∈ x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0 ⊦

User applied rule weakening

And obtained the following new goals

Rule argument

poslist: left 3, left 6

Additional information

Proof step 17 from proof nodups-butlastn (previous step) (back to tree)

a ∈ butlastn(n, x0), n ≤ # x0, ¬ dups(x0), ¬ a ∈ x0 ⊦

User applied rule structural induction

And obtained the following new goals

Rule argument

indvar: x0

Additional information

Used simplifier rules: butlastN-base: ⊦ butlastn(0, x) = x; list('a) freely generated by [], +;; ⊦ # [] = 0; (s) ⊦ m ≤ 0 ↔ m = 0; (s) ⊦ ¬ a ∈ []; (s)

Proof step 18 from proof nodups-butlastn (previous step) (back to tree)

a ∈ butlastn(n, a0 + x), n ≤ #(a0 + x), ¬ dups(a0 + x), ¬ a ∈ a0 + x, ∀ a, n. ¬(a ∈ butlastn(n, x) ∧ n ≤ # x ∧ ¬ dups(x) ∧ ¬ a ∈ 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 ∈ a0 ' + x ↔ ¬(a ≠ a0 ∧ ¬ a ∈ x); (ss) ⊦ a + x = a ' + x; (s) ⊦ m +1 = m + 1; (s) ⊦ #(a ' + x) = (# x)+1; (s)

Proof step 19 from proof nodups-butlastn (previous step) (back to tree)

a ≠ a0, a ∈ butlastn(n, a0 ' + x), n ≤ # x + 1, ¬ dups(a0 ' + x), ¬ a ∈ x, ∀ a1, n0. ¬ a1 ∈ butlastn(n0, x) ∨ ¬ n0 ≤ # x ∨ dups(x) ∨ a1 ∈ x ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:blastN-rec-01, seq: ⊦ n ≤ # x → butlastn(n, a ' + x) = a ' + butlastn(n, x), subst:[x, a, n] → [x, a0, n], <all paths>

Additional information

Used terms: x, a0, n

Proof step 20 from proof nodups-butlastn (previous step) (back to tree)

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

Lemma blastN-rec-01

Proof step 21 from proof nodups-butlastn (previous step) (back to tree)

a ≠ a0, a ∈ butlastn(n, a0 ' + x), n ≤ # x + 1, ¬ dups(a0 ' + x), ¬ a ∈ x, ¬ n ≤ # x, ∀ a1, n0. ¬ a1 ∈ butlastn(n0, x) ∨ ¬ n0 ≤ # x ∨ dups(x) ∨ a1 ∈ x ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Used simplifier rules: butlastN-rec: ⊦ butlastn(n + 1, x) = butlastn(n, x.butlast); c: ⊦ m + n = n + m; from specification nat-basic a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic ⊦ ¬ n < n; (s) ⊦ m < n + 1 ↔ ¬ n < m; (s) ⊦ m + n ≤ m + n0 ↔ n ≤ n0; (s) ⊦ m + 1 ≠ 0; (s) lf-01: ⊦ m < n ∧ n = n0 → m < n0; (forward) from specification nat-basic f: ⊦ m < n → n ≠ 0; (forward) from specification nat-basic eqle-one: ⊦ m = n + 1 ∧ n < n0 → m ≤ n0; (forward) from specification nat ⊦ m < n → (n ≤ m + 1 ↔ n = m + 1); (s) ⊦ m ≤ n ↔ ¬ n < m; (ss)

Proof step 22 from proof nodups-butlastn (previous step) (back to tree)

a ≠ a0, a ∈ butlastn(# x, (a0 ' + x).butlast), ¬ dups(a0 ' + x), ¬ a ∈ x, ∀ a1, n0. ¬ a1 ∈ butlastn(n0, x) ∨ ¬ n0 ≤ # x ∨ dups(x) ∨ a1 ∈ x ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:bapp, seq: ⊦ y ≠ [] → (x + y).butlast = x + y.butlast, subst:[y, x] → [x, a0 '], <all paths>

Additional information

Used simplifier rules: butlast-one: ⊦ a '.butlast = []; butlastN-base: ⊦ butlastn(0, x) = x; ⊦ # [] = 0; (s) ⊦ x + [] = x; (s) a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ ¬ a ∈ []; (s) Used terms: x, a0 '

Proof step 23 from proof nodups-butlastn (previous step) (back to tree)

⊦ y ≠ [] → (x + y).butlast = x + y.butlast

Lemma bapp

Proof step 24 from proof nodups-butlastn (previous step) (back to tree)

a ≠ a0, x ≠ [], a ∈ butlastn(# x, a0 ' + x.butlast), ¬ dups(a0 ' + x), ¬ a ∈ x, ∀ a1, n0. ¬ a1 ∈ butlastn(n0, x) ∨ ¬ n0 ≤ # x ∨ dups(x) ∨ a1 ∈ x ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 25 from proof nodups-butlastn (previous step) (back to tree)

a ≠ a0, x ≠ [], a ∈ butlastn(# x, a0 ' + x.butlast), ¬ dups(a0 ' + x), ¬ a ∈ x, ∀ a1, n0. ¬ a1 ∈ butlastn(n0, x) ∨ ¬ n0 ≤ # x ∨ dups(x) ∨ a1 ∈ x ⊦

User applied rule apply rewrite lemma

And obtained the following new goals

Rule argument

spec: <toplevel>, name:blastN-all-01, seq:n = # x ⊦ butlastn(n, x) = [], subst:[x, n] → [a0 ' + x.butlast, # x], <all paths>

Additional information

Used simplifier rules: lb: ⊦ x ≠ [] → # x.butlast = # x - 1; lb: ⊦ x ≠ [] → # x.butlast = # x - 1; ⊦ #(a ' + x) = (# x)+1; (s) ⊦ m +1 = m + 1; (s) a: ⊦ (x + y) + z = x + y + z; from specification list ⊦ m ≤ n ↔ ¬ n < m; (ss) ⊦ m < 1 ↔ m = 0; (s) ⊦ # x = 0 ↔ x = []; (s) n ≤ m ⊦ (m - n) + n0 = n1 ↔ m + n0 = n + n1; (s) a: ⊦ (m + n0) + n1 = m + n0 + n1; from specification nat-basic c: ⊦ m + n = n + m; from specification nat-basic ⊦ ¬ a ∈ []; (s) Used terms: a0 ' + x.butlast, # x

Proof step 26 from proof nodups-butlastn (previous step) (back to tree)

n = # x ⊦ butlastn(n, x) = []

Lemma blastN-all-01

Proof step 27 from proof nodups-butlastn (previous step) (back to tree)

a ≠ a0, a ∈ a0 ' + butlastn(n, x), n ≤ # x + 1, n ≤ # x, ¬ dups(a0 ' + x), ¬ a ∈ x, ∀ a1, n0. ¬ a1 ∈ butlastn(n0, x) ∨ ¬ n0 ≤ # x ∨ dups(x) ∨ a1 ∈ 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 ⊦ dups(a ' + x) ↔ a ∈ x ∨ dups(x); (s) ⊦ a ≠ a0 → (a ∈ a0 ' + x ↔ a ∈ x); (s)

Proof step 28 from proof nodups-butlastn (previous step) (back to tree)

a ≠ a0, a ∈ butlastn(n, x), n ≤ # x, n ≤ # x + 1, ¬ dups(x), ¬ a ∈ x, ¬ a0 ∈ x, ∀ a1, n0. ¬ a1 ∈ butlastn(n0, x) ∨ ¬ n0 ≤ # x ∨ a1 ∈ x ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 8 terms: a, n

Additional information

Used terms: a, n

Proof step 29 from proof nodups-butlastn (previous step) (back to tree)

n ≤ # x0 + 1, n ≤ # x0, ¬ dups(x0), ¬ a ∈ butlastn(n, x0), ¬ a ∈ x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0, a ∈ butlastn(n, x0) ∨ dups(butlastn(n, x0)) ⊦

Heuristic simplifier applied rule simplifier

And obtained the following new goals

Rule argument

Additional information

Proof step 30 from proof nodups-butlastn (previous step) (back to tree)

dups(butlastn(n, x0)), n ≤ # x0, n ≤ # x0 + 1, ¬ dups(x0), ¬ a ∈ butlastn(n, x0), ¬ a ∈ x0, ∀ n0. ¬ dups(butlastn(n0, x0)) ∨ ¬ n0 ≤ # x0 ⊦

Heuristic quantifier closing applied rule all left

And closed the goal!

Rule argument

pos: left 7 terms: n

Additional information

Used terms: n

Proof Tree for nodups-butlastn (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