(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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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(first(0, X)) → MARK(nil)
ACTIVE(first(s(X), cons(Y, Z))) → MARK(cons(Y, first(X, Z)))
ACTIVE(first(s(X), cons(Y, Z))) → CONS(Y, first(X, Z))
ACTIVE(first(s(X), cons(Y, Z))) → FIRST(X, Z)
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(first(X1, X2)) → ACTIVE(first(mark(X1), mark(X2)))
MARK(first(X1, X2)) → FIRST(mark(X1), mark(X2))
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
MARK(0) → ACTIVE(0)
MARK(nil) → ACTIVE(nil)
MARK(s(X)) → ACTIVE(s(mark(X)))
MARK(s(X)) → S(mark(X))
MARK(s(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)
FIRST(mark(X1), X2) → FIRST(X1, X2)
FIRST(X1, mark(X2)) → FIRST(X1, X2)
FIRST(active(X1), X2) → FIRST(X1, X2)
FIRST(X1, active(X2)) → FIRST(X1, X2)
S(mark(X)) → S(X)
S(active(X)) → S(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)

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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 12 less nodes.

(4) Complex Obligation (AND)

(5) 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(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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(6) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[first, s] > [mark1, 0, nil, from1] > cons

Status:
mark1: [1]
first: []
0: []
nil: []
s: []
cons: []
from1: [1]


The following usable rules [FROCOS05] were oriented:

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

(7) Obligation:

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

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

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(8) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
FROM1 > cons
first > nil > [active1, mark1, s] > from > cons
0 > nil > [active1, mark1, s] > from > cons

Status:
FROM1: [1]
active1: [1]
first: []
0: []
mark1: [1]
nil: []
s: []
cons: []
from: []


The following usable rules [FROCOS05] were oriented:

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

(9) Obligation:

Q DP problem:
P is empty.
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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(10) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(11) TRUE

(12) 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(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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(13) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
first > nil > [mark1, cons, from1]
0 > nil > [mark1, cons, from1]
s > [mark1, cons, from1]

Status:
mark1: [1]
first: []
0: []
nil: []
s: []
cons: []
from1: [1]


The following usable rules [FROCOS05] were oriented:

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

(14) Obligation:

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

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(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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(15) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[first, nil, s, from] > [mark1, active1] > CONS2
[first, nil, s, from] > [mark1, active1] > 0

Status:
CONS2: [2,1]
mark1: [1]
active1: [1]
first: []
0: []
nil: []
s: []
from: []


The following usable rules [FROCOS05] were oriented:

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

(16) Obligation:

Q DP problem:
P is empty.
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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(17) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(18) TRUE

(19) 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(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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(20) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[first, s] > [mark1, 0, nil, from1] > cons

Status:
mark1: [1]
first: []
0: []
nil: []
s: []
cons: []
from1: [1]


The following usable rules [FROCOS05] were oriented:

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

(21) Obligation:

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

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

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(22) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
S1 > cons
first > nil > [active1, mark1, s] > from > cons
0 > nil > [active1, mark1, s] > from > cons

Status:
S1: [1]
active1: [1]
first: []
0: []
mark1: [1]
nil: []
s: []
cons: []
from: []


The following usable rules [FROCOS05] were oriented:

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

(23) Obligation:

Q DP problem:
P is empty.
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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(24) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(25) TRUE

(26) Obligation:

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

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

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(27) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
first > nil > [mark1, cons, from1]
0 > nil > [mark1, cons, from1]
s > [mark1, cons, from1]

Status:
mark1: [1]
first: []
0: []
nil: []
s: []
cons: []
from1: [1]


The following usable rules [FROCOS05] were oriented:

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

(28) Obligation:

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

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

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(29) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
[first, nil, s, from] > [mark1, active1] > FIRST2
[first, nil, s, from] > [mark1, active1] > 0

Status:
FIRST2: [2,1]
mark1: [1]
active1: [1]
first: []
0: []
nil: []
s: []
from: []


The following usable rules [FROCOS05] were oriented:

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

(30) Obligation:

Q DP problem:
P is empty.
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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(31) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(32) TRUE

(33) Obligation:

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

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

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(34) 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.
ACTIVE(x1)  =  x1
first(x1, x2)  =  first
s(x1)  =  s
cons(x1, x2)  =  cons
MARK(x1)  =  MARK
mark(x1)  =  mark
from(x1)  =  from
active(x1)  =  x1
0  =  0
nil  =  nil

Lexicographic path order with status [LPO].
Quasi-Precedence:
[first, cons, MARK, mark, from] > 0 > [s, nil]

Status:
first: []
s: []
cons: []
MARK: []
mark: []
from: []
0: []
nil: []


The following usable rules [FROCOS05] were oriented:

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

(35) Obligation:

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

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

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(36) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Lexicographic path order with status [LPO].
Quasi-Precedence:
from1 > s1 > first2 > MARK1 > cons1
from1 > s1 > first2 > nil

Status:
first2: [2,1]
s1: [1]
cons1: [1]
MARK1: [1]
from1: [1]
0: []
nil: []


The following usable rules [FROCOS05] were oriented:

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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

(37) Obligation:

Q DP problem:
P is empty.
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))))
mark(first(X1, X2)) → active(first(mark(X1), mark(X2)))
mark(0) → active(0)
mark(nil) → active(nil)
mark(s(X)) → active(s(mark(X)))
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(from(X)) → active(from(mark(X)))
first(mark(X1), X2) → first(X1, X2)
first(X1, mark(X2)) → first(X1, X2)
first(active(X1), X2) → first(X1, X2)
first(X1, active(X2)) → first(X1, X2)
s(mark(X)) → s(X)
s(active(X)) → s(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)

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

(38) PisEmptyProof (EQUIVALENT transformation)

The TRS P is empty. Hence, there is no (P,Q,R) chain.

(39) TRUE