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

rev(nil) → nil
rev(cons(x, l)) → cons(rev1(x, l), rev2(x, l))
rev1(0, nil) → 0
rev1(s(x), nil) → s(x)
rev1(x, cons(y, l)) → rev1(y, l)
rev2(x, nil) → nil
rev2(x, cons(y, l)) → rev(cons(x, 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:


rev'(nil') → nil'
rev'(cons'(x, l)) → cons'(rev1'(x, l), rev2'(x, l))
rev1'(0', nil') → 0'
rev1'(s'(x), nil') → s'(x)
rev1'(x, cons'(y, l)) → rev1'(y, l)
rev2'(x, nil') → nil'
rev2'(x, cons'(y, l)) → rev'(cons'(x, rev2'(y, l)))

Rewrite Strategy: INNERMOST


Sliced the following arguments:
s'/0


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


rev'(nil') → nil'
rev'(cons'(x, l)) → cons'(rev1'(x, l), rev2'(x, l))
rev1'(0', nil') → 0'
rev1'(s', nil') → s'
rev1'(x, cons'(y, l)) → rev1'(y, l)
rev2'(x, nil') → nil'
rev2'(x, cons'(y, l)) → rev'(cons'(x, rev2'(y, l)))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
rev'(nil') → nil'
rev'(cons'(x, l)) → cons'(rev1'(x, l), rev2'(x, l))
rev1'(0', nil') → 0'
rev1'(s', nil') → s'
rev1'(x, cons'(y, l)) → rev1'(y, l)
rev2'(x, nil') → nil'
rev2'(x, cons'(y, l)) → rev'(cons'(x, rev2'(y, l)))

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


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

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


Rules:
rev'(nil') → nil'
rev'(cons'(x, l)) → cons'(rev1'(x, l), rev2'(x, l))
rev1'(0', nil') → 0'
rev1'(s', nil') → s'
rev1'(x, cons'(y, l)) → rev1'(y, l)
rev2'(x, nil') → nil'
rev2'(x, cons'(y, l)) → rev'(cons'(x, rev2'(y, l)))

Types:
rev' :: nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
rev1' :: 0':s' → nil':cons' → 0':s'
rev2' :: 0':s' → nil':cons' → nil':cons'
0' :: 0':s'
s' :: 0':s'
_hole_nil':cons'1 :: nil':cons'
_hole_0':s'2 :: 0':s'
_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:
rev'(nil') → nil'
rev'(cons'(x, l)) → cons'(rev1'(x, l), rev2'(x, l))
rev1'(0', nil') → 0'
rev1'(s', nil') → s'
rev1'(x, cons'(y, l)) → rev1'(y, l)
rev2'(x, nil') → nil'
rev2'(x, cons'(y, l)) → rev'(cons'(x, rev2'(y, l)))

Types:
rev' :: nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
rev1' :: 0':s' → nil':cons' → 0':s'
rev2' :: 0':s' → nil':cons' → nil':cons'
0' :: 0':s'
s' :: 0':s'
_hole_nil':cons'1 :: nil':cons'
_hole_0':s'2 :: 0':s'
_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)) → _gen_nil':cons'3(_n269), rt ∈ Ω(2n)

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

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

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