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

0(#) → #
+(x, #) → x
+(#, x) → x
+(0(x), 0(y)) → 0(+(x, y))
+(0(x), 1(y)) → 1(+(x, y))
+(1(x), 0(y)) → 1(+(x, y))
+(1(x), 1(y)) → 0(+(+(x, y), 1(#)))
+(+(x, y), z) → +(x, +(y, z))
*(#, x) → #
*(0(x), y) → 0(*(x, y))
*(1(x), y) → +(0(*(x, y)), y)
*(*(x, y), z) → *(x, *(y, z))
*(x, +(y, z)) → +(*(x, y), *(x, 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) → 1(#)
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:


0'(#') → #'
+'(x, #') → x
+'(#', x) → x
+'(0'(x), 0'(y)) → 0'(+'(x, y))
+'(0'(x), 1'(y)) → 1'(+'(x, y))
+'(1'(x), 0'(y)) → 1'(+'(x, y))
+'(1'(x), 1'(y)) → 0'(+'(+'(x, y), 1'(#')))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(#', x) → #'
*'(0'(x), y) → 0'(*'(x, y))
*'(1'(x), y) → +'(0'(*'(x, y)), y)
*'(*'(x, y), z) → *'(x, *'(y, z))
*'(x, +'(y, z)) → +'(*'(x, y), *'(x, 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') → 1'(#')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
0'(#') → #'
+'(x, #') → x
+'(#', x) → x
+'(0'(x), 0'(y)) → 0'(+'(x, y))
+'(0'(x), 1'(y)) → 1'(+'(x, y))
+'(1'(x), 0'(y)) → 1'(+'(x, y))
+'(1'(x), 1'(y)) → 0'(+'(+'(x, y), 1'(#')))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(#', x) → #'
*'(0'(x), y) → 0'(*'(x, y))
*'(1'(x), y) → +'(0'(*'(x, y)), y)
*'(*'(x, y), z) → *'(x, *'(y, z))
*'(x, +'(y, z)) → +'(*'(x, y), *'(x, 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') → 1'(#')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
0' :: #':1' → #':1'
#' :: #':1'
+' :: #':1' → #':1' → #':1'
1' :: #':1' → #':1'
*' :: #':1' → #':1' → #':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: #':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → #':1'
prod' :: nil':cons' → #':1'
_hole_#':1'1 :: #':1'
_hole_nil':cons'2 :: nil':cons'
_gen_#':1'3 :: Nat → #':1'
_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:
0'(#') → #'
+'(x, #') → x
+'(#', x) → x
+'(0'(x), 0'(y)) → 0'(+'(x, y))
+'(0'(x), 1'(y)) → 1'(+'(x, y))
+'(1'(x), 0'(y)) → 1'(+'(x, y))
+'(1'(x), 1'(y)) → 0'(+'(+'(x, y), 1'(#')))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(#', x) → #'
*'(0'(x), y) → 0'(*'(x, y))
*'(1'(x), y) → +'(0'(*'(x, y)), y)
*'(*'(x, y), z) → *'(x, *'(y, z))
*'(x, +'(y, z)) → +'(*'(x, y), *'(x, 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') → 1'(#')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
0' :: #':1' → #':1'
#' :: #':1'
+' :: #':1' → #':1' → #':1'
1' :: #':1' → #':1'
*' :: #':1' → #':1' → #':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: #':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → #':1'
prod' :: nil':cons' → #':1'
_hole_#':1'1 :: #':1'
_hole_nil':cons'2 :: nil':cons'
_gen_#':1'3 :: Nat → #':1'
_gen_nil':cons'4 :: Nat → nil':cons'

Generator Equations:
_gen_#':1'3(0) ⇔ #'
_gen_#':1'3(+(x, 1)) ⇔ 1'(_gen_#':1'3(x))
_gen_nil':cons'4(0) ⇔ nil'
_gen_nil':cons'4(+(x, 1)) ⇔ cons'(#', _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_#':1'3(_n6), _gen_#':1'3(_n6)) → _*5, rt ∈ Ω(n6)

Induction Base:
+'(_gen_#':1'3(0), _gen_#':1'3(0))

Induction Step:
+'(_gen_#':1'3(+(_$n7, 1)), _gen_#':1'3(+(_$n7, 1))) →RΩ(1)
0'(+'(+'(_gen_#':1'3(_$n7), _gen_#':1'3(_$n7)), 1'(#'))) →IH
0'(+'(_*5, 1'(#')))

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


Rules:
0'(#') → #'
+'(x, #') → x
+'(#', x) → x
+'(0'(x), 0'(y)) → 0'(+'(x, y))
+'(0'(x), 1'(y)) → 1'(+'(x, y))
+'(1'(x), 0'(y)) → 1'(+'(x, y))
+'(1'(x), 1'(y)) → 0'(+'(+'(x, y), 1'(#')))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(#', x) → #'
*'(0'(x), y) → 0'(*'(x, y))
*'(1'(x), y) → +'(0'(*'(x, y)), y)
*'(*'(x, y), z) → *'(x, *'(y, z))
*'(x, +'(y, z)) → +'(*'(x, y), *'(x, 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') → 1'(#')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
0' :: #':1' → #':1'
#' :: #':1'
+' :: #':1' → #':1' → #':1'
1' :: #':1' → #':1'
*' :: #':1' → #':1' → #':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: #':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → #':1'
prod' :: nil':cons' → #':1'
_hole_#':1'1 :: #':1'
_hole_nil':cons'2 :: nil':cons'
_gen_#':1'3 :: Nat → #':1'
_gen_nil':cons'4 :: Nat → nil':cons'

Lemmas:
+'(_gen_#':1'3(_n6), _gen_#':1'3(_n6)) → _*5, rt ∈ Ω(n6)

Generator Equations:
_gen_#':1'3(0) ⇔ #'
_gen_#':1'3(+(x, 1)) ⇔ 1'(_gen_#':1'3(x))
_gen_nil':cons'4(0) ⇔ nil'
_gen_nil':cons'4(+(x, 1)) ⇔ cons'(#', _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_#':1'3(_n41352), _gen_#':1'3(0)) → _gen_#':1'3(0), rt ∈ Ω(1 + n41352)

Induction Base:
*'(_gen_#':1'3(0), _gen_#':1'3(0)) →RΩ(1)
#'

Induction Step:
*'(_gen_#':1'3(+(_$n41353, 1)), _gen_#':1'3(0)) →RΩ(1)
+'(0'(*'(_gen_#':1'3(_$n41353), _gen_#':1'3(0))), _gen_#':1'3(0)) →IH
+'(0'(_gen_#':1'3(0)), _gen_#':1'3(0)) →RΩ(1)
+'(#', _gen_#':1'3(0)) →RΩ(1)
#'

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


Rules:
0'(#') → #'
+'(x, #') → x
+'(#', x) → x
+'(0'(x), 0'(y)) → 0'(+'(x, y))
+'(0'(x), 1'(y)) → 1'(+'(x, y))
+'(1'(x), 0'(y)) → 1'(+'(x, y))
+'(1'(x), 1'(y)) → 0'(+'(+'(x, y), 1'(#')))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(#', x) → #'
*'(0'(x), y) → 0'(*'(x, y))
*'(1'(x), y) → +'(0'(*'(x, y)), y)
*'(*'(x, y), z) → *'(x, *'(y, z))
*'(x, +'(y, z)) → +'(*'(x, y), *'(x, 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') → 1'(#')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
0' :: #':1' → #':1'
#' :: #':1'
+' :: #':1' → #':1' → #':1'
1' :: #':1' → #':1'
*' :: #':1' → #':1' → #':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: #':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → #':1'
prod' :: nil':cons' → #':1'
_hole_#':1'1 :: #':1'
_hole_nil':cons'2 :: nil':cons'
_gen_#':1'3 :: Nat → #':1'
_gen_nil':cons'4 :: Nat → nil':cons'

Lemmas:
+'(_gen_#':1'3(_n6), _gen_#':1'3(_n6)) → _*5, rt ∈ Ω(n6)
*'(_gen_#':1'3(_n41352), _gen_#':1'3(0)) → _gen_#':1'3(0), rt ∈ Ω(1 + n41352)

Generator Equations:
_gen_#':1'3(0) ⇔ #'
_gen_#':1'3(+(x, 1)) ⇔ 1'(_gen_#':1'3(x))
_gen_nil':cons'4(0) ⇔ nil'
_gen_nil':cons'4(+(x, 1)) ⇔ cons'(#', _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(_n55072), _gen_nil':cons'4(b)) → _gen_nil':cons'4(+(_n55072, b)), rt ∈ Ω(1 + n55072)

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(+(_$n55073, 1)), _gen_nil':cons'4(_b55345)) →RΩ(1)
cons'(#', app'(_gen_nil':cons'4(_$n55073), _gen_nil':cons'4(_b55345))) →IH
cons'(#', _gen_nil':cons'4(+(_$n55073, _b55345)))

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


Rules:
0'(#') → #'
+'(x, #') → x
+'(#', x) → x
+'(0'(x), 0'(y)) → 0'(+'(x, y))
+'(0'(x), 1'(y)) → 1'(+'(x, y))
+'(1'(x), 0'(y)) → 1'(+'(x, y))
+'(1'(x), 1'(y)) → 0'(+'(+'(x, y), 1'(#')))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(#', x) → #'
*'(0'(x), y) → 0'(*'(x, y))
*'(1'(x), y) → +'(0'(*'(x, y)), y)
*'(*'(x, y), z) → *'(x, *'(y, z))
*'(x, +'(y, z)) → +'(*'(x, y), *'(x, 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') → 1'(#')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
0' :: #':1' → #':1'
#' :: #':1'
+' :: #':1' → #':1' → #':1'
1' :: #':1' → #':1'
*' :: #':1' → #':1' → #':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: #':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → #':1'
prod' :: nil':cons' → #':1'
_hole_#':1'1 :: #':1'
_hole_nil':cons'2 :: nil':cons'
_gen_#':1'3 :: Nat → #':1'
_gen_nil':cons'4 :: Nat → nil':cons'

Lemmas:
+'(_gen_#':1'3(_n6), _gen_#':1'3(_n6)) → _*5, rt ∈ Ω(n6)
*'(_gen_#':1'3(_n41352), _gen_#':1'3(0)) → _gen_#':1'3(0), rt ∈ Ω(1 + n41352)
app'(_gen_nil':cons'4(_n55072), _gen_nil':cons'4(b)) → _gen_nil':cons'4(+(_n55072, b)), rt ∈ Ω(1 + n55072)

Generator Equations:
_gen_#':1'3(0) ⇔ #'
_gen_#':1'3(+(x, 1)) ⇔ 1'(_gen_#':1'3(x))
_gen_nil':cons'4(0) ⇔ nil'
_gen_nil':cons'4(+(x, 1)) ⇔ cons'(#', _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(_n56578)) → _gen_#':1'3(0), rt ∈ Ω(1 + n56578)

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

Induction Step:
sum'(_gen_nil':cons'4(+(_$n56579, 1))) →RΩ(1)
+'(#', sum'(_gen_nil':cons'4(_$n56579))) →IH
+'(#', _gen_#':1'3(0)) →RΩ(1)
#'

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


Rules:
0'(#') → #'
+'(x, #') → x
+'(#', x) → x
+'(0'(x), 0'(y)) → 0'(+'(x, y))
+'(0'(x), 1'(y)) → 1'(+'(x, y))
+'(1'(x), 0'(y)) → 1'(+'(x, y))
+'(1'(x), 1'(y)) → 0'(+'(+'(x, y), 1'(#')))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(#', x) → #'
*'(0'(x), y) → 0'(*'(x, y))
*'(1'(x), y) → +'(0'(*'(x, y)), y)
*'(*'(x, y), z) → *'(x, *'(y, z))
*'(x, +'(y, z)) → +'(*'(x, y), *'(x, 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') → 1'(#')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
0' :: #':1' → #':1'
#' :: #':1'
+' :: #':1' → #':1' → #':1'
1' :: #':1' → #':1'
*' :: #':1' → #':1' → #':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: #':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → #':1'
prod' :: nil':cons' → #':1'
_hole_#':1'1 :: #':1'
_hole_nil':cons'2 :: nil':cons'
_gen_#':1'3 :: Nat → #':1'
_gen_nil':cons'4 :: Nat → nil':cons'

Lemmas:
+'(_gen_#':1'3(_n6), _gen_#':1'3(_n6)) → _*5, rt ∈ Ω(n6)
*'(_gen_#':1'3(_n41352), _gen_#':1'3(0)) → _gen_#':1'3(0), rt ∈ Ω(1 + n41352)
app'(_gen_nil':cons'4(_n55072), _gen_nil':cons'4(b)) → _gen_nil':cons'4(+(_n55072, b)), rt ∈ Ω(1 + n55072)
sum'(_gen_nil':cons'4(_n56578)) → _gen_#':1'3(0), rt ∈ Ω(1 + n56578)

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

The following defined symbols remain to be analysed:
prod'


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

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

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

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


Rules:
0'(#') → #'
+'(x, #') → x
+'(#', x) → x
+'(0'(x), 0'(y)) → 0'(+'(x, y))
+'(0'(x), 1'(y)) → 1'(+'(x, y))
+'(1'(x), 0'(y)) → 1'(+'(x, y))
+'(1'(x), 1'(y)) → 0'(+'(+'(x, y), 1'(#')))
+'(+'(x, y), z) → +'(x, +'(y, z))
*'(#', x) → #'
*'(0'(x), y) → 0'(*'(x, y))
*'(1'(x), y) → +'(0'(*'(x, y)), y)
*'(*'(x, y), z) → *'(x, *'(y, z))
*'(x, +'(y, z)) → +'(*'(x, y), *'(x, 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') → 1'(#')
prod'(cons'(x, l)) → *'(x, prod'(l))
prod'(app'(l1, l2)) → *'(prod'(l1), prod'(l2))

Types:
0' :: #':1' → #':1'
#' :: #':1'
+' :: #':1' → #':1' → #':1'
1' :: #':1' → #':1'
*' :: #':1' → #':1' → #':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: #':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → #':1'
prod' :: nil':cons' → #':1'
_hole_#':1'1 :: #':1'
_hole_nil':cons'2 :: nil':cons'
_gen_#':1'3 :: Nat → #':1'
_gen_nil':cons'4 :: Nat → nil':cons'

Lemmas:
+'(_gen_#':1'3(_n6), _gen_#':1'3(_n6)) → _*5, rt ∈ Ω(n6)
*'(_gen_#':1'3(_n41352), _gen_#':1'3(0)) → _gen_#':1'3(0), rt ∈ Ω(1 + n41352)
app'(_gen_nil':cons'4(_n55072), _gen_nil':cons'4(b)) → _gen_nil':cons'4(+(_n55072, b)), rt ∈ Ω(1 + n55072)
sum'(_gen_nil':cons'4(_n56578)) → _gen_#':1'3(0), rt ∈ Ω(1 + n56578)
prod'(_gen_nil':cons'4(_n62396)) → _*5, rt ∈ Ω(n62396)

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

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
+'(_gen_#':1'3(_n6), _gen_#':1'3(_n6)) → _*5, rt ∈ Ω(n6)