(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
app(x, y) → helpa(0, plus(length(x), length(y)), x, y)
plus(x, 0) → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0) → true
ge(0, s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))
Rewrite Strategy: INNERMOST
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(x, y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(y, ys), zs) → cons(y, helpa(s(c), l, ys, zs))
S is empty.
Rewrite Strategy: INNERMOST
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
cons/0
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(ys), zs) → cons(helpa(s(c), l, ys, zs))
S is empty.
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
app(x, y) → helpa(0', plus(length(x), length(y)), x, y)
plus(x, 0') → x
plus(x, s(y)) → s(plus(x, y))
length(nil) → 0'
length(cons(y)) → s(length(y))
helpa(c, l, ys, zs) → if(ge(c, l), c, l, ys, zs)
ge(x, 0') → true
ge(0', s(x)) → false
ge(s(x), s(y)) → ge(x, y)
if(true, c, l, ys, zs) → nil
if(false, c, l, ys, zs) → helpb(c, l, greater(ys, zs), smaller(ys, zs))
greater(ys, zs) → helpc(ge(length(ys), length(zs)), ys, zs)
smaller(ys, zs) → helpc(ge(length(ys), length(zs)), zs, ys)
helpc(true, ys, zs) → ys
helpc(false, ys, zs) → zs
helpb(c, l, cons(ys), zs) → cons(helpa(s(c), l, ys, zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
helpa,
plus,
length,
ge,
helpbThey will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb
(8) Obligation:
Innermost TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
ys),
zs) →
cons(
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
plus, helpa, length, ge, helpb
They will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
plus(
gen_0':s5_0(
a),
gen_0':s5_0(
n7_0)) →
gen_0':s5_0(
+(
n7_0,
a)), rt ∈ Ω(1 + n7
0)
Induction Base:
plus(gen_0':s5_0(a), gen_0':s5_0(0)) →RΩ(1)
gen_0':s5_0(a)
Induction Step:
plus(gen_0':s5_0(a), gen_0':s5_0(+(n7_0, 1))) →RΩ(1)
s(plus(gen_0':s5_0(a), gen_0':s5_0(n7_0))) →IH
s(gen_0':s5_0(+(a, c8_0)))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
ys),
zs) →
cons(
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
length, helpa, ge, helpb
They will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
length(
gen_nil:cons4_0(
n864_0)) →
gen_0':s5_0(
n864_0), rt ∈ Ω(1 + n864
0)
Induction Base:
length(gen_nil:cons4_0(0)) →RΩ(1)
0'
Induction Step:
length(gen_nil:cons4_0(+(n864_0, 1))) →RΩ(1)
s(length(gen_nil:cons4_0(n864_0))) →IH
s(gen_0':s5_0(c865_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
Innermost TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
ys),
zs) →
cons(
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
length(gen_nil:cons4_0(n864_0)) → gen_0':s5_0(n864_0), rt ∈ Ω(1 + n8640)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
ge, helpa, helpb
They will be analysed ascendingly in the following order:
ge < helpa
helpa = helpb
(15) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
ge(
gen_0':s5_0(
n1151_0),
gen_0':s5_0(
n1151_0)) →
true, rt ∈ Ω(1 + n1151
0)
Induction Base:
ge(gen_0':s5_0(0), gen_0':s5_0(0)) →RΩ(1)
true
Induction Step:
ge(gen_0':s5_0(+(n1151_0, 1)), gen_0':s5_0(+(n1151_0, 1))) →RΩ(1)
ge(gen_0':s5_0(n1151_0), gen_0':s5_0(n1151_0)) →IH
true
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(16) Complex Obligation (BEST)
(17) Obligation:
Innermost TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
ys),
zs) →
cons(
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
length(gen_nil:cons4_0(n864_0)) → gen_0':s5_0(n864_0), rt ∈ Ω(1 + n8640)
ge(gen_0':s5_0(n1151_0), gen_0':s5_0(n1151_0)) → true, rt ∈ Ω(1 + n11510)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
helpb, helpa
They will be analysed ascendingly in the following order:
helpa = helpb
(18) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol helpb.
(19) Obligation:
Innermost TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
ys),
zs) →
cons(
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
length(gen_nil:cons4_0(n864_0)) → gen_0':s5_0(n864_0), rt ∈ Ω(1 + n8640)
ge(gen_0':s5_0(n1151_0), gen_0':s5_0(n1151_0)) → true, rt ∈ Ω(1 + n11510)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
The following defined symbols remain to be analysed:
helpa
They will be analysed ascendingly in the following order:
helpa = helpb
(20) NoRewriteLemmaProof (LOWER BOUND(ID) transformation)
Could not prove a rewrite lemma for the defined symbol helpa.
(21) Obligation:
Innermost TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
ys),
zs) →
cons(
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
length(gen_nil:cons4_0(n864_0)) → gen_0':s5_0(n864_0), rt ∈ Ω(1 + n8640)
ge(gen_0':s5_0(n1151_0), gen_0':s5_0(n1151_0)) → true, rt ∈ Ω(1 + n11510)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(22) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
(23) BOUNDS(n^1, INF)
(24) Obligation:
Innermost TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
ys),
zs) →
cons(
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
length(gen_nil:cons4_0(n864_0)) → gen_0':s5_0(n864_0), rt ∈ Ω(1 + n8640)
ge(gen_0':s5_0(n1151_0), gen_0':s5_0(n1151_0)) → true, rt ∈ Ω(1 + n11510)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(25) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
(26) BOUNDS(n^1, INF)
(27) Obligation:
Innermost TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
ys),
zs) →
cons(
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
length(gen_nil:cons4_0(n864_0)) → gen_0':s5_0(n864_0), rt ∈ Ω(1 + n8640)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(28) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
(29) BOUNDS(n^1, INF)
(30) Obligation:
Innermost TRS:
Rules:
app(
x,
y) →
helpa(
0',
plus(
length(
x),
length(
y)),
x,
y)
plus(
x,
0') →
xplus(
x,
s(
y)) →
s(
plus(
x,
y))
length(
nil) →
0'length(
cons(
y)) →
s(
length(
y))
helpa(
c,
l,
ys,
zs) →
if(
ge(
c,
l),
c,
l,
ys,
zs)
ge(
x,
0') →
truege(
0',
s(
x)) →
falsege(
s(
x),
s(
y)) →
ge(
x,
y)
if(
true,
c,
l,
ys,
zs) →
nilif(
false,
c,
l,
ys,
zs) →
helpb(
c,
l,
greater(
ys,
zs),
smaller(
ys,
zs))
greater(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
ys,
zs)
smaller(
ys,
zs) →
helpc(
ge(
length(
ys),
length(
zs)),
zs,
ys)
helpc(
true,
ys,
zs) →
yshelpc(
false,
ys,
zs) →
zshelpb(
c,
l,
cons(
ys),
zs) →
cons(
helpa(
s(
c),
l,
ys,
zs))
Types:
app :: nil:cons → nil:cons → nil:cons
helpa :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
0' :: 0':s
plus :: 0':s → 0':s → 0':s
length :: nil:cons → 0':s
s :: 0':s → 0':s
nil :: nil:cons
cons :: nil:cons → nil:cons
if :: true:false → 0':s → 0':s → nil:cons → nil:cons → nil:cons
ge :: 0':s → 0':s → true:false
true :: true:false
false :: true:false
helpb :: 0':s → 0':s → nil:cons → nil:cons → nil:cons
greater :: nil:cons → nil:cons → nil:cons
smaller :: nil:cons → nil:cons → nil:cons
helpc :: true:false → nil:cons → nil:cons → nil:cons
hole_nil:cons1_0 :: nil:cons
hole_0':s2_0 :: 0':s
hole_true:false3_0 :: true:false
gen_nil:cons4_0 :: Nat → nil:cons
gen_0':s5_0 :: Nat → 0':s
Lemmas:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
Generator Equations:
gen_nil:cons4_0(0) ⇔ nil
gen_nil:cons4_0(+(x, 1)) ⇔ cons(gen_nil:cons4_0(x))
gen_0':s5_0(0) ⇔ 0'
gen_0':s5_0(+(x, 1)) ⇔ s(gen_0':s5_0(x))
No more defined symbols left to analyse.
(31) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
plus(gen_0':s5_0(a), gen_0':s5_0(n7_0)) → gen_0':s5_0(+(n7_0, a)), rt ∈ Ω(1 + n70)
(32) BOUNDS(n^1, INF)