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, 0) → 0
*(0, x) → 0
*(s(x), s(y)) → s(+(*(x, y), +(x, y)))
sum(nil) → 0
sum(cons(x, l)) → +(x, sum(l))
prod(nil) → s(0)
prod(cons(x, l)) → *(x, prod(l))

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, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))

Rewrite Strategy: INNERMOST


Infered types.


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

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
sum' :: nil':cons' → 0':s'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
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:
+', *', 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, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
sum' :: nil':cons' → 0':s'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
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:
+', *', 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, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
sum' :: nil':cons' → 0':s'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
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:
*', sum', prod'

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


Proved the following rewrite lemma:
*'(_gen_0':s'3(_n748), _gen_0':s'3(_n748)) → _*5, rt ∈ Ω(n748 + n7482)

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

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

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, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
sum' :: nil':cons' → 0':s'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
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(_n748), _gen_0':s'3(_n748)) → _*5, rt ∈ Ω(n748 + n7482)

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(_n10269)) → _gen_0':s'3(0), rt ∈ Ω(1 + n10269)

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

Induction Step:
sum'(_gen_nil':cons'4(+(_$n10270, 1))) →RΩ(1)
+'(0', sum'(_gen_nil':cons'4(_$n10270))) →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, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
sum' :: nil':cons' → 0':s'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
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(_n748), _gen_0':s'3(_n748)) → _*5, rt ∈ Ω(n748 + n7482)
sum'(_gen_nil':cons'4(_n10269)) → _gen_0':s'3(0), rt ∈ Ω(1 + n10269)

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(_n11071)) → _*5, rt ∈ Ω(n11071)

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

Induction Step:
prod'(_gen_nil':cons'4(+(_$n11072, 1))) →RΩ(1)
*'(0', prod'(_gen_nil':cons'4(_$n11072))) →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, 0') → 0'
*'(0', x) → 0'
*'(s'(x), s'(y)) → s'(+'(*'(x, y), +'(x, y)))
sum'(nil') → 0'
sum'(cons'(x, l)) → +'(x, sum'(l))
prod'(nil') → s'(0')
prod'(cons'(x, l)) → *'(x, prod'(l))

Types:
+' :: 0':s' → 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
*' :: 0':s' → 0':s' → 0':s'
sum' :: nil':cons' → 0':s'
nil' :: nil':cons'
cons' :: 0':s' → nil':cons' → nil':cons'
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(_n748), _gen_0':s'3(_n748)) → _*5, rt ∈ Ω(n748 + n7482)
sum'(_gen_nil':cons'4(_n10269)) → _gen_0':s'3(0), rt ∈ Ω(1 + n10269)
prod'(_gen_nil':cons'4(_n11071)) → _*5, rt ∈ Ω(n11071)

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(_n748), _gen_0':s'3(_n748)) → _*5, rt ∈ Ω(n748 + n7482)