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

a(h, h, h, x) → s(x)
a(l, x, s(y), h) → a(l, x, y, s(h))
a(l, x, s(y), s(z)) → a(l, x, y, a(l, x, s(y), z))
a(l, s(x), h, z) → a(l, x, z, z)
a(s(l), h, h, z) → a(l, z, h, z)
+(x, h) → x
+(h, x) → x
+(s(x), s(y)) → s(s(+(x, y)))
+(+(x, y), z) → +(x, +(y, z))
s(h) → 1
app(nil, k) → k
app(l, nil) → l
app(cons(x, l), k) → cons(x, app(l, k))
sum(cons(x, nil)) → cons(x, nil)
sum(cons(x, cons(y, l))) → sum(cons(a(x, y, h, h), l))

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


a'(h', h', h', x) → s'(x)
a'(l, x, s'(y), h') → a'(l, x, y, s'(h'))
a'(l, x, s'(y), s'(z)) → a'(l, x, y, a'(l, x, s'(y), z))
a'(l, s'(x), h', z) → a'(l, x, z, z)
a'(s'(l), h', h', z) → a'(l, z, h', z)
+'(x, h') → x
+'(h', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s'(h') → 1'
app'(nil', k) → k
app'(l, nil') → l
app'(cons'(x, l), k) → cons'(x, app'(l, k))
sum'(cons'(x, nil')) → cons'(x, nil')
sum'(cons'(x, cons'(y, l))) → sum'(cons'(a'(x, y, h', h'), l))

Rewrite Strategy: INNERMOST


Infered types.


Rules:
a'(h', h', h', x) → s'(x)
a'(l, x, s'(y), h') → a'(l, x, y, s'(h'))
a'(l, x, s'(y), s'(z)) → a'(l, x, y, a'(l, x, s'(y), z))
a'(l, s'(x), h', z) → a'(l, x, z, z)
a'(s'(l), h', h', z) → a'(l, z, h', z)
+'(x, h') → x
+'(h', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s'(h') → 1'
app'(nil', k) → k
app'(l, nil') → l
app'(cons'(x, l), k) → cons'(x, app'(l, k))
sum'(cons'(x, nil')) → cons'(x, nil')
sum'(cons'(x, cons'(y, l))) → sum'(cons'(a'(x, y, h', h'), l))

Types:
a' :: h':1' → h':1' → h':1' → h':1' → h':1'
h' :: h':1'
s' :: h':1' → h':1'
+' :: h':1' → h':1' → h':1'
1' :: h':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: h':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → nil':cons'
_hole_h':1'1 :: h':1'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'


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

They will be analysed ascendingly in the following order:
a' < sum'


Rules:
a'(h', h', h', x) → s'(x)
a'(l, x, s'(y), h') → a'(l, x, y, s'(h'))
a'(l, x, s'(y), s'(z)) → a'(l, x, y, a'(l, x, s'(y), z))
a'(l, s'(x), h', z) → a'(l, x, z, z)
a'(s'(l), h', h', z) → a'(l, z, h', z)
+'(x, h') → x
+'(h', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s'(h') → 1'
app'(nil', k) → k
app'(l, nil') → l
app'(cons'(x, l), k) → cons'(x, app'(l, k))
sum'(cons'(x, nil')) → cons'(x, nil')
sum'(cons'(x, cons'(y, l))) → sum'(cons'(a'(x, y, h', h'), l))

Types:
a' :: h':1' → h':1' → h':1' → h':1' → h':1'
h' :: h':1'
s' :: h':1' → h':1'
+' :: h':1' → h':1' → h':1'
1' :: h':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: h':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → nil':cons'
_hole_h':1'1 :: h':1'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'

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

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

They will be analysed ascendingly in the following order:
a' < sum'


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


Rules:
a'(h', h', h', x) → s'(x)
a'(l, x, s'(y), h') → a'(l, x, y, s'(h'))
a'(l, x, s'(y), s'(z)) → a'(l, x, y, a'(l, x, s'(y), z))
a'(l, s'(x), h', z) → a'(l, x, z, z)
a'(s'(l), h', h', z) → a'(l, z, h', z)
+'(x, h') → x
+'(h', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s'(h') → 1'
app'(nil', k) → k
app'(l, nil') → l
app'(cons'(x, l), k) → cons'(x, app'(l, k))
sum'(cons'(x, nil')) → cons'(x, nil')
sum'(cons'(x, cons'(y, l))) → sum'(cons'(a'(x, y, h', h'), l))

Types:
a' :: h':1' → h':1' → h':1' → h':1' → h':1'
h' :: h':1'
s' :: h':1' → h':1'
+' :: h':1' → h':1' → h':1'
1' :: h':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: h':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → nil':cons'
_hole_h':1'1 :: h':1'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'

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

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


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


Rules:
a'(h', h', h', x) → s'(x)
a'(l, x, s'(y), h') → a'(l, x, y, s'(h'))
a'(l, x, s'(y), s'(z)) → a'(l, x, y, a'(l, x, s'(y), z))
a'(l, s'(x), h', z) → a'(l, x, z, z)
a'(s'(l), h', h', z) → a'(l, z, h', z)
+'(x, h') → x
+'(h', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s'(h') → 1'
app'(nil', k) → k
app'(l, nil') → l
app'(cons'(x, l), k) → cons'(x, app'(l, k))
sum'(cons'(x, nil')) → cons'(x, nil')
sum'(cons'(x, cons'(y, l))) → sum'(cons'(a'(x, y, h', h'), l))

Types:
a' :: h':1' → h':1' → h':1' → h':1' → h':1'
h' :: h':1'
s' :: h':1' → h':1'
+' :: h':1' → h':1' → h':1'
1' :: h':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: h':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → nil':cons'
_hole_h':1'1 :: h':1'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'

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

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


Proved the following rewrite lemma:
app'(_gen_nil':cons'3(_n331), _gen_nil':cons'3(b)) → _gen_nil':cons'3(+(_n331, b)), rt ∈ Ω(1 + n331)

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

Induction Step:
app'(_gen_nil':cons'3(+(_$n332, 1)), _gen_nil':cons'3(_b488)) →RΩ(1)
cons'(h', app'(_gen_nil':cons'3(_$n332), _gen_nil':cons'3(_b488))) →IH
cons'(h', _gen_nil':cons'3(+(_$n332, _b488)))

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


Rules:
a'(h', h', h', x) → s'(x)
a'(l, x, s'(y), h') → a'(l, x, y, s'(h'))
a'(l, x, s'(y), s'(z)) → a'(l, x, y, a'(l, x, s'(y), z))
a'(l, s'(x), h', z) → a'(l, x, z, z)
a'(s'(l), h', h', z) → a'(l, z, h', z)
+'(x, h') → x
+'(h', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s'(h') → 1'
app'(nil', k) → k
app'(l, nil') → l
app'(cons'(x, l), k) → cons'(x, app'(l, k))
sum'(cons'(x, nil')) → cons'(x, nil')
sum'(cons'(x, cons'(y, l))) → sum'(cons'(a'(x, y, h', h'), l))

Types:
a' :: h':1' → h':1' → h':1' → h':1' → h':1'
h' :: h':1'
s' :: h':1' → h':1'
+' :: h':1' → h':1' → h':1'
1' :: h':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: h':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → nil':cons'
_hole_h':1'1 :: h':1'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'

Lemmas:
app'(_gen_nil':cons'3(_n331), _gen_nil':cons'3(b)) → _gen_nil':cons'3(+(_n331, b)), rt ∈ Ω(1 + n331)

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

The following defined symbols remain to be analysed:
sum'


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

The following conjecture could not be proven:

sum'(_gen_nil':cons'3(+(1, _n1426))) →? _*4


Rules:
a'(h', h', h', x) → s'(x)
a'(l, x, s'(y), h') → a'(l, x, y, s'(h'))
a'(l, x, s'(y), s'(z)) → a'(l, x, y, a'(l, x, s'(y), z))
a'(l, s'(x), h', z) → a'(l, x, z, z)
a'(s'(l), h', h', z) → a'(l, z, h', z)
+'(x, h') → x
+'(h', x) → x
+'(s'(x), s'(y)) → s'(s'(+'(x, y)))
+'(+'(x, y), z) → +'(x, +'(y, z))
s'(h') → 1'
app'(nil', k) → k
app'(l, nil') → l
app'(cons'(x, l), k) → cons'(x, app'(l, k))
sum'(cons'(x, nil')) → cons'(x, nil')
sum'(cons'(x, cons'(y, l))) → sum'(cons'(a'(x, y, h', h'), l))

Types:
a' :: h':1' → h':1' → h':1' → h':1' → h':1'
h' :: h':1'
s' :: h':1' → h':1'
+' :: h':1' → h':1' → h':1'
1' :: h':1'
app' :: nil':cons' → nil':cons' → nil':cons'
nil' :: nil':cons'
cons' :: h':1' → nil':cons' → nil':cons'
sum' :: nil':cons' → nil':cons'
_hole_h':1'1 :: h':1'
_hole_nil':cons'2 :: nil':cons'
_gen_nil':cons'3 :: Nat → nil':cons'

Lemmas:
app'(_gen_nil':cons'3(_n331), _gen_nil':cons'3(b)) → _gen_nil':cons'3(+(_n331, b)), rt ∈ Ω(1 + n331)

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

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
app'(_gen_nil':cons'3(_n331), _gen_nil':cons'3(b)) → _gen_nil':cons'3(+(_n331, b)), rt ∈ Ω(1 + n331)