(0) Obligation:

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

active(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(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(zeros) → mark(cons(0, zeros))
active(and(tt, X)) → mark(X)
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(s(length(L)))
active(cons(X1, X2)) → cons(active(X1), X2)
active(and(X1, X2)) → and(active(X1), X2)
active(length(X)) → length(active(X))
active(s(X)) → s(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
and(mark(X1), X2) → mark(and(X1, X2))
length(mark(X)) → mark(length(X))
s(mark(X)) → mark(s(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(and(X1, X2)) → and(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
proper(s(X)) → s(proper(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
and(ok(X1), ok(X2)) → ok(and(X1, X2))
length(ok(X)) → ok(length(X))
s(ok(X)) → ok(s(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:

zeros: empty set
cons: {1}
0: empty set
and: {1}
tt: empty set
length: {1}
nil: empty set
s: {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:

zeroscons(0, zeros)
and(tt, X) → X
length(nil) → 0
length(cons(N, L)) → s(length(L))

The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
and: {1}
tt: empty set
length: {1}
nil: empty set
s: {1}

(3) CSRRRRProof (EQUIVALENT transformation)

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

zeroscons(0, zeros)
and(tt, X) → X
length(nil) → 0
length(cons(N, L)) → s(length(L))

The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
and: {1}
tt: empty set
length: {1}
nil: empty set
s: {1}
Used ordering:
Polynomial interpretation [POLO]:


POL(0) = 0   
POL(and(x1, x2)) = x1 + x2   
POL(cons(x1, x2)) = x1 + x2   
POL(length(x1)) = 1 + x1   
POL(nil) = 1   
POL(s(x1)) = x1   
POL(tt) = 1   
POL(zeros) = 0   
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:

and(tt, X) → X
length(nil) → 0


(4) Obligation:

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

zeroscons(0, zeros)
length(cons(N, L)) → s(length(L))

The replacement map contains the following entries:

zeros: empty set
cons: {1}
0: empty set
length: {1}
s: {1}

(5) ContextSensitiveLoopProof (EQUIVALENT transformation)


zeroscons(0, zeros)
length(cons(N, L)) → s(length(L))

---------- Loop: ----------

length(zeros) → length(cons(0, zeros)) with rule zeroscons(0, zeros) at position [0] and matcher [ ]

length(cons(0, zeros)) → s(length(zeros)) with rule length(cons(N, L)) → s(length(L)) at position [] and matcher [N / 0, L / zeros]

Now an instance of the first term with Matcher [ ] occurs in the last term at position [0].

Context: s([])

We used [[THIEMANN_LOOPS_UNDER_STRATEGIES], Theorem 1] to show that this loop is an context-sensitive loop.

(6) NO