(0) Obligation:

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

a__2nd(cons(X, cons(Y, Z))) → mark(Y)
a__from(X) → cons(mark(X), from(s(X)))
mark(2nd(X)) → a__2nd(mark(X))
mark(from(X)) → a__from(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__2nd(X) → 2nd(X)
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__2ND(cons(X, cons(Y, Z))) → MARK(Y)
A__FROM(X) → MARK(X)
MARK(2nd(X)) → A__2ND(mark(X))
MARK(2nd(X)) → MARK(X)
MARK(from(X)) → A__FROM(mark(X))
MARK(from(X)) → MARK(X)
MARK(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__2nd(cons(X, cons(Y, Z))) → mark(Y)
a__from(X) → cons(mark(X), from(s(X)))
mark(2nd(X)) → a__2nd(mark(X))
mark(from(X)) → a__from(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__2nd(X) → 2nd(X)
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.


A__2ND(cons(X, cons(Y, Z))) → MARK(Y)
MARK(2nd(X)) → MARK(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:

POL(A__2ND(x1)) =
/1\
\0/
+
/10\
\00/
·x1

POL(cons(x1, x2)) =
/0\
\0/
+
/01\
\01/
·x1 +
/10\
\10/
·x2

POL(MARK(x1)) =
/0\
\0/
+
/01\
\00/
·x1

POL(A__FROM(x1)) =
/0\
\0/
+
/01\
\00/
·x1

POL(2nd(x1)) =
/1\
\1/
+
/01\
\01/
·x1

POL(mark(x1)) =
/0\
\0/
+
/01\
\01/
·x1

POL(from(x1)) =
/0\
\0/
+
/00\
\01/
·x1

POL(s(x1)) =
/0\
\0/
+
/00\
\01/
·x1

POL(a__2nd(x1)) =
/1\
\1/
+
/01\
\01/
·x1

POL(a__from(x1)) =
/0\
\0/
+
/01\
\01/
·x1

The following usable rules [FROCOS05] were oriented:

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

(4) Obligation:

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

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

The TRS R consists of the following rules:

a__2nd(cons(X, cons(Y, Z))) → mark(Y)
a__from(X) → cons(mark(X), from(s(X)))
mark(2nd(X)) → a__2nd(mark(X))
mark(from(X)) → a__from(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__2nd(X) → 2nd(X)
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(cons(X1, X2)) → MARK(X1)
MARK(s(X)) → MARK(X)

The TRS R consists of the following rules:

a__2nd(cons(X, cons(Y, Z))) → mark(Y)
a__from(X) → cons(mark(X), from(s(X)))
mark(2nd(X)) → a__2nd(mark(X))
mark(from(X)) → a__from(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__2nd(X) → 2nd(X)
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: Matrix interpretation [MATRO]:

POL(MARK(x1)) =
/0\
\0/
+
/10\
\00/
·x1

POL(from(x1)) =
/0\
\0/
+
/10\
\00/
·x1

POL(A__FROM(x1)) =
/0\
\0/
+
/10\
\00/
·x1

POL(mark(x1)) =
/0\
\0/
+
/10\
\10/
·x1

POL(cons(x1, x2)) =
/0\
\0/
+
/10\
\10/
·x1 +
/01\
\00/
·x2

POL(s(x1)) =
/1\
\0/
+
/10\
\00/
·x1

POL(a__2nd(x1)) =
/1\
\0/
+
/10\
\10/
·x1

POL(2nd(x1)) =
/1\
\0/
+
/10\
\10/
·x1

POL(a__from(x1)) =
/0\
\0/
+
/10\
\10/
·x1

The following usable rules [FROCOS05] were oriented:

a__2nd(cons(X, cons(Y, Z))) → mark(Y)
mark(2nd(X)) → a__2nd(mark(X))
mark(from(X)) → a__from(mark(X))
a__from(X) → cons(mark(X), from(s(X)))
a__2nd(X) → 2nd(X)
a__from(X) → from(X)
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(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__2nd(cons(X, cons(Y, Z))) → mark(Y)
a__from(X) → cons(mark(X), from(s(X)))
mark(2nd(X)) → a__2nd(mark(X))
mark(from(X)) → a__from(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__2nd(X) → 2nd(X)
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.


A__FROM(X) → MARK(X)
MARK(from(X)) → MARK(X)
The remaining pairs can at least be oriented weakly.
Used ordering: Polynomial interpretation [POLO]:

POL(2nd(x1)) = x1   
POL(A__FROM(x1)) = 1 + x1   
POL(MARK(x1)) = x1   
POL(a__2nd(x1)) = x1   
POL(a__from(x1)) = 1 + x1   
POL(cons(x1, x2)) = x1 + x2   
POL(from(x1)) = 1 + x1   
POL(mark(x1)) = x1   
POL(s(x1)) = 0   

The following usable rules [FROCOS05] were oriented:

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

(10) Obligation:

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

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

The TRS R consists of the following rules:

a__2nd(cons(X, cons(Y, Z))) → mark(Y)
a__from(X) → cons(mark(X), from(s(X)))
mark(2nd(X)) → a__2nd(mark(X))
mark(from(X)) → a__from(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__2nd(X) → 2nd(X)
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__2nd(cons(X, cons(Y, Z))) → mark(Y)
a__from(X) → cons(mark(X), from(s(X)))
mark(2nd(X)) → a__2nd(mark(X))
mark(from(X)) → a__from(mark(X))
mark(cons(X1, X2)) → cons(mark(X1), X2)
mark(s(X)) → s(mark(X))
a__2nd(X) → 2nd(X)
a__from(X) → from(X)

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

(13) UsableRulesProof (EQUIVALENT transformation)

We can use the usable rules and reduction pair processor [LPAR04] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its arguments. Then, we can delete all non-usable rules [FROCOS05] from R.

(14) Obligation:

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

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

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

(15) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • MARK(cons(X1, X2)) → MARK(X1)
    The graph contains the following edges 1 > 1

(16) TRUE