(0) Obligation:

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

active(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(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(fst(0, Z)) → mark(nil)
active(fst(s(X), cons(Y, Z))) → mark(cons(Y, fst(X, Z)))
active(from(X)) → mark(cons(X, from(s(X))))
active(add(0, X)) → mark(X)
active(add(s(X), Y)) → mark(s(add(X, Y)))
active(len(nil)) → mark(0)
active(len(cons(X, Z))) → mark(s(len(Z)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(fst(X1, X2)) → fst(active(X1), X2)
active(fst(X1, X2)) → fst(X1, active(X2))
active(from(X)) → from(active(X))
active(add(X1, X2)) → add(active(X1), X2)
active(add(X1, X2)) → add(X1, active(X2))
active(len(X)) → len(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
fst(mark(X1), X2) → mark(fst(X1, X2))
fst(X1, mark(X2)) → mark(fst(X1, X2))
from(mark(X)) → mark(from(X))
add(mark(X1), X2) → mark(add(X1, X2))
add(X1, mark(X2)) → mark(add(X1, X2))
len(mark(X)) → mark(len(X))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(nil) → ok(nil)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(fst(X1, X2)) → fst(proper(X1), proper(X2))
proper(from(X)) → from(proper(X))
proper(add(X1, X2)) → add(proper(X1), proper(X2))
proper(len(X)) → len(proper(X))
s(ok(X)) → ok(s(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
fst(ok(X1), ok(X2)) → ok(fst(X1, X2))
from(ok(X)) → ok(from(X))
add(ok(X1), ok(X2)) → ok(add(X1, X2))
len(ok(X)) → ok(len(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:

fst: {1, 2}
0: empty set
nil: empty set
s: empty set
cons: {1}
from: {1}
add: {1, 2}
len: {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:

fst(0, Z) → nil
fst(s(X), cons(Y, Z)) → cons(Y, fst(X, Z))
from(X) → cons(X, from(s(X)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
len(nil) → 0
len(cons(X, Z)) → s(len(Z))

The replacement map contains the following entries:

fst: {1, 2}
0: empty set
nil: empty set
s: empty set
cons: {1}
from: {1}
add: {1, 2}
len: {1}

(3) PoloCSRProof (EQUIVALENT transformation)

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

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

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


(4) Obligation:

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

len(nil) → 0
len(cons(X, Z)) → s(len(Z))

The replacement map contains the following entries:

0: empty set
nil: empty set
s: empty set
cons: {1}
len: {1}

(5) PoloCSRProof (EQUIVALENT transformation)

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

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

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


(6) Obligation:

Context-sensitive rewrite system:
R is empty.

(7) RisEmptyProof (EQUIVALENT transformation)

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

(8) TRUE