### (0) Obligation:

The Runtime Complexity (full) of the given CpxTRS could be proven to be BOUNDS(1, n^1).

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: FULL

### (1) RcToIrcProof (BOTH BOUNDS(ID, ID) transformation)

Converted rc-obligation to irc-obligation.

As the TRS does not nest defined symbols, we have rc = irc.

### (2) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^1).

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

### (3) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

### (4) Obligation:

Complexity Dependency Tuples Problem
Rules:

first(0, z0) → nil
first(s(z0), cons(z1, z2)) → cons(z1, n__first(z0, activate(z2)))
first(z0, z1) → n__first(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
activate(n__first(z0, z1)) → first(z0, z1)
activate(n__from(z0)) → from(z0)
activate(z0) → z0
Tuples:

FIRST(0, z0) → c
FIRST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z2))
FIRST(z0, z1) → c2
FROM(z0) → c3
FROM(z0) → c4
ACTIVATE(n__first(z0, z1)) → c5(FIRST(z0, z1))
ACTIVATE(n__from(z0)) → c6(FROM(z0))
ACTIVATE(z0) → c7
S tuples:

FIRST(0, z0) → c
FIRST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z2))
FIRST(z0, z1) → c2
FROM(z0) → c3
FROM(z0) → c4
ACTIVATE(n__first(z0, z1)) → c5(FIRST(z0, z1))
ACTIVATE(n__from(z0)) → c6(FROM(z0))
ACTIVATE(z0) → c7
K tuples:none
Defined Rule Symbols:

first, from, activate

Defined Pair Symbols:

FIRST, FROM, ACTIVATE

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7

### (5) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 6 trailing nodes:

ACTIVATE(n__from(z0)) → c6(FROM(z0))
FIRST(0, z0) → c
FROM(z0) → c4
FROM(z0) → c3
ACTIVATE(z0) → c7
FIRST(z0, z1) → c2

### (6) Obligation:

Complexity Dependency Tuples Problem
Rules:

first(0, z0) → nil
first(s(z0), cons(z1, z2)) → cons(z1, n__first(z0, activate(z2)))
first(z0, z1) → n__first(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
activate(n__first(z0, z1)) → first(z0, z1)
activate(n__from(z0)) → from(z0)
activate(z0) → z0
Tuples:

FIRST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z2))
ACTIVATE(n__first(z0, z1)) → c5(FIRST(z0, z1))
S tuples:

FIRST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z2))
ACTIVATE(n__first(z0, z1)) → c5(FIRST(z0, z1))
K tuples:none
Defined Rule Symbols:

first, from, activate

Defined Pair Symbols:

FIRST, ACTIVATE

Compound Symbols:

c1, c5

### (7) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

first(0, z0) → nil
first(s(z0), cons(z1, z2)) → cons(z1, n__first(z0, activate(z2)))
first(z0, z1) → n__first(z0, z1)
from(z0) → cons(z0, n__from(s(z0)))
from(z0) → n__from(z0)
activate(n__first(z0, z1)) → first(z0, z1)
activate(n__from(z0)) → from(z0)
activate(z0) → z0

### (8) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

FIRST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z2))
ACTIVATE(n__first(z0, z1)) → c5(FIRST(z0, z1))
S tuples:

FIRST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z2))
ACTIVATE(n__first(z0, z1)) → c5(FIRST(z0, z1))
K tuples:none
Defined Rule Symbols:none

Defined Pair Symbols:

FIRST, ACTIVATE

Compound Symbols:

c1, c5

### (9) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

FIRST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z2))
ACTIVATE(n__first(z0, z1)) → c5(FIRST(z0, z1))
We considered the (Usable) Rules:none
And the Tuples:

FIRST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z2))
ACTIVATE(n__first(z0, z1)) → c5(FIRST(z0, z1))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(ACTIVATE(x1)) = x1
POL(FIRST(x1, x2)) = x1 + x2
POL(c1(x1)) = x1
POL(c5(x1)) = x1
POL(cons(x1, x2)) = x2
POL(n__first(x1, x2)) = [1] + x1 + x2
POL(s(x1)) = [1]

### (10) Obligation:

Complexity Dependency Tuples Problem
Rules:none
Tuples:

FIRST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z2))
ACTIVATE(n__first(z0, z1)) → c5(FIRST(z0, z1))
S tuples:none
K tuples:

FIRST(s(z0), cons(z1, z2)) → c1(ACTIVATE(z2))
ACTIVATE(n__first(z0, z1)) → c5(FIRST(z0, z1))
Defined Rule Symbols:none

Defined Pair Symbols:

FIRST, ACTIVATE

Compound Symbols:

c1, c5

### (11) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty