(0) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
active(zeros) → mark(cons(0, zeros))
active(tail(cons(X, XS))) → mark(XS)
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
mark(tail(X)) → active(tail(mark(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)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
Q is empty.
(1) QTRSRRRProof (EQUIVALENT transformation)
Used ordering:
Polynomial interpretation [POLO]:
POL(0) = 0
POL(active(x1)) = x1
POL(cons(x1, x2)) = x1 + 2·x2
POL(mark(x1)) = 2·x1
POL(tail(x1)) = 1 + x1
POL(zeros) = 0
With this ordering the following rules can be removed by the rule removal processor [LPAR04] because they are oriented strictly:
active(tail(cons(X, XS))) → mark(XS)
mark(tail(X)) → active(tail(mark(X)))
(2) Obligation:
Q restricted rewrite system:
The TRS R consists of the following rules:
active(zeros) → mark(cons(0, zeros))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
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)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
Q is empty.
(3) DependencyPairsProof (EQUIVALENT transformation)
Using Dependency Pairs [AG00,LPAR04] we result in the following initial DP problem.
(4) Obligation:
Q DP problem:
The TRS P consists of the following rules:
ACTIVE(zeros) → MARK(cons(0, zeros))
ACTIVE(zeros) → CONS(0, zeros)
MARK(zeros) → ACTIVE(zeros)
MARK(cons(X1, X2)) → ACTIVE(cons(mark(X1), X2))
MARK(cons(X1, X2)) → CONS(mark(X1), X2)
MARK(cons(X1, X2)) → MARK(X1)
MARK(0) → ACTIVE(0)
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)
TAIL(mark(X)) → TAIL(X)
TAIL(active(X)) → TAIL(X)
The TRS R consists of the following rules:
active(zeros) → mark(cons(0, zeros))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
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)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(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 3 SCCs with 4 less nodes.
(6) Complex Obligation (AND)
(7) Obligation:
Q DP problem:
The TRS P consists of the following rules:
TAIL(active(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)
The TRS R consists of the following rules:
active(zeros) → mark(cons(0, zeros))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
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)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(8) 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.
(9) Obligation:
Q DP problem:
The TRS P consists of the following rules:
TAIL(active(X)) → TAIL(X)
TAIL(mark(X)) → TAIL(X)
R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(10) 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:
- TAIL(active(X)) → TAIL(X)
The graph contains the following edges 1 > 1
- TAIL(mark(X)) → TAIL(X)
The graph contains the following edges 1 > 1
(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(zeros) → mark(cons(0, zeros))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
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)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(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:
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)
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:
- CONS(X1, mark(X2)) → CONS(X1, X2)
The graph contains the following edges 1 >= 1, 2 > 2
- CONS(mark(X1), X2) → CONS(X1, X2)
The graph contains the following edges 1 > 1, 2 >= 2
- CONS(active(X1), X2) → CONS(X1, X2)
The graph contains the following edges 1 > 1, 2 >= 2
- CONS(X1, active(X2)) → CONS(X1, X2)
The graph contains the following edges 1 >= 1, 2 > 2
(16) TRUE
(17) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MARK(cons(X1, X2)) → MARK(X1)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
The TRS R consists of the following rules:
active(zeros) → mark(cons(0, zeros))
mark(zeros) → active(zeros)
mark(cons(X1, X2)) → active(cons(mark(X1), X2))
mark(0) → active(0)
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)
tail(mark(X)) → tail(X)
tail(active(X)) → tail(X)
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
(18) 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.
(19) Obligation:
Q DP problem:
The TRS P consists of the following rules:
MARK(cons(X1, X2)) → MARK(X1)
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
R is empty.
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.
MARK(zeros) → ACTIVE(zeros)
ACTIVE(zeros) → MARK(cons(0, zeros))
The remaining pairs can at least be oriented weakly.
Used ordering: Matrix interpretation [MATRO]:
POL(cons(x1, x2)) = | | + | | · | x1 | + | | · | x2 |
The following usable rules [FROCOS05] were oriented:
none
(21) 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.
(22) 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
(23) TRUE