(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
active(s(X)) → s(active(X))
active(cons(X1, X2)) → cons(active(X1), X2)
active(from(X)) → from(active(X))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
s(mark(X)) → mark(s(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
from(mark(X)) → mark(from(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

(1) QTRSToCSRProof (EQUIVALENT transformation)

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(first(0, X)) → mark(nil)
active(first(s(X), cons(Y, Z))) → mark(cons(Y, first(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(first(X1, X2)) → first(active(X1), X2)
active(first(X1, X2)) → first(X1, active(X2))
active(s(X)) → s(active(X))
active(cons(X1, X2)) → cons(active(X1), X2)
active(from(X)) → from(active(X))
first(mark(X1), X2) → mark(first(X1, X2))
first(X1, mark(X2)) → mark(first(X1, X2))
s(mark(X)) → mark(s(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
from(mark(X)) → mark(from(X))
proper(first(X1, X2)) → first(proper(X1), proper(X2))
proper(0) → ok(0)
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
first(ok(X1), ok(X2)) → ok(first(X1, X2))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
from(ok(X)) → ok(from(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
Special symbols used for the transformation (see [GM04]):
top: top, active: active, mark: mark, ok: ok, proper: proper
The replacement map contains the following entries:

first: {1, 2}
0: empty set
nil: empty set
s: {1}
cons: {1}
from: {1}
The QTRS contained all rules created by the complete Giesl-Middeldorp transformation. Therefore, the inverse transformation is complete (and sound).

(2) Obligation:

Context-sensitive rewrite system:
The TRS R consists of the following rules:

first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))

The replacement map contains the following entries:

first: {1, 2}
0: empty set
nil: empty set
s: {1}
cons: {1}
from: {1}

(3) PoloCSRProof (EQUIVALENT transformation)

The following rules can be removed because they are oriented strictly by a µ-monotonic polynomial ordering:

first(0, X) → nil
first(s(X), cons(Y, Z)) → cons(Y, first(X, Z))
from(X) → cons(X, from(s(X)))
Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 2   
POL(cons(x1, x2)) = 1 + x1   
POL(first(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(from(x1)) = 2 + 2·x1   
POL(nil) = 1   
POL(s(x1)) = 2 + 2·x1   


(4) Obligation:

Context-sensitive rewrite system:
R is empty.

(5) RisEmptyProof (EQUIVALENT transformation)

The CSR R is empty. Hence, termination is trivially proven.

(6) TRUE