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

tablegen(s(0))
gen(x) → if1(le(x, 10), x)
if1(false, x) → nil
if1(true, x) → if2(x, x)
if2(x, y) → if3(le(y, 10), x, y)
if3(true, x, y) → cons(entry(x, y, times(x, y)), if2(x, s(y)))
if3(false, x, y) → gen(s(x))
le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
times(0, y) → 0
times(s(x), y) → plus(y, times(x, y))
10s(s(s(s(s(s(s(s(s(s(0))))))))))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


table'gen'(s'(0'))
gen'(x) → if1'(le'(x, 10'), x)
if1'(false', x) → nil'
if1'(true', x) → if2'(x, x)
if2'(x, y) → if3'(le'(y, 10'), x, y)
if3'(true', x, y) → cons'(entry'(x, y, times'(x, y)), if2'(x, s'(y)))
if3'(false', x, y) → gen'(s'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
times'(0', y) → 0'
times'(s'(x), y) → plus'(y, times'(x, y))
10's'(s'(s'(s'(s'(s'(s'(s'(s'(s'(0'))))))))))

Rewrite Strategy: INNERMOST


Sliced the following arguments:
entry'/0
entry'/1


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


table'gen'(s'(0'))
gen'(x) → if1'(le'(x, 10'), x)
if1'(false', x) → nil'
if1'(true', x) → if2'(x, x)
if2'(x, y) → if3'(le'(y, 10'), x, y)
if3'(true', x, y) → cons'(entry'(times'(x, y)), if2'(x, s'(y)))
if3'(false', x, y) → gen'(s'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
times'(0', y) → 0'
times'(s'(x), y) → plus'(y, times'(x, y))
10's'(s'(s'(s'(s'(s'(s'(s'(s'(s'(0'))))))))))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
table'gen'(s'(0'))
gen'(x) → if1'(le'(x, 10'), x)
if1'(false', x) → nil'
if1'(true', x) → if2'(x, x)
if2'(x, y) → if3'(le'(y, 10'), x, y)
if3'(true', x, y) → cons'(entry'(times'(x, y)), if2'(x, s'(y)))
if3'(false', x, y) → gen'(s'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
times'(0', y) → 0'
times'(s'(x), y) → plus'(y, times'(x, y))
10's'(s'(s'(s'(s'(s'(s'(s'(s'(s'(0'))))))))))

Types:
table' :: nil':cons'
gen' :: 0':s' → nil':cons'
s' :: 0':s' → 0':s'
0' :: 0':s'
if1' :: false':true' → 0':s' → nil':cons'
le' :: 0':s' → 0':s' → false':true'
10' :: 0':s'
false' :: false':true'
nil' :: nil':cons'
true' :: false':true'
if2' :: 0':s' → 0':s' → nil':cons'
if3' :: false':true' → 0':s' → 0':s' → nil':cons'
cons' :: entry' → nil':cons' → nil':cons'
entry' :: 0':s' → entry'
times' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
_hole_nil':cons'1 :: nil':cons'
_hole_0':s'2 :: 0':s'
_hole_false':true'3 :: false':true'
_hole_entry'4 :: entry'
_gen_nil':cons'5 :: Nat → nil':cons'
_gen_0':s'6 :: Nat → 0':s'


Heuristically decided to analyse the following defined symbols:
gen', le', if2', times', plus'

They will be analysed ascendingly in the following order:
le' < gen'
gen' = if2'
le' < if2'
times' < if2'
plus' < times'


Rules:
table'gen'(s'(0'))
gen'(x) → if1'(le'(x, 10'), x)
if1'(false', x) → nil'
if1'(true', x) → if2'(x, x)
if2'(x, y) → if3'(le'(y, 10'), x, y)
if3'(true', x, y) → cons'(entry'(times'(x, y)), if2'(x, s'(y)))
if3'(false', x, y) → gen'(s'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
times'(0', y) → 0'
times'(s'(x), y) → plus'(y, times'(x, y))
10's'(s'(s'(s'(s'(s'(s'(s'(s'(s'(0'))))))))))

Types:
table' :: nil':cons'
gen' :: 0':s' → nil':cons'
s' :: 0':s' → 0':s'
0' :: 0':s'
if1' :: false':true' → 0':s' → nil':cons'
le' :: 0':s' → 0':s' → false':true'
10' :: 0':s'
false' :: false':true'
nil' :: nil':cons'
true' :: false':true'
if2' :: 0':s' → 0':s' → nil':cons'
if3' :: false':true' → 0':s' → 0':s' → nil':cons'
cons' :: entry' → nil':cons' → nil':cons'
entry' :: 0':s' → entry'
times' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
_hole_nil':cons'1 :: nil':cons'
_hole_0':s'2 :: 0':s'
_hole_false':true'3 :: false':true'
_hole_entry'4 :: entry'
_gen_nil':cons'5 :: Nat → nil':cons'
_gen_0':s'6 :: Nat → 0':s'

Generator Equations:
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(entry'(0'), _gen_nil':cons'5(x))
_gen_0':s'6(0) ⇔ 0'
_gen_0':s'6(+(x, 1)) ⇔ s'(_gen_0':s'6(x))

The following defined symbols remain to be analysed:
le', gen', if2', times', plus'

They will be analysed ascendingly in the following order:
le' < gen'
gen' = if2'
le' < if2'
times' < if2'
plus' < times'


Proved the following rewrite lemma:
le'(_gen_0':s'6(_n8), _gen_0':s'6(_n8)) → true', rt ∈ Ω(1 + n8)

Induction Base:
le'(_gen_0':s'6(0), _gen_0':s'6(0)) →RΩ(1)
true'

Induction Step:
le'(_gen_0':s'6(+(_$n9, 1)), _gen_0':s'6(+(_$n9, 1))) →RΩ(1)
le'(_gen_0':s'6(_$n9), _gen_0':s'6(_$n9)) →IH
true'

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


Rules:
table'gen'(s'(0'))
gen'(x) → if1'(le'(x, 10'), x)
if1'(false', x) → nil'
if1'(true', x) → if2'(x, x)
if2'(x, y) → if3'(le'(y, 10'), x, y)
if3'(true', x, y) → cons'(entry'(times'(x, y)), if2'(x, s'(y)))
if3'(false', x, y) → gen'(s'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
times'(0', y) → 0'
times'(s'(x), y) → plus'(y, times'(x, y))
10's'(s'(s'(s'(s'(s'(s'(s'(s'(s'(0'))))))))))

Types:
table' :: nil':cons'
gen' :: 0':s' → nil':cons'
s' :: 0':s' → 0':s'
0' :: 0':s'
if1' :: false':true' → 0':s' → nil':cons'
le' :: 0':s' → 0':s' → false':true'
10' :: 0':s'
false' :: false':true'
nil' :: nil':cons'
true' :: false':true'
if2' :: 0':s' → 0':s' → nil':cons'
if3' :: false':true' → 0':s' → 0':s' → nil':cons'
cons' :: entry' → nil':cons' → nil':cons'
entry' :: 0':s' → entry'
times' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
_hole_nil':cons'1 :: nil':cons'
_hole_0':s'2 :: 0':s'
_hole_false':true'3 :: false':true'
_hole_entry'4 :: entry'
_gen_nil':cons'5 :: Nat → nil':cons'
_gen_0':s'6 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'6(_n8), _gen_0':s'6(_n8)) → true', rt ∈ Ω(1 + n8)

Generator Equations:
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(entry'(0'), _gen_nil':cons'5(x))
_gen_0':s'6(0) ⇔ 0'
_gen_0':s'6(+(x, 1)) ⇔ s'(_gen_0':s'6(x))

The following defined symbols remain to be analysed:
plus', gen', if2', times'

They will be analysed ascendingly in the following order:
gen' = if2'
times' < if2'
plus' < times'


Proved the following rewrite lemma:
plus'(_gen_0':s'6(_n642), _gen_0':s'6(b)) → _gen_0':s'6(+(_n642, b)), rt ∈ Ω(1 + n642)

Induction Base:
plus'(_gen_0':s'6(0), _gen_0':s'6(b)) →RΩ(1)
_gen_0':s'6(b)

Induction Step:
plus'(_gen_0':s'6(+(_$n643, 1)), _gen_0':s'6(_b865)) →RΩ(1)
s'(plus'(_gen_0':s'6(_$n643), _gen_0':s'6(_b865))) →IH
s'(_gen_0':s'6(+(_$n643, _b865)))

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


Rules:
table'gen'(s'(0'))
gen'(x) → if1'(le'(x, 10'), x)
if1'(false', x) → nil'
if1'(true', x) → if2'(x, x)
if2'(x, y) → if3'(le'(y, 10'), x, y)
if3'(true', x, y) → cons'(entry'(times'(x, y)), if2'(x, s'(y)))
if3'(false', x, y) → gen'(s'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
times'(0', y) → 0'
times'(s'(x), y) → plus'(y, times'(x, y))
10's'(s'(s'(s'(s'(s'(s'(s'(s'(s'(0'))))))))))

Types:
table' :: nil':cons'
gen' :: 0':s' → nil':cons'
s' :: 0':s' → 0':s'
0' :: 0':s'
if1' :: false':true' → 0':s' → nil':cons'
le' :: 0':s' → 0':s' → false':true'
10' :: 0':s'
false' :: false':true'
nil' :: nil':cons'
true' :: false':true'
if2' :: 0':s' → 0':s' → nil':cons'
if3' :: false':true' → 0':s' → 0':s' → nil':cons'
cons' :: entry' → nil':cons' → nil':cons'
entry' :: 0':s' → entry'
times' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
_hole_nil':cons'1 :: nil':cons'
_hole_0':s'2 :: 0':s'
_hole_false':true'3 :: false':true'
_hole_entry'4 :: entry'
_gen_nil':cons'5 :: Nat → nil':cons'
_gen_0':s'6 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'6(_n8), _gen_0':s'6(_n8)) → true', rt ∈ Ω(1 + n8)
plus'(_gen_0':s'6(_n642), _gen_0':s'6(b)) → _gen_0':s'6(+(_n642, b)), rt ∈ Ω(1 + n642)

Generator Equations:
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(entry'(0'), _gen_nil':cons'5(x))
_gen_0':s'6(0) ⇔ 0'
_gen_0':s'6(+(x, 1)) ⇔ s'(_gen_0':s'6(x))

The following defined symbols remain to be analysed:
times', gen', if2'

They will be analysed ascendingly in the following order:
gen' = if2'
times' < if2'


Proved the following rewrite lemma:
times'(_gen_0':s'6(_n1577), _gen_0':s'6(b)) → _gen_0':s'6(*(_n1577, b)), rt ∈ Ω(1 + b1981·n1577 + n1577)

Induction Base:
times'(_gen_0':s'6(0), _gen_0':s'6(b)) →RΩ(1)
0'

Induction Step:
times'(_gen_0':s'6(+(_$n1578, 1)), _gen_0':s'6(_b1981)) →RΩ(1)
plus'(_gen_0':s'6(_b1981), times'(_gen_0':s'6(_$n1578), _gen_0':s'6(_b1981))) →IH
plus'(_gen_0':s'6(_b1981), _gen_0':s'6(*(_$n1578, _b1981))) →LΩ(1 + b1981)
_gen_0':s'6(+(_b1981, *(_$n1578, _b1981)))

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


Rules:
table'gen'(s'(0'))
gen'(x) → if1'(le'(x, 10'), x)
if1'(false', x) → nil'
if1'(true', x) → if2'(x, x)
if2'(x, y) → if3'(le'(y, 10'), x, y)
if3'(true', x, y) → cons'(entry'(times'(x, y)), if2'(x, s'(y)))
if3'(false', x, y) → gen'(s'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
times'(0', y) → 0'
times'(s'(x), y) → plus'(y, times'(x, y))
10's'(s'(s'(s'(s'(s'(s'(s'(s'(s'(0'))))))))))

Types:
table' :: nil':cons'
gen' :: 0':s' → nil':cons'
s' :: 0':s' → 0':s'
0' :: 0':s'
if1' :: false':true' → 0':s' → nil':cons'
le' :: 0':s' → 0':s' → false':true'
10' :: 0':s'
false' :: false':true'
nil' :: nil':cons'
true' :: false':true'
if2' :: 0':s' → 0':s' → nil':cons'
if3' :: false':true' → 0':s' → 0':s' → nil':cons'
cons' :: entry' → nil':cons' → nil':cons'
entry' :: 0':s' → entry'
times' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
_hole_nil':cons'1 :: nil':cons'
_hole_0':s'2 :: 0':s'
_hole_false':true'3 :: false':true'
_hole_entry'4 :: entry'
_gen_nil':cons'5 :: Nat → nil':cons'
_gen_0':s'6 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'6(_n8), _gen_0':s'6(_n8)) → true', rt ∈ Ω(1 + n8)
plus'(_gen_0':s'6(_n642), _gen_0':s'6(b)) → _gen_0':s'6(+(_n642, b)), rt ∈ Ω(1 + n642)
times'(_gen_0':s'6(_n1577), _gen_0':s'6(b)) → _gen_0':s'6(*(_n1577, b)), rt ∈ Ω(1 + b1981·n1577 + n1577)

Generator Equations:
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(entry'(0'), _gen_nil':cons'5(x))
_gen_0':s'6(0) ⇔ 0'
_gen_0':s'6(+(x, 1)) ⇔ s'(_gen_0':s'6(x))

The following defined symbols remain to be analysed:
if2', gen'

They will be analysed ascendingly in the following order:
gen' = if2'


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


Rules:
table'gen'(s'(0'))
gen'(x) → if1'(le'(x, 10'), x)
if1'(false', x) → nil'
if1'(true', x) → if2'(x, x)
if2'(x, y) → if3'(le'(y, 10'), x, y)
if3'(true', x, y) → cons'(entry'(times'(x, y)), if2'(x, s'(y)))
if3'(false', x, y) → gen'(s'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
times'(0', y) → 0'
times'(s'(x), y) → plus'(y, times'(x, y))
10's'(s'(s'(s'(s'(s'(s'(s'(s'(s'(0'))))))))))

Types:
table' :: nil':cons'
gen' :: 0':s' → nil':cons'
s' :: 0':s' → 0':s'
0' :: 0':s'
if1' :: false':true' → 0':s' → nil':cons'
le' :: 0':s' → 0':s' → false':true'
10' :: 0':s'
false' :: false':true'
nil' :: nil':cons'
true' :: false':true'
if2' :: 0':s' → 0':s' → nil':cons'
if3' :: false':true' → 0':s' → 0':s' → nil':cons'
cons' :: entry' → nil':cons' → nil':cons'
entry' :: 0':s' → entry'
times' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
_hole_nil':cons'1 :: nil':cons'
_hole_0':s'2 :: 0':s'
_hole_false':true'3 :: false':true'
_hole_entry'4 :: entry'
_gen_nil':cons'5 :: Nat → nil':cons'
_gen_0':s'6 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'6(_n8), _gen_0':s'6(_n8)) → true', rt ∈ Ω(1 + n8)
plus'(_gen_0':s'6(_n642), _gen_0':s'6(b)) → _gen_0':s'6(+(_n642, b)), rt ∈ Ω(1 + n642)
times'(_gen_0':s'6(_n1577), _gen_0':s'6(b)) → _gen_0':s'6(*(_n1577, b)), rt ∈ Ω(1 + b1981·n1577 + n1577)

Generator Equations:
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(entry'(0'), _gen_nil':cons'5(x))
_gen_0':s'6(0) ⇔ 0'
_gen_0':s'6(+(x, 1)) ⇔ s'(_gen_0':s'6(x))

The following defined symbols remain to be analysed:
gen'

They will be analysed ascendingly in the following order:
gen' = if2'


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


Rules:
table'gen'(s'(0'))
gen'(x) → if1'(le'(x, 10'), x)
if1'(false', x) → nil'
if1'(true', x) → if2'(x, x)
if2'(x, y) → if3'(le'(y, 10'), x, y)
if3'(true', x, y) → cons'(entry'(times'(x, y)), if2'(x, s'(y)))
if3'(false', x, y) → gen'(s'(x))
le'(0', y) → true'
le'(s'(x), 0') → false'
le'(s'(x), s'(y)) → le'(x, y)
plus'(0', y) → y
plus'(s'(x), y) → s'(plus'(x, y))
times'(0', y) → 0'
times'(s'(x), y) → plus'(y, times'(x, y))
10's'(s'(s'(s'(s'(s'(s'(s'(s'(s'(0'))))))))))

Types:
table' :: nil':cons'
gen' :: 0':s' → nil':cons'
s' :: 0':s' → 0':s'
0' :: 0':s'
if1' :: false':true' → 0':s' → nil':cons'
le' :: 0':s' → 0':s' → false':true'
10' :: 0':s'
false' :: false':true'
nil' :: nil':cons'
true' :: false':true'
if2' :: 0':s' → 0':s' → nil':cons'
if3' :: false':true' → 0':s' → 0':s' → nil':cons'
cons' :: entry' → nil':cons' → nil':cons'
entry' :: 0':s' → entry'
times' :: 0':s' → 0':s' → 0':s'
plus' :: 0':s' → 0':s' → 0':s'
_hole_nil':cons'1 :: nil':cons'
_hole_0':s'2 :: 0':s'
_hole_false':true'3 :: false':true'
_hole_entry'4 :: entry'
_gen_nil':cons'5 :: Nat → nil':cons'
_gen_0':s'6 :: Nat → 0':s'

Lemmas:
le'(_gen_0':s'6(_n8), _gen_0':s'6(_n8)) → true', rt ∈ Ω(1 + n8)
plus'(_gen_0':s'6(_n642), _gen_0':s'6(b)) → _gen_0':s'6(+(_n642, b)), rt ∈ Ω(1 + n642)
times'(_gen_0':s'6(_n1577), _gen_0':s'6(b)) → _gen_0':s'6(*(_n1577, b)), rt ∈ Ω(1 + b1981·n1577 + n1577)

Generator Equations:
_gen_nil':cons'5(0) ⇔ nil'
_gen_nil':cons'5(+(x, 1)) ⇔ cons'(entry'(0'), _gen_nil':cons'5(x))
_gen_0':s'6(0) ⇔ 0'
_gen_0':s'6(+(x, 1)) ⇔ s'(_gen_0':s'6(x))

No more defined symbols left to analyse.


The lowerbound Ω(n2) was proven with the following lemma:
times'(_gen_0':s'6(_n1577), _gen_0':s'6(b)) → _gen_0':s'6(*(_n1577, b)), rt ∈ Ω(1 + b1981·n1577 + n1577)