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

from(X) → cons(X, n__from(n__s(X)))
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
sel(0, cons(X, Z)) → X
sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
from(X) → n__from(X)
s(X) → n__s(X)
first(X1, X2) → n__first(X1, X2)
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
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:

from'(X) → cons'(X, n__from'(n__s'(X)))
first'(0', Z) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
sel'(0', cons'(X, Z)) → X
sel'(s'(X), cons'(Y, Z)) → sel'(X, activate'(Z))
from'(X) → n__from'(X)
s'(X) → n__s'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__from'(X)) → from'(activate'(X))
activate'(n__s'(X)) → s'(activate'(X))
activate'(n__first'(X1, X2)) → first'(activate'(X1), activate'(X2))
activate'(X) → X

Rewrite Strategy: INNERMOST

Infered types.

Rules:
from'(X) → cons'(X, n__from'(n__s'(X)))
first'(0', Z) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
sel'(0', cons'(X, Z)) → X
sel'(s'(X), cons'(Y, Z)) → sel'(X, activate'(Z))
from'(X) → n__from'(X)
s'(X) → n__s'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__from'(X)) → from'(activate'(X))
activate'(n__s'(X)) → s'(activate'(X))
activate'(n__first'(X1, X2)) → first'(activate'(X1), activate'(X2))
activate'(X) → X

Types:
from' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
cons' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__from' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__s' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
first' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
0' :: n__s':n__from':cons':0':nil':n__first'
nil' :: n__s':n__from':cons':0':nil':n__first'
s' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__first' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
activate' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
sel' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
_hole_n__s':n__from':cons':0':nil':n__first'1 :: n__s':n__from':cons':0':nil':n__first'
_gen_n__s':n__from':cons':0':nil':n__first'2 :: Nat → n__s':n__from':cons':0':nil':n__first'

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

They will be analysed ascendingly in the following order:
activate' < sel'

Rules:
from'(X) → cons'(X, n__from'(n__s'(X)))
first'(0', Z) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
sel'(0', cons'(X, Z)) → X
sel'(s'(X), cons'(Y, Z)) → sel'(X, activate'(Z))
from'(X) → n__from'(X)
s'(X) → n__s'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__from'(X)) → from'(activate'(X))
activate'(n__s'(X)) → s'(activate'(X))
activate'(n__first'(X1, X2)) → first'(activate'(X1), activate'(X2))
activate'(X) → X

Types:
from' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
cons' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__from' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__s' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
first' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
0' :: n__s':n__from':cons':0':nil':n__first'
nil' :: n__s':n__from':cons':0':nil':n__first'
s' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__first' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
activate' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
sel' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
_hole_n__s':n__from':cons':0':nil':n__first'1 :: n__s':n__from':cons':0':nil':n__first'
_gen_n__s':n__from':cons':0':nil':n__first'2 :: Nat → n__s':n__from':cons':0':nil':n__first'

Generator Equations:
_gen_n__s':n__from':cons':0':nil':n__first'2(0) ⇔ 0'
_gen_n__s':n__from':cons':0':nil':n__first'2(+(x, 1)) ⇔ cons'(0', _gen_n__s':n__from':cons':0':nil':n__first'2(x))

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

They will be analysed ascendingly in the following order:
activate' < sel'

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

Rules:
from'(X) → cons'(X, n__from'(n__s'(X)))
first'(0', Z) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
sel'(0', cons'(X, Z)) → X
sel'(s'(X), cons'(Y, Z)) → sel'(X, activate'(Z))
from'(X) → n__from'(X)
s'(X) → n__s'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__from'(X)) → from'(activate'(X))
activate'(n__s'(X)) → s'(activate'(X))
activate'(n__first'(X1, X2)) → first'(activate'(X1), activate'(X2))
activate'(X) → X

Types:
from' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
cons' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__from' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__s' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
first' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
0' :: n__s':n__from':cons':0':nil':n__first'
nil' :: n__s':n__from':cons':0':nil':n__first'
s' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__first' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
activate' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
sel' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
_hole_n__s':n__from':cons':0':nil':n__first'1 :: n__s':n__from':cons':0':nil':n__first'
_gen_n__s':n__from':cons':0':nil':n__first'2 :: Nat → n__s':n__from':cons':0':nil':n__first'

Generator Equations:
_gen_n__s':n__from':cons':0':nil':n__first'2(0) ⇔ 0'
_gen_n__s':n__from':cons':0':nil':n__first'2(+(x, 1)) ⇔ cons'(0', _gen_n__s':n__from':cons':0':nil':n__first'2(x))

The following defined symbols remain to be analysed:
sel'

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

Rules:
from'(X) → cons'(X, n__from'(n__s'(X)))
first'(0', Z) → nil'
first'(s'(X), cons'(Y, Z)) → cons'(Y, n__first'(X, activate'(Z)))
sel'(0', cons'(X, Z)) → X
sel'(s'(X), cons'(Y, Z)) → sel'(X, activate'(Z))
from'(X) → n__from'(X)
s'(X) → n__s'(X)
first'(X1, X2) → n__first'(X1, X2)
activate'(n__from'(X)) → from'(activate'(X))
activate'(n__s'(X)) → s'(activate'(X))
activate'(n__first'(X1, X2)) → first'(activate'(X1), activate'(X2))
activate'(X) → X

Types:
from' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
cons' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__from' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__s' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
first' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
0' :: n__s':n__from':cons':0':nil':n__first'
nil' :: n__s':n__from':cons':0':nil':n__first'
s' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
n__first' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
activate' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
sel' :: n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first' → n__s':n__from':cons':0':nil':n__first'
_hole_n__s':n__from':cons':0':nil':n__first'1 :: n__s':n__from':cons':0':nil':n__first'
_gen_n__s':n__from':cons':0':nil':n__first'2 :: Nat → n__s':n__from':cons':0':nil':n__first'

Generator Equations:
_gen_n__s':n__from':cons':0':nil':n__first'2(0) ⇔ 0'
_gen_n__s':n__from':cons':0':nil':n__first'2(+(x, 1)) ⇔ cons'(0', _gen_n__s':n__from':cons':0':nil':n__first'2(x))

No more defined symbols left to analyse.