(0) Obligation:

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

active(eq(0, 0)) → mark(true)
active(eq(s(X), s(Y))) → mark(eq(X, Y))
active(eq(X, Y)) → mark(false)
active(inf(X)) → mark(cons(X, inf(s(X))))
active(take(0, X)) → mark(nil)
active(take(s(X), cons(Y, L))) → mark(cons(Y, take(X, L)))
active(length(nil)) → mark(0)
active(length(cons(X, L))) → mark(s(length(L)))
active(inf(X)) → inf(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
active(length(X)) → length(active(X))
inf(mark(X)) → mark(inf(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
length(mark(X)) → mark(length(X))
proper(eq(X1, X2)) → eq(proper(X1), proper(X2))
proper(0) → ok(0)
proper(true) → ok(true)
proper(s(X)) → s(proper(X))
proper(false) → ok(false)
proper(inf(X)) → inf(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(length(X)) → length(proper(X))
eq(ok(X1), ok(X2)) → ok(eq(X1, X2))
s(ok(X)) → ok(s(X))
inf(ok(X)) → ok(inf(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
length(ok(X)) → ok(length(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(eq(0, 0)) → mark(true)
active(eq(s(X), s(Y))) → mark(eq(X, Y))
active(eq(X, Y)) → mark(false)
active(inf(X)) → mark(cons(X, inf(s(X))))
active(take(0, X)) → mark(nil)
active(take(s(X), cons(Y, L))) → mark(cons(Y, take(X, L)))
active(length(nil)) → mark(0)
active(length(cons(X, L))) → mark(s(length(L)))
active(inf(X)) → inf(active(X))
active(take(X1, X2)) → take(active(X1), X2)
active(take(X1, X2)) → take(X1, active(X2))
active(length(X)) → length(active(X))
inf(mark(X)) → mark(inf(X))
take(mark(X1), X2) → mark(take(X1, X2))
take(X1, mark(X2)) → mark(take(X1, X2))
length(mark(X)) → mark(length(X))
proper(eq(X1, X2)) → eq(proper(X1), proper(X2))
proper(0) → ok(0)
proper(true) → ok(true)
proper(s(X)) → s(proper(X))
proper(false) → ok(false)
proper(inf(X)) → inf(proper(X))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(take(X1, X2)) → take(proper(X1), proper(X2))
proper(nil) → ok(nil)
proper(length(X)) → length(proper(X))
eq(ok(X1), ok(X2)) → ok(eq(X1, X2))
s(ok(X)) → ok(s(X))
inf(ok(X)) → ok(inf(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
take(ok(X1), ok(X2)) → ok(take(X1, X2))
length(ok(X)) → ok(length(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:

eq: empty set
0: empty set
true: empty set
s: empty set
false: empty set
inf: {1}
cons: empty set
take: {1, 2}
nil: empty set
length: {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:

eq(0, 0) → true
eq(s(X), s(Y)) → eq(X, Y)
eq(X, Y) → false
inf(X) → cons(X, inf(s(X)))
take(0, X) → nil
take(s(X), cons(Y, L)) → cons(Y, take(X, L))
length(nil) → 0
length(cons(X, L)) → s(length(L))

The replacement map contains the following entries:

eq: empty set
0: empty set
true: empty set
s: empty set
false: empty set
inf: {1}
cons: empty set
take: {1, 2}
nil: empty set
length: {1}

(3) PoloCSRProof (EQUIVALENT transformation)

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

eq(X, Y) → false
inf(X) → cons(X, inf(s(X)))
length(nil) → 0
length(cons(X, L)) → s(length(L))
Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(cons(x1, x2)) = x1   
POL(eq(x1, x2)) = 2   
POL(false) = 1   
POL(inf(x1)) = 1 + 2·x1   
POL(length(x1)) = 1 + x1   
POL(nil) = 0   
POL(s(x1)) = 0   
POL(take(x1, x2)) = x1 + 2·x2   
POL(true) = 2   


(4) Obligation:

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

eq(0, 0) → true
eq(s(X), s(Y)) → eq(X, Y)
take(0, X) → nil
take(s(X), cons(Y, L)) → cons(Y, take(X, L))

The replacement map contains the following entries:

eq: empty set
0: empty set
true: empty set
s: empty set
cons: empty set
take: {1, 2}
nil: empty set

(5) PoloCSRProof (EQUIVALENT transformation)

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

eq(0, 0) → true
eq(s(X), s(Y)) → eq(X, Y)
take(s(X), cons(Y, L)) → cons(Y, take(X, L))
Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(cons(x1, x2)) = 1 + x1 + 2·x2   
POL(eq(x1, x2)) = 2 + 2·x2   
POL(nil) = 2   
POL(s(x1)) = 2 + 2·x1   
POL(take(x1, x2)) = 2 + 2·x1 + 2·x2   
POL(true) = 1   


(6) Obligation:

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

take(0, X) → nil

The replacement map contains the following entries:

0: empty set
take: {1, 2}
nil: empty set

(7) PoloCSRProof (EQUIVALENT transformation)

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

take(0, X) → nil
Used ordering:
Polynomial interpretation [POLO]:

POL(0) = 2   
POL(nil) = 2   
POL(take(x1, x2)) = 2·x1 + x2   


(8) Obligation:

Context-sensitive rewrite system:
R is empty.

(9) RisEmptyProof (EQUIVALENT transformation)

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

(10) TRUE