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

+(x, 0) → x
+(0, x) → x
+(s(x), s(y)) → s(s(+(x, y)))
+(+(x, y), z) → +(x, +(y, z))
*(x, 0) → 0
*(0, x) → 0
*(s(x), s(y)) → s(+(*(x, y), +(x, y)))
*(*(x, y), z) → *(x, *(y, z))
app(nil, l) → l
app(cons(x, l1), l2) → cons(x, app(l1, l2))
sum(nil) → 0
sum(cons(x, l)) → +(x, sum(l))
sum(app(l1, l2)) → +(sum(l1), sum(l2))
prod(nil) → s(0)
prod(cons(x, l)) → *(x, prod(l))
prod(app(l1, l2)) → *(prod(l1), prod(l2))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


+'(x, 0') → x
+'(0', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(x, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
*'(*'(x, y), z) → *'(x, *'(y, z))
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
sum'(app'(l1, l2)) → +'(sum'(l1), sum'(l2))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
+'(x, 0') → x
+'(0', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(x, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
*'(*'(x, y), z) → *'(x, *'(y, z))
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
sum'(app'(l1, l2)) → +'(sum'(l1), sum'(l2))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
sum' :: nil':cons' → 0':s'
prod' :: nil':cons' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_0':s'3 :: Nat → 0':s'
_gen_nil':cons'4 :: Nat → nil':cons'


Heuristically decided to analyse the following defined symbols:
+', *', app', sum', prod'

They will be analysed ascendingly in the following order:
+' < *'
+' < sum'
*' < prod'


Rules:
+'(x, 0') → x
+'(0', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(x, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
*'(*'(x, y), z) → *'(x, *'(y, z))
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
sum'(app'(l1, l2)) → +'(sum'(l1), sum'(l2))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
sum' :: nil':cons' → 0':s'
prod' :: nil':cons' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_0':s'3 :: Nat → 0':s'
_gen_nil':cons'4 :: Nat → nil':cons'

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

The following defined symbols remain to be analysed:
+', *', app', sum', prod'

They will be analysed ascendingly in the following order:
+' < *'
+' < sum'
*' < prod'


Proved the following rewrite lemma:
+'(_gen_0':s'3(_n6), _gen_0':s'3(_n6)) → _gen_0':s'3(*(2, _n6)), rt ∈ Ω(1 + n6)

Induction Base:
+'(_gen_0':s'3(0), _gen_0':s'3(0)) →RΩ(1)
_gen_0':s'3(0)

Induction Step:
+'(_gen_0':s'3(+(_$n7, 1)), _gen_0':s'3(+(_$n7, 1))) →RΩ(1)
s'(s'(+'(_gen_0':s'3(_$n7), _gen_0':s'3(_$n7)))) →IH
s'(s'(_gen_0':s'3(*(2, _$n7))))

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


Rules:
+'(x, 0') → x
+'(0', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(x, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
*'(*'(x, y), z) → *'(x, *'(y, z))
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
sum'(app'(l1, l2)) → +'(sum'(l1), sum'(l2))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
sum' :: nil':cons' → 0':s'
prod' :: nil':cons' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_0':s'3 :: Nat → 0':s'
_gen_nil':cons'4 :: Nat → nil':cons'

Lemmas:
+'(_gen_0':s'3(_n6), _gen_0':s'3(_n6)) → _gen_0':s'3(*(2, _n6)), rt ∈ Ω(1 + n6)

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

The following defined symbols remain to be analysed:
*', app', sum', prod'

They will be analysed ascendingly in the following order:
*' < prod'


Proved the following rewrite lemma:
*'(_gen_0':s'3(_n1335), _gen_0':s'3(_n1335)) → _*5, rt ∈ Ω(n1335 + n13352)

Induction Base:
*'(_gen_0':s'3(0), _gen_0':s'3(0))

Induction Step:
*'(_gen_0':s'3(+(_$n1336, 1)), _gen_0':s'3(+(_$n1336, 1))) →RΩ(1)
s'(+'(*'(_gen_0':s'3(_$n1336), _gen_0':s'3(_$n1336)), +'(_gen_0':s'3(_$n1336), _gen_0':s'3(_$n1336)))) →IH
s'(+'(_*5, +'(_gen_0':s'3(_$n1336), _gen_0':s'3(_$n1336)))) →LΩ(1 + $n1336)
s'(+'(_*5, _gen_0':s'3(*(2, _$n1336))))

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


Rules:
+'(x, 0') → x
+'(0', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(x, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
*'(*'(x, y), z) → *'(x, *'(y, z))
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
sum'(app'(l1, l2)) → +'(sum'(l1), sum'(l2))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
sum' :: nil':cons' → 0':s'
prod' :: nil':cons' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_0':s'3 :: Nat → 0':s'
_gen_nil':cons'4 :: Nat → nil':cons'

Lemmas:
+'(_gen_0':s'3(_n6), _gen_0':s'3(_n6)) → _gen_0':s'3(*(2, _n6)), rt ∈ Ω(1 + n6)
*'(_gen_0':s'3(_n1335), _gen_0':s'3(_n1335)) → _*5, rt ∈ Ω(n1335 + n13352)

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

The following defined symbols remain to be analysed:
app', sum', prod'


Proved the following rewrite lemma:
app'(_gen_nil':cons'4(_n14460), _gen_nil':cons'4(b)) → _gen_nil':cons'4(+(_n14460, b)), rt ∈ Ω(1 + n14460)

Induction Base:
app'(_gen_nil':cons'4(0), _gen_nil':cons'4(b)) →RΩ(1)
_gen_nil':cons'4(b)

Induction Step:
app'(_gen_nil':cons'4(+(_$n14461, 1)), _gen_nil':cons'4(_b14733)) →RΩ(1)
cons'(0', app'(_gen_nil':cons'4(_$n14461), _gen_nil':cons'4(_b14733))) →IH
cons'(0', _gen_nil':cons'4(+(_$n14461, _b14733)))

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


Rules:
+'(x, 0') → x
+'(0', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(x, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
*'(*'(x, y), z) → *'(x, *'(y, z))
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
sum'(app'(l1, l2)) → +'(sum'(l1), sum'(l2))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
sum' :: nil':cons' → 0':s'
prod' :: nil':cons' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_0':s'3 :: Nat → 0':s'
_gen_nil':cons'4 :: Nat → nil':cons'

Lemmas:
+'(_gen_0':s'3(_n6), _gen_0':s'3(_n6)) → _gen_0':s'3(*(2, _n6)), rt ∈ Ω(1 + n6)
*'(_gen_0':s'3(_n1335), _gen_0':s'3(_n1335)) → _*5, rt ∈ Ω(n1335 + n13352)
app'(_gen_nil':cons'4(_n14460), _gen_nil':cons'4(b)) → _gen_nil':cons'4(+(_n14460, b)), rt ∈ Ω(1 + n14460)

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

The following defined symbols remain to be analysed:
sum', prod'


Proved the following rewrite lemma:
sum'(_gen_nil':cons'4(_n15671)) → _gen_0':s'3(0), rt ∈ Ω(1 + n15671)

Induction Base:
sum'(_gen_nil':cons'4(0)) →RΩ(1)
0'

Induction Step:
sum'(_gen_nil':cons'4(+(_$n15672, 1))) →RΩ(1)
+'(0', sum'(_gen_nil':cons'4(_$n15672))) →IH
+'(0', _gen_0':s'3(0)) →LΩ(1)
_gen_0':s'3(*(2, 0))

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


Rules:
+'(x, 0') → x
+'(0', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(x, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
*'(*'(x, y), z) → *'(x, *'(y, z))
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
sum'(app'(l1, l2)) → +'(sum'(l1), sum'(l2))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
sum' :: nil':cons' → 0':s'
prod' :: nil':cons' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_0':s'3 :: Nat → 0':s'
_gen_nil':cons'4 :: Nat → nil':cons'

Lemmas:
+'(_gen_0':s'3(_n6), _gen_0':s'3(_n6)) → _gen_0':s'3(*(2, _n6)), rt ∈ Ω(1 + n6)
*'(_gen_0':s'3(_n1335), _gen_0':s'3(_n1335)) → _*5, rt ∈ Ω(n1335 + n13352)
app'(_gen_nil':cons'4(_n14460), _gen_nil':cons'4(b)) → _gen_nil':cons'4(+(_n14460, b)), rt ∈ Ω(1 + n14460)
sum'(_gen_nil':cons'4(_n15671)) → _gen_0':s'3(0), rt ∈ Ω(1 + n15671)

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

The following defined symbols remain to be analysed:
prod'


Proved the following rewrite lemma:
prod'(_gen_nil':cons'4(_n17113)) → _*5, rt ∈ Ω(n17113)

Induction Base:
prod'(_gen_nil':cons'4(0))

Induction Step:
prod'(_gen_nil':cons'4(+(_$n17114, 1))) →RΩ(1)
*'(0', prod'(_gen_nil':cons'4(_$n17114))) →IH
*'(0', _*5)

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


Rules:
+'(x, 0') → x
+'(0', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(x, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
*'(*'(x, y), z) → *'(x, *'(y, z))
app'(nil', l) → l
app'(cons'(x, l1), l2) → cons'(x, app'(l1, l2))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
sum'(app'(l1, l2)) → +'(sum'(l1), sum'(l2))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
sum' :: nil':cons' → 0':s'
prod' :: nil':cons' → 0':s'
_hole_0':s'1 :: 0':s'
_hole_nil':cons'2 :: nil':cons'
_gen_0':s'3 :: Nat → 0':s'
_gen_nil':cons'4 :: Nat → nil':cons'

Lemmas:
+'(_gen_0':s'3(_n6), _gen_0':s'3(_n6)) → _gen_0':s'3(*(2, _n6)), rt ∈ Ω(1 + n6)
*'(_gen_0':s'3(_n1335), _gen_0':s'3(_n1335)) → _*5, rt ∈ Ω(n1335 + n13352)
app'(_gen_nil':cons'4(_n14460), _gen_nil':cons'4(b)) → _gen_nil':cons'4(+(_n14460, b)), rt ∈ Ω(1 + n14460)
sum'(_gen_nil':cons'4(_n15671)) → _gen_0':s'3(0), rt ∈ Ω(1 + n15671)
prod'(_gen_nil':cons'4(_n17113)) → _*5, rt ∈ Ω(n17113)

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

No more defined symbols left to analyse.


The lowerbound Ω(n2) was proven with the following lemma:
*'(_gen_0':s'3(_n1335), _gen_0':s'3(_n1335)) → _*5, rt ∈ Ω(n1335 + n13352)