(0) Obligation:

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

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.

(1) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.

(2) Obligation:

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(2nd(cons(X, cons(Y, Z)))) → MARK(Y)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
ACTIVE(from(X)) → CONS(X, from(s(X)))
ACTIVE(from(X)) → FROM(s(X))
ACTIVE(from(X)) → S(X)
MARK(2nd(X)) → ACTIVE(2nd(mark(X)))
MARK(2nd(X)) → 2ND(mark(X))
MARK(2nd(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(from(X)) → FROM(mark(X))
MARK(from(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → S(mark(X))
MARK(s(X)) → MARK(X)
2ND(mark(X)) → 2ND(X)
2ND(active(X)) → 2ND(X)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)
FROM(mark(X)) → FROM(X)
FROM(active(X)) → FROM(X)
S(mark(X)) → S(X)
S(active(X)) → S(X)

The TRS R consists of the following rules:

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(3) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 5 SCCs with 7 less nodes.

(4) Complex Obligation (AND)

(5) Obligation:

Q DP problem:
The TRS P consists of the following rules:

S(active(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following rules:

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(6) Obligation:

Q DP problem:
The TRS P consists of the following rules:

FROM(active(X)) → FROM(X)
FROM(mark(X)) → FROM(X)

The TRS R consists of the following rules:

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(7) Obligation:

Q DP problem:
The TRS P consists of the following rules:

CONS(X1, mark(X2)) → CONS(X1, X2)
CONS(mark(X1), X2) → CONS(X1, X2)
CONS(active(X1), X2) → CONS(X1, X2)
CONS(X1, active(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(8) Obligation:

Q DP problem:
The TRS P consists of the following rules:

2ND(active(X)) → 2ND(X)
2ND(mark(X)) → 2ND(X)

The TRS R consists of the following rules:

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(9) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MARK(2nd(X)) → ACTIVE(2nd(mark(X)))
ACTIVE(2nd(cons(X, cons(Y, Z)))) → MARK(Y)
MARK(2nd(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(cons(X1, X2)) → MARK(X1)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(from(X)) → MARK(X)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(10) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(s(X)) → ACTIVE(s(mark(X)))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK
2nd(x1)  =  2nd
ACTIVE(x1)  =  x1
mark(x1)  =  mark
cons(x1, x2)  =  cons
from(x1)  =  from
s(x1)  =  s
active(x1)  =  active

Recursive Path Order [RPO].
Precedence:
[MARK, 2nd, mark, cons, from, active] > s


The following usable rules [FROCOS05] were oriented:

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

(11) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MARK(2nd(X)) → ACTIVE(2nd(mark(X)))
ACTIVE(2nd(cons(X, cons(Y, Z)))) → MARK(Y)
MARK(2nd(X)) → MARK(X)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(cons(X1, X2)) → MARK(X1)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(from(X)) → MARK(X)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

(12) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
The remaining pairs can at least be oriented weakly.
Used ordering: Combined order from the following AFS and order.
MARK(x1)  =  MARK
2nd(x1)  =  2nd
ACTIVE(x1)  =  x1
mark(x1)  =  mark
cons(x1, x2)  =  cons
from(x1)  =  from
s(x1)  =  s
active(x1)  =  active

Recursive Path Order [RPO].
Precedence:
[MARK, 2nd, from] > cons > [mark, active]
[MARK, 2nd, from] > s > [mark, active]


The following usable rules [FROCOS05] were oriented:

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

MARK(2nd(X)) → ACTIVE(2nd(mark(X)))
ACTIVE(2nd(cons(X, cons(Y, Z)))) → MARK(Y)
MARK(2nd(X)) → MARK(X)
ACTIVE(from(X)) → MARK(cons(X, from(s(X))))
MARK(cons(X1, X2)) → MARK(X1)
MARK(from(X)) → ACTIVE(from(mark(X)))
MARK(from(X)) → MARK(X)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

active(2nd(cons(X, cons(Y, Z)))) → mark(Y)
active(from(X)) → mark(cons(X, from(s(X))))
mark(2nd(X)) → active(2nd(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
mark(s(X)) → active(s(mark(X)))
2nd(mark(X)) → 2nd(X)
2nd(active(X)) → 2nd(X)
cons(mark(X1), X2) → cons(X1, X2)
cons(X1, mark(X2)) → cons(X1, X2)
cons(active(X1), X2) → cons(X1, X2)
cons(X1, active(X2)) → cons(X1, X2)
from(mark(X)) → from(X)
from(active(X)) → from(X)
s(mark(X)) → s(X)
s(active(X)) → s(X)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.