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

f(X) → cons(X, n__f(g(X)))
g(0) → s(0)
g(s(X)) → s(s(g(X)))
sel(0, cons(X, Y)) → X
sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
f(X) → n__f(X)
activate(n__f(X)) → f(X)
activate(X) → X

Rewrite Strategy: INNERMOST


Renamed function symbols to avoid clashes with predefined symbol.


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


f'(X) → cons'(X, n__f'(g'(X)))
g'(0') → s'(0')
g'(s'(X)) → s'(s'(g'(X)))
sel'(0', cons'(X, Y)) → X
sel'(s'(X), cons'(Y, Z)) → sel'(X, activate'(Z))
f'(X) → n__f'(X)
activate'(n__f'(X)) → f'(X)
activate'(X) → X

Rewrite Strategy: INNERMOST


Infered types.


Rules:
f'(X) → cons'(X, n__f'(g'(X)))
g'(0') → s'(0')
g'(s'(X)) → s'(s'(g'(X)))
sel'(0', cons'(X, Y)) → X
sel'(s'(X), cons'(Y, Z)) → sel'(X, activate'(Z))
f'(X) → n__f'(X)
activate'(n__f'(X)) → f'(X)
activate'(X) → X

Types:
f' :: 0':s' → n__f':cons'
cons' :: 0':s' → n__f':cons' → n__f':cons'
n__f' :: 0':s' → n__f':cons'
g' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
sel' :: 0':s' → n__f':cons' → 0':s'
activate' :: n__f':cons' → n__f':cons'
_hole_n__f':cons'1 :: n__f':cons'
_hole_0':s'2 :: 0':s'
_gen_n__f':cons'3 :: Nat → n__f':cons'
_gen_0':s'4 :: Nat → 0':s'


Heuristically decided to analyse the following defined symbols:
g', sel'


Rules:
f'(X) → cons'(X, n__f'(g'(X)))
g'(0') → s'(0')
g'(s'(X)) → s'(s'(g'(X)))
sel'(0', cons'(X, Y)) → X
sel'(s'(X), cons'(Y, Z)) → sel'(X, activate'(Z))
f'(X) → n__f'(X)
activate'(n__f'(X)) → f'(X)
activate'(X) → X

Types:
f' :: 0':s' → n__f':cons'
cons' :: 0':s' → n__f':cons' → n__f':cons'
n__f' :: 0':s' → n__f':cons'
g' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
sel' :: 0':s' → n__f':cons' → 0':s'
activate' :: n__f':cons' → n__f':cons'
_hole_n__f':cons'1 :: n__f':cons'
_hole_0':s'2 :: 0':s'
_gen_n__f':cons'3 :: Nat → n__f':cons'
_gen_0':s'4 :: Nat → 0':s'

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

The following defined symbols remain to be analysed:
g', sel'


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

Induction Base:
g'(_gen_0':s'4(0)) →RΩ(1)
s'(0')

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

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


Rules:
f'(X) → cons'(X, n__f'(g'(X)))
g'(0') → s'(0')
g'(s'(X)) → s'(s'(g'(X)))
sel'(0', cons'(X, Y)) → X
sel'(s'(X), cons'(Y, Z)) → sel'(X, activate'(Z))
f'(X) → n__f'(X)
activate'(n__f'(X)) → f'(X)
activate'(X) → X

Types:
f' :: 0':s' → n__f':cons'
cons' :: 0':s' → n__f':cons' → n__f':cons'
n__f' :: 0':s' → n__f':cons'
g' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
sel' :: 0':s' → n__f':cons' → 0':s'
activate' :: n__f':cons' → n__f':cons'
_hole_n__f':cons'1 :: n__f':cons'
_hole_0':s'2 :: 0':s'
_gen_n__f':cons'3 :: Nat → n__f':cons'
_gen_0':s'4 :: Nat → 0':s'

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

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

The following defined symbols remain to be analysed:
sel'


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

The following conjecture could not be proven:

sel'(_gen_0':s'4(_n400), _gen_n__f':cons'3(1)) →? _*5


Rules:
f'(X) → cons'(X, n__f'(g'(X)))
g'(0') → s'(0')
g'(s'(X)) → s'(s'(g'(X)))
sel'(0', cons'(X, Y)) → X
sel'(s'(X), cons'(Y, Z)) → sel'(X, activate'(Z))
f'(X) → n__f'(X)
activate'(n__f'(X)) → f'(X)
activate'(X) → X

Types:
f' :: 0':s' → n__f':cons'
cons' :: 0':s' → n__f':cons' → n__f':cons'
n__f' :: 0':s' → n__f':cons'
g' :: 0':s' → 0':s'
0' :: 0':s'
s' :: 0':s' → 0':s'
sel' :: 0':s' → n__f':cons' → 0':s'
activate' :: n__f':cons' → n__f':cons'
_hole_n__f':cons'1 :: n__f':cons'
_hole_0':s'2 :: 0':s'
_gen_n__f':cons'3 :: Nat → n__f':cons'
_gen_0':s'4 :: Nat → 0':s'

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

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

No more defined symbols left to analyse.


The lowerbound Ω(n) was proven with the following lemma:
g'(_gen_0':s'4(_n6)) → _gen_0':s'4(+(1, *(2, _n6))), rt ∈ Ω(1 + n6)