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

rev1(0, nil) → 0
rev1(s(X), nil) → s(X)
rev1(X, cons(Y, L)) → rev1(Y, L)
rev(nil) → nil
rev(cons(X, L)) → cons(rev1(X, L), rev2(X, L))
rev2(X, nil) → nil
rev2(X, cons(Y, L)) → rev(cons(X, rev(rev2(Y, L))))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


rev1'(0', nil') → 0'
rev1'(s'(X), nil') → s'(X)
rev1'(X, cons'(Y, L)) → rev1'(Y, L)
rev'(nil') → nil'
rev'(cons'(X, L)) → cons'(rev1'(X, L), rev2'(X, L))
rev2'(X, nil') → nil'
rev2'(X, cons'(Y, L)) → rev'(cons'(X, rev'(rev2'(Y, L))))

Rewrite Strategy: INNERMOST


Sliced the following arguments:
s'/0


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


rev1'(0', nil') → 0'
rev1'(s', nil') → s'
rev1'(X, cons'(Y, L)) → rev1'(Y, L)
rev'(nil') → nil'
rev'(cons'(X, L)) → cons'(rev1'(X, L), rev2'(X, L))
rev2'(X, nil') → nil'
rev2'(X, cons'(Y, L)) → rev'(cons'(X, rev'(rev2'(Y, L))))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
rev1'(0', nil') → 0'
rev1'(s', nil') → s'
rev1'(X, cons'(Y, L)) → rev1'(Y, L)
rev'(nil') → nil'
rev'(cons'(X, L)) → cons'(rev1'(X, L), rev2'(X, L))
rev2'(X, nil') → nil'
rev2'(X, cons'(Y, L)) → rev'(cons'(X, rev'(rev2'(Y, L))))

Types:
rev1' :: 0':s' → nil':cons' → 0':s'
0' :: 0':s'
nil' :: nil':cons'
s' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
rev' :: nil':cons' → nil':cons'
rev2' :: 0':s' → nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'


Heuristically decided to analyse the following defined symbols:
rev1', rev', rev2'

They will be analysed ascendingly in the following order:
rev1' < rev'
rev' = rev2'


Rules:
rev1'(0', nil') → 0'
rev1'(s', nil') → s'
rev1'(X, cons'(Y, L)) → rev1'(Y, L)
rev'(nil') → nil'
rev'(cons'(X, L)) → cons'(rev1'(X, L), rev2'(X, L))
rev2'(X, nil') → nil'
rev2'(X, cons'(Y, L)) → rev'(cons'(X, rev'(rev2'(Y, L))))

Types:
rev1' :: 0':s' → nil':cons' → 0':s'
0' :: 0':s'
nil' :: nil':cons'
s' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
rev' :: nil':cons' → nil':cons'
rev2' :: 0':s' → nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'

Generator Equations:
_gen_nil':cons'3(0) ⇔ nil'
_gen_nil':cons'3(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'3(x))

The following defined symbols remain to be analysed:
rev1', rev', rev2'

They will be analysed ascendingly in the following order:
rev1' < rev'
rev' = rev2'


Proved the following rewrite lemma:
rev1'(0', _gen_nil':cons'3(_n5)) → 0', rt ∈ Ω(1 + n5)

Induction Base:
rev1'(0', _gen_nil':cons'3(0)) →RΩ(1)
0'

Induction Step:
rev1'(0', _gen_nil':cons'3(+(_$n6, 1))) →RΩ(1)
rev1'(0', _gen_nil':cons'3(_$n6)) →IH
0'

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


Rules:
rev1'(0', nil') → 0'
rev1'(s', nil') → s'
rev1'(X, cons'(Y, L)) → rev1'(Y, L)
rev'(nil') → nil'
rev'(cons'(X, L)) → cons'(rev1'(X, L), rev2'(X, L))
rev2'(X, nil') → nil'
rev2'(X, cons'(Y, L)) → rev'(cons'(X, rev'(rev2'(Y, L))))

Types:
rev1' :: 0':s' → nil':cons' → 0':s'
0' :: 0':s'
nil' :: nil':cons'
s' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
rev' :: nil':cons' → nil':cons'
rev2' :: 0':s' → nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'

Lemmas:
rev1'(0', _gen_nil':cons'3(_n5)) → 0', rt ∈ Ω(1 + n5)

Generator Equations:
_gen_nil':cons'3(0) ⇔ nil'
_gen_nil':cons'3(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'3(x))

The following defined symbols remain to be analysed:
rev2', rev'

They will be analysed ascendingly in the following order:
rev' = rev2'


Proved the following rewrite lemma:
rev2'(0', _gen_nil':cons'3(_n269)) → _*4, rt ∈ Ω(n269)

Induction Base:
rev2'(0', _gen_nil':cons'3(0))

Induction Step:
rev2'(0', _gen_nil':cons'3(+(_$n270, 1))) →RΩ(1)
rev'(cons'(0', rev'(rev2'(0', _gen_nil':cons'3(_$n270))))) →IH
rev'(cons'(0', rev'(_*4)))

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


Rules:
rev1'(0', nil') → 0'
rev1'(s', nil') → s'
rev1'(X, cons'(Y, L)) → rev1'(Y, L)
rev'(nil') → nil'
rev'(cons'(X, L)) → cons'(rev1'(X, L), rev2'(X, L))
rev2'(X, nil') → nil'
rev2'(X, cons'(Y, L)) → rev'(cons'(X, rev'(rev2'(Y, L))))

Types:
rev1' :: 0':s' → nil':cons' → 0':s'
0' :: 0':s'
nil' :: nil':cons'
s' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
rev' :: nil':cons' → nil':cons'
rev2' :: 0':s' → nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'

Lemmas:
rev1'(0', _gen_nil':cons'3(_n5)) → 0', rt ∈ Ω(1 + n5)
rev2'(0', _gen_nil':cons'3(_n269)) → _*4, rt ∈ Ω(n269)

Generator Equations:
_gen_nil':cons'3(0) ⇔ nil'
_gen_nil':cons'3(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'3(x))

The following defined symbols remain to be analysed:
rev'

They will be analysed ascendingly in the following order:
rev' = rev2'


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

The following conjecture could not be proven:

rev'(_gen_nil':cons'3(_n5563)) →? _gen_nil':cons'3(_n5563)


Rules:
rev1'(0', nil') → 0'
rev1'(s', nil') → s'
rev1'(X, cons'(Y, L)) → rev1'(Y, L)
rev'(nil') → nil'
rev'(cons'(X, L)) → cons'(rev1'(X, L), rev2'(X, L))
rev2'(X, nil') → nil'
rev2'(X, cons'(Y, L)) → rev'(cons'(X, rev'(rev2'(Y, L))))

Types:
rev1' :: 0':s' → nil':cons' → 0':s'
0' :: 0':s'
nil' :: nil':cons'
s' :: 0':s'
cons' :: 0':s' → nil':cons' → nil':cons'
rev' :: nil':cons' → nil':cons'
rev2' :: 0':s' → nil':cons' → nil':cons'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'

Lemmas:
rev1'(0', _gen_nil':cons'3(_n5)) → 0', rt ∈ Ω(1 + n5)
rev2'(0', _gen_nil':cons'3(_n269)) → _*4, rt ∈ Ω(n269)

Generator Equations:
_gen_nil':cons'3(0) ⇔ nil'
_gen_nil':cons'3(+(x, 1)) ⇔ cons'(0', _gen_nil':cons'3(x))

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
rev1'(0', _gen_nil':cons'3(_n5)) → 0', rt ∈ Ω(1 + n5)