(0) Obligation:

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

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(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:

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

The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

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

(3) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
[first2, afirst2] > nil


The following usable rules [FROCOS05] were oriented:

mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__first(0, X) → nil
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
a__from(X) → cons(mark(X), from(s(X)))
mark(0) → 0
mark(from(X)) → a__from(mark(X))
mark(s(X)) → s(mark(X))
mark(nil) → nil

(4) Obligation:

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

A__FIRST(s(X), cons(Y, Z)) → MARK(Y)
A__FROM(X) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(from(X)) → MARK(X)
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

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

(5) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(6) Obligation:

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

MARK(from(X)) → A__FROM(mark(X))
A__FROM(X) → MARK(X)
MARK(from(X)) → MARK(X)
MARK(s(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

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

(7) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


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

Recursive Path Order [RPO].
Precedence:
s1 > nil
0 > nil


The following usable rules [FROCOS05] were oriented:

a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__first(0, X) → nil
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
a__from(X) → cons(mark(X), from(s(X)))
mark(0) → 0
mark(from(X)) → a__from(mark(X))
mark(s(X)) → s(mark(X))
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

(8) Obligation:

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

MARK(from(X)) → A__FROM(mark(X))
A__FROM(X) → MARK(X)
MARK(from(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

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

(9) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(from(X)) → A__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.
MARK(x1)  =  x1
from(x1)  =  from(x1)
A__FROM(x1)  =  x1
mark(x1)  =  x1
cons(x1, x2)  =  x1
a__first(x1, x2)  =  x2
nil  =  nil
first(x1, x2)  =  x2
a__from(x1)  =  a__from(x1)
0  =  0
s(x1)  =  s

Recursive Path Order [RPO].
Precedence:
[from1, afrom1] > nil
0 > nil
s > nil


The following usable rules [FROCOS05] were oriented:

a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__first(0, X) → nil
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
a__from(X) → cons(mark(X), from(s(X)))
mark(0) → 0
mark(from(X)) → a__from(mark(X))
mark(s(X)) → s(mark(X))
mark(nil) → nil
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

(10) Obligation:

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

A__FROM(X) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

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

(11) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LPAR04,FROCOS05,EDGSTAR] contains 1 SCC with 1 less node.

(12) Obligation:

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

MARK(cons(X1, X2)) → MARK(X1)

The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(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.


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

Recursive Path Order [RPO].
Precedence:
trivial


The following usable rules [FROCOS05] were oriented: none

(14) Obligation:

Q DP problem:
P is empty.
The TRS R consists of the following rules:

a__first(0, X) → nil
a__first(s(X), cons(Y, Z)) → cons(mark(Y), first(X, Z))
a__from(X) → cons(mark(X), from(s(X)))
mark(first(X1, X2)) → a__first(mark(X1), mark(X2))
mark(from(X)) → a__from(mark(X))
mark(0) → 0
mark(nil) → nil
mark(s(X)) → s(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
a__first(X1, X2) → first(X1, X2)
a__from(X) → from(X)

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

(15) PisEmptyProof (EQUIVALENT transformation)

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

(16) TRUE