Runtime Complexity TRS:
The TRS R consists of the following rules:

ge(x, 0) → true
ge(0, s(y)) → false
ge(s(x), s(y)) → ge(x, y)
rev(x) → if(x, eq(0, length(x)), nil, 0, length(x))
if(x, true, z, c, l) → z
if(x, false, z, c, l) → help(s(c), l, x, z)
help(c, l, cons(x, y), z) → if(append(y, cons(x, nil)), ge(c, l), cons(x, z), c, l)
append(nil, y) → y
append(cons(x, y), z) → cons(x, append(y, z))
length(nil) → 0
length(cons(x, y)) → s(length(y))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


Runtime Complexity TRS:
The TRS R consists of the following rules:


ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
rev'(x) → if'(x, eq'(0', length'(x)), nil', 0', length'(x))
if'(x, true', z, c, l) → z
if'(x, false', z, c, l) → help'(s'(c), l, x, z)
help'(c, l, cons'(x, y), z) → if'(append'(y, cons'(x, nil')), ge'(c, l), cons'(x, z), c, l)
append'(nil', y) → y
append'(cons'(x, y), z) → cons'(x, append'(y, z))
length'(nil') → 0'
length'(cons'(x, y)) → s'(length'(y))

Rewrite Strategy: INNERMOST


Sliced the following arguments:
eq'/0
cons'/0


Runtime Complexity TRS:
The TRS R consists of the following rules:


ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
rev'(x) → if'(x, eq'(length'(x)), nil', 0', length'(x))
if'(x, true', z, c, l) → z
if'(x, false', z, c, l) → help'(s'(c), l, x, z)
help'(c, l, cons'(y), z) → if'(append'(y, cons'(nil')), ge'(c, l), cons'(z), c, l)
append'(nil', y) → y
append'(cons'(y), z) → cons'(append'(y, z))
length'(nil') → 0'
length'(cons'(y)) → s'(length'(y))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
rev'(x) → if'(x, eq'(length'(x)), nil', 0', length'(x))
if'(x, true', z, c, l) → z
if'(x, false', z, c, l) → help'(s'(c), l, x, z)
help'(c, l, cons'(y), z) → if'(append'(y, cons'(nil')), ge'(c, l), cons'(z), c, l)
append'(nil', y) → y
append'(cons'(y), z) → cons'(append'(y, z))
length'(nil') → 0'
length'(cons'(y)) → s'(length'(y))

Types:
ge' :: 0':s' → 0':s' → true':false':eq'
0' :: 0':s'
true' :: true':false':eq'
s' :: 0':s' → 0':s'
false' :: true':false':eq'
rev' :: nil':cons' → nil':cons'
if' :: nil':cons' → true':false':eq' → nil':cons' → 0':s' → 0':s' → nil':cons'
eq' :: 0':s' → true':false':eq'
length' :: nil':cons' → 0':s'
nil' :: nil':cons'
help' :: 0':s' → 0':s' → nil':cons' → nil':cons' → nil':cons'
cons' :: nil':cons' → nil':cons'
append' :: nil':cons' → nil':cons' → nil':cons'
_hole_true':false':eq'1 :: true':false':eq'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'


Heuristically decided to analyse the following defined symbols:
ge', length', help', append'

They will be analysed ascendingly in the following order:
ge' < help'
append' < help'


Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
rev'(x) → if'(x, eq'(length'(x)), nil', 0', length'(x))
if'(x, true', z, c, l) → z
if'(x, false', z, c, l) → help'(s'(c), l, x, z)
help'(c, l, cons'(y), z) → if'(append'(y, cons'(nil')), ge'(c, l), cons'(z), c, l)
append'(nil', y) → y
append'(cons'(y), z) → cons'(append'(y, z))
length'(nil') → 0'
length'(cons'(y)) → s'(length'(y))

Types:
ge' :: 0':s' → 0':s' → true':false':eq'
0' :: 0':s'
true' :: true':false':eq'
s' :: 0':s' → 0':s'
false' :: true':false':eq'
rev' :: nil':cons' → nil':cons'
if' :: nil':cons' → true':false':eq' → nil':cons' → 0':s' → 0':s' → nil':cons'
eq' :: 0':s' → true':false':eq'
length' :: nil':cons' → 0':s'
nil' :: nil':cons'
help' :: 0':s' → 0':s' → nil':cons' → nil':cons' → nil':cons'
cons' :: nil':cons' → nil':cons'
append' :: nil':cons' → nil':cons' → nil':cons'
_hole_true':false':eq'1 :: true':false':eq'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(_gen_nil':cons'5(x))

The following defined symbols remain to be analysed:
ge', length', help', append'

They will be analysed ascendingly in the following order:
ge' < help'
append' < help'


Proved the following rewrite lemma:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)

Induction Base:
ge'(_gen_0':s'4(0), _gen_0':s'4(0)) →RΩ(1)
true'

Induction Step:
ge'(_gen_0':s'4(+(_$n8, 1)), _gen_0':s'4(+(_$n8, 1))) →RΩ(1)
ge'(_gen_0':s'4(_$n8), _gen_0':s'4(_$n8)) →IH
true'

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
rev'(x) → if'(x, eq'(length'(x)), nil', 0', length'(x))
if'(x, true', z, c, l) → z
if'(x, false', z, c, l) → help'(s'(c), l, x, z)
help'(c, l, cons'(y), z) → if'(append'(y, cons'(nil')), ge'(c, l), cons'(z), c, l)
append'(nil', y) → y
append'(cons'(y), z) → cons'(append'(y, z))
length'(nil') → 0'
length'(cons'(y)) → s'(length'(y))

Types:
ge' :: 0':s' → 0':s' → true':false':eq'
0' :: 0':s'
true' :: true':false':eq'
s' :: 0':s' → 0':s'
false' :: true':false':eq'
rev' :: nil':cons' → nil':cons'
if' :: nil':cons' → true':false':eq' → nil':cons' → 0':s' → 0':s' → nil':cons'
eq' :: 0':s' → true':false':eq'
length' :: nil':cons' → 0':s'
nil' :: nil':cons'
help' :: 0':s' → 0':s' → nil':cons' → nil':cons' → nil':cons'
cons' :: nil':cons' → nil':cons'
append' :: nil':cons' → nil':cons' → nil':cons'
_hole_true':false':eq'1 :: true':false':eq'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(_gen_nil':cons'5(x))

The following defined symbols remain to be analysed:
length', help', append'

They will be analysed ascendingly in the following order:
append' < help'


Proved the following rewrite lemma:
length'(_gen_nil':cons'5(_n641)) → _gen_0':s'4(_n641), rt ∈ Ω(1 + n641)

Induction Base:
length'(_gen_nil':cons'5(0)) →RΩ(1)
0'

Induction Step:
length'(_gen_nil':cons'5(+(_$n642, 1))) →RΩ(1)
s'(length'(_gen_nil':cons'5(_$n642))) →IH
s'(_gen_0':s'4(_$n642))

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
rev'(x) → if'(x, eq'(length'(x)), nil', 0', length'(x))
if'(x, true', z, c, l) → z
if'(x, false', z, c, l) → help'(s'(c), l, x, z)
help'(c, l, cons'(y), z) → if'(append'(y, cons'(nil')), ge'(c, l), cons'(z), c, l)
append'(nil', y) → y
append'(cons'(y), z) → cons'(append'(y, z))
length'(nil') → 0'
length'(cons'(y)) → s'(length'(y))

Types:
ge' :: 0':s' → 0':s' → true':false':eq'
0' :: 0':s'
true' :: true':false':eq'
s' :: 0':s' → 0':s'
false' :: true':false':eq'
rev' :: nil':cons' → nil':cons'
if' :: nil':cons' → true':false':eq' → nil':cons' → 0':s' → 0':s' → nil':cons'
eq' :: 0':s' → true':false':eq'
length' :: nil':cons' → 0':s'
nil' :: nil':cons'
help' :: 0':s' → 0':s' → nil':cons' → nil':cons' → nil':cons'
cons' :: nil':cons' → nil':cons'
append' :: nil':cons' → nil':cons' → nil':cons'
_hole_true':false':eq'1 :: true':false':eq'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
length'(_gen_nil':cons'5(_n641)) → _gen_0':s'4(_n641), rt ∈ Ω(1 + n641)

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(_gen_nil':cons'5(x))

The following defined symbols remain to be analysed:
append', help'

They will be analysed ascendingly in the following order:
append' < help'


Proved the following rewrite lemma:
append'(_gen_nil':cons'5(_n1126), _gen_nil':cons'5(b)) → _gen_nil':cons'5(+(_n1126, b)), rt ∈ Ω(1 + n1126)

Induction Base:
append'(_gen_nil':cons'5(0), _gen_nil':cons'5(b)) →RΩ(1)
_gen_nil':cons'5(b)

Induction Step:
append'(_gen_nil':cons'5(+(_$n1127, 1)), _gen_nil':cons'5(_b1349)) →RΩ(1)
cons'(append'(_gen_nil':cons'5(_$n1127), _gen_nil':cons'5(_b1349))) →IH
cons'(_gen_nil':cons'5(+(_$n1127, _b1349)))

We have rt ∈ Ω(n) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).


Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
rev'(x) → if'(x, eq'(length'(x)), nil', 0', length'(x))
if'(x, true', z, c, l) → z
if'(x, false', z, c, l) → help'(s'(c), l, x, z)
help'(c, l, cons'(y), z) → if'(append'(y, cons'(nil')), ge'(c, l), cons'(z), c, l)
append'(nil', y) → y
append'(cons'(y), z) → cons'(append'(y, z))
length'(nil') → 0'
length'(cons'(y)) → s'(length'(y))

Types:
ge' :: 0':s' → 0':s' → true':false':eq'
0' :: 0':s'
true' :: true':false':eq'
s' :: 0':s' → 0':s'
false' :: true':false':eq'
rev' :: nil':cons' → nil':cons'
if' :: nil':cons' → true':false':eq' → nil':cons' → 0':s' → 0':s' → nil':cons'
eq' :: 0':s' → true':false':eq'
length' :: nil':cons' → 0':s'
nil' :: nil':cons'
help' :: 0':s' → 0':s' → nil':cons' → nil':cons' → nil':cons'
cons' :: nil':cons' → nil':cons'
append' :: nil':cons' → nil':cons' → nil':cons'
_hole_true':false':eq'1 :: true':false':eq'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
length'(_gen_nil':cons'5(_n641)) → _gen_0':s'4(_n641), rt ∈ Ω(1 + n641)
append'(_gen_nil':cons'5(_n1126), _gen_nil':cons'5(b)) → _gen_nil':cons'5(+(_n1126, b)), rt ∈ Ω(1 + n1126)

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(_gen_nil':cons'5(x))

The following defined symbols remain to be analysed:
help'


Could not prove a rewrite lemma for the defined symbol help'.


Rules:
ge'(x, 0') → true'
ge'(0', s'(y)) → false'
ge'(s'(x), s'(y)) → ge'(x, y)
rev'(x) → if'(x, eq'(length'(x)), nil', 0', length'(x))
if'(x, true', z, c, l) → z
if'(x, false', z, c, l) → help'(s'(c), l, x, z)
help'(c, l, cons'(y), z) → if'(append'(y, cons'(nil')), ge'(c, l), cons'(z), c, l)
append'(nil', y) → y
append'(cons'(y), z) → cons'(append'(y, z))
length'(nil') → 0'
length'(cons'(y)) → s'(length'(y))

Types:
ge' :: 0':s' → 0':s' → true':false':eq'
0' :: 0':s'
true' :: true':false':eq'
s' :: 0':s' → 0':s'
false' :: true':false':eq'
rev' :: nil':cons' → nil':cons'
if' :: nil':cons' → true':false':eq' → nil':cons' → 0':s' → 0':s' → nil':cons'
eq' :: 0':s' → true':false':eq'
length' :: nil':cons' → 0':s'
nil' :: nil':cons'
help' :: 0':s' → 0':s' → nil':cons' → nil':cons' → nil':cons'
cons' :: nil':cons' → nil':cons'
append' :: nil':cons' → nil':cons' → nil':cons'
_hole_true':false':eq'1 :: true':false':eq'
_hole_0':s'2 :: 0':s'
_hole_nil':cons'3 :: nil':cons'
_gen_0':s'4 :: Nat → 0':s'
_gen_nil':cons'5 :: Nat → nil':cons'

Lemmas:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)
length'(_gen_nil':cons'5(_n641)) → _gen_0':s'4(_n641), rt ∈ Ω(1 + n641)
append'(_gen_nil':cons'5(_n1126), _gen_nil':cons'5(b)) → _gen_nil':cons'5(+(_n1126, b)), rt ∈ Ω(1 + n1126)

Generator Equations:
_gen_0':s'4(0) ⇔ 0'
_gen_0':s'4(+(x, 1)) ⇔ s'(_gen_0':s'4(x))
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(_gen_nil':cons'5(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
ge'(_gen_0':s'4(_n7), _gen_0':s'4(_n7)) → true', rt ∈ Ω(1 + n7)