(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(from(X)) → MARK(X)
The remaining pairs can at least be oriented weakly.
Used ordering: SCNP Order with the following components:
Level mapping:
Top level AFS:
A__FIRST(x0, x1, x2)  =  A__FIRST(x0, x1, x2)
MARK(x0, x1)  =  MARK(x0, x1)
A__FROM(x0, x1)  =  A__FROM(x0, x1)

Tags:
A__FIRST has argument tags [0,0,0] and root tag 0
MARK has argument tags [0,0] and root tag 0
A__FROM has argument tags [0,0] and root tag 0

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(A__FIRST(x1, x2)) = 0   
POL(A__FROM(x1)) = 1   
POL(MARK(x1)) = x1   
POL(a__first(x1, x2)) = x1 + x2   
POL(a__from(x1)) = 1 + x1   
POL(cons(x1, x2)) = x1   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = x1   

The following usable rules [FROCOS05] were oriented: none

(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(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(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) 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: SCNP Order with the following components:
Level mapping:
Top level AFS:
A__FIRST(x0, x1, x2)  =  A__FIRST(x2)
MARK(x0, x1)  =  MARK(x1)
A__FROM(x0, x1)  =  A__FROM(x0, x1)

Tags:
A__FIRST has argument tags [2,1,0] and root tag 0
MARK has argument tags [1,0] and root tag 0
A__FROM has argument tags [0,4] and root tag 0

Comparison: MIN
Underlying order for the size change arcs and the rules of R:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(A__FIRST(x1, x2)) = 0   
POL(A__FROM(x1)) = x1   
POL(MARK(x1)) = 1   
POL(a__first(x1, x2)) = x1 + x2   
POL(a__from(x1)) = x1   
POL(cons(x1, x2)) = x1   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 1 + x1   

The following usable rules [FROCOS05] were oriented:

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

(6) 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(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.


A__FROM(X) → MARK(X)
The remaining pairs can at least be oriented weakly.
Used ordering: SCNP Order with the following components:
Level mapping:
Top level AFS:
A__FIRST(x0, x1, x2)  =  A__FIRST(x0, x1)
MARK(x0, x1)  =  MARK(x1)
A__FROM(x0, x1)  =  A__FROM(x0)

Tags:
A__FIRST has argument tags [4,4,2] and root tag 0
MARK has argument tags [4,4] and root tag 0
A__FROM has argument tags [4,3] and root tag 0

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(A__FIRST(x1, x2)) = x2   
POL(A__FROM(x1)) = 1 + x1   
POL(MARK(x1)) = 1   
POL(a__first(x1, x2)) = x1 + x2   
POL(a__from(x1)) = 1 + x1   
POL(cons(x1, x2)) = x1   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 0   

The following usable rules [FROCOS05] were oriented:

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

(8) Obligation:

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

A__FIRST(s(X), cons(Y, Z)) → MARK(Y)
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(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) DependencyGraphProof (EQUIVALENT transformation)

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

(10) Obligation:

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

MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
A__FIRST(s(X), cons(Y, Z)) → MARK(Y)
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
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) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


A__FIRST(s(X), cons(Y, Z)) → MARK(Y)
The remaining pairs can at least be oriented weakly.
Used ordering: SCNP Order with the following components:
Level mapping:
Top level AFS:
MARK(x0, x1)  =  MARK(x1)
A__FIRST(x0, x1, x2)  =  A__FIRST(x0, x1)

Tags:
MARK has argument tags [1,6] and root tag 0
A__FIRST has argument tags [6,6,0] and root tag 0

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Polynomial interpretation [POLO]:

POL(0) = 0   
POL(A__FIRST(x1, x2)) = x1 + x2   
POL(MARK(x1)) = 0   
POL(a__first(x1, x2)) = x1 + x2   
POL(a__from(x1)) = x1   
POL(cons(x1, x2)) = x1   
POL(first(x1, x2)) = x1 + x2   
POL(from(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(s(x1)) = 1   

The following usable rules [FROCOS05] were oriented:

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

(12) Obligation:

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

MARK(first(X1, X2)) → A__FIRST(mark(X1), mark(X2))
MARK(first(X1, X2)) → MARK(X1)
MARK(first(X1, X2)) → MARK(X2)
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) DependencyGraphProof (EQUIVALENT transformation)

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

(14) Obligation:

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

MARK(first(X1, X2)) → MARK(X2)
MARK(first(X1, X2)) → MARK(X1)
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.

(15) 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: SCNP Order with the following components:
Level mapping:
Top level AFS:
MARK(x0, x1)  =  MARK(x0)

Tags:
MARK has argument tags [0,1] and root tag 0

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Polynomial interpretation [POLO]:

POL(MARK(x1)) = x1   
POL(cons(x1, x2)) = 1 + x1   
POL(first(x1, x2)) = x1 + x2   

The following usable rules [FROCOS05] were oriented: none

(16) Obligation:

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

MARK(first(X1, X2)) → MARK(X2)
MARK(first(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.

(17) QDPOrderProof (EQUIVALENT transformation)

We use the reduction pair processor [LPAR04].


The following pairs can be oriented strictly and are deleted.


MARK(first(X1, X2)) → MARK(X2)
MARK(first(X1, X2)) → MARK(X1)
The remaining pairs can at least be oriented weakly.
Used ordering: SCNP Order with the following components:
Level mapping:
Top level AFS:
MARK(x0, x1)  =  MARK(x1)

Tags:
MARK has argument tags [1,0] and root tag 0

Comparison: MAX
Underlying order for the size change arcs and the rules of R:
Polynomial interpretation [POLO]:

POL(MARK(x1)) = 1   
POL(first(x1, x2)) = 1 + x1 + x2   

The following usable rules [FROCOS05] were oriented: none

(18) 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.

(19) PisEmptyProof (EQUIVALENT transformation)

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

(20) TRUE