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

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


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

Rewrite Strategy: INNERMOST


Sliced the following arguments:
cons'/0
from'/0
n__from'/0


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


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

Rewrite Strategy: INNERMOST


Infered types.


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

Types:
first' :: 0':s' → nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
0' :: 0':s'
nil' :: nil':cons':n__first':n__from'
s' :: 0':s' → 0':s'
cons' :: nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
n__first' :: 0':s' → nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
activate' :: nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
from' :: nil':cons':n__first':n__from'
n__from' :: nil':cons':n__first':n__from'
_hole_nil':cons':n__first':n__from'1 :: nil':cons':n__first':n__from'
_hole_0':s'2 :: 0':s'
_gen_nil':cons':n__first':n__from'3 :: Nat → nil':cons':n__first':n__from'
_gen_0':s'4 :: Nat → 0':s'


Heuristically decided to analyse the following defined symbols:
activate'


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

Types:
first' :: 0':s' → nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
0' :: 0':s'
nil' :: nil':cons':n__first':n__from'
s' :: 0':s' → 0':s'
cons' :: nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
n__first' :: 0':s' → nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
activate' :: nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
from' :: nil':cons':n__first':n__from'
n__from' :: nil':cons':n__first':n__from'
_hole_nil':cons':n__first':n__from'1 :: nil':cons':n__first':n__from'
_hole_0':s'2 :: 0':s'
_gen_nil':cons':n__first':n__from'3 :: Nat → nil':cons':n__first':n__from'
_gen_0':s'4 :: Nat → 0':s'

Generator Equations:
_gen_nil':cons':n__first':n__from'3(0) ⇔ n__from'
_gen_nil':cons':n__first':n__from'3(+(x, 1)) ⇔ cons'(_gen_nil':cons':n__first':n__from'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:
activate'


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


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

Types:
first' :: 0':s' → nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
0' :: 0':s'
nil' :: nil':cons':n__first':n__from'
s' :: 0':s' → 0':s'
cons' :: nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
n__first' :: 0':s' → nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
activate' :: nil':cons':n__first':n__from' → nil':cons':n__first':n__from'
from' :: nil':cons':n__first':n__from'
n__from' :: nil':cons':n__first':n__from'
_hole_nil':cons':n__first':n__from'1 :: nil':cons':n__first':n__from'
_hole_0':s'2 :: 0':s'
_gen_nil':cons':n__first':n__from'3 :: Nat → nil':cons':n__first':n__from'
_gen_0':s'4 :: Nat → 0':s'

Generator Equations:
_gen_nil':cons':n__first':n__from'3(0) ⇔ n__from'
_gen_nil':cons':n__first':n__from'3(+(x, 1)) ⇔ cons'(_gen_nil':cons':n__first':n__from'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.