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

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

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

Rewrite Strategy: INNERMOST

Infered types.

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

Types:

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

They will be analysed ascendingly in the following order:
activate' = from'

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

Types:

Generator Equations:

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

They will be analysed ascendingly in the following order:
activate' = from'

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

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

Types:

Generator Equations:

The following defined symbols remain to be analysed:
activate'

They will be analysed ascendingly in the following order:
activate' = from'

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

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

Types: