Term Rewriting System R:
[N, X, Y, X1, X2, Z]
aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

ATERMS(N) -> ASQR(mark(N))
ATERMS(N) -> MARK(N)
AADD(0, X) -> MARK(X)
AFIRST(s(X), cons(Y, Z)) -> MARK(Y)
MARK(terms(X)) -> ATERMS(mark(X))
MARK(terms(X)) -> MARK(X)
MARK(sqr(X)) -> ASQR(mark(X))
MARK(sqr(X)) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(add(X1, X2)) -> MARK(X1)
MARK(add(X1, X2)) -> MARK(X2)
MARK(dbl(X)) -> ADBL(mark(X))
MARK(dbl(X)) -> MARK(X)
MARK(first(X1, X2)) -> AFIRST(mark(X1), mark(X2))
MARK(first(X1, X2)) -> MARK(X1)
MARK(first(X1, X2)) -> MARK(X2)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(recip(X)) -> MARK(X)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Negative Polynomial Order


Dependency Pairs:

MARK(recip(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)
MARK(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
AFIRST(s(X), cons(Y, Z)) -> MARK(Y)
MARK(first(X1, X2)) -> AFIRST(mark(X1), mark(X2))
MARK(dbl(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(sqr(X)) -> MARK(X)
MARK(terms(X)) -> MARK(X)
MARK(terms(X)) -> ATERMS(mark(X))
ATERMS(N) -> MARK(N)


Rules:


aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil





The following Dependency Pairs can be strictly oriented using the given order.

MARK(recip(X)) -> MARK(X)
MARK(terms(X)) -> MARK(X)
MARK(terms(X)) -> ATERMS(mark(X))


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil
aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)


Used ordering:
Polynomial Order with Interpretation:

POL( MARK(x1) ) = x1

POL( recip(x1) ) = x1 + 1

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

POL( AADD(x1, x2) ) = x2

POL( add(x1, x2) ) = x1 + x2

POL( mark(x1) ) = x1

POL( ATERMS(x1) ) = x1

POL( AFIRST(x1, x2) ) = x2

POL( cons(x1, x2) ) = x1

POL( dbl(x1) ) = x1

POL( terms(x1) ) = x1 + 1

POL( sqr(x1) ) = x1

POL( aterms(x1) ) = x1 + 1

POL( asqr(x1) ) = x1

POL( aadd(x1, x2) ) = x1 + x2

POL( adbl(x1) ) = x1

POL( afirst(x1, x2) ) = x1 + x2

POL( s(x1) ) = 0

POL( 0 ) = 0

POL( nil ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
Neg POLO
           →DP Problem 2
Dependency Graph


Dependency Pairs:

MARK(cons(X1, X2)) -> MARK(X1)
MARK(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
AFIRST(s(X), cons(Y, Z)) -> MARK(Y)
MARK(first(X1, X2)) -> AFIRST(mark(X1), mark(X2))
MARK(dbl(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(sqr(X)) -> MARK(X)
ATERMS(N) -> MARK(N)


Rules:


aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil





Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
Neg POLO
           →DP Problem 2
DGraph
             ...
               →DP Problem 3
Negative Polynomial Order


Dependency Pairs:

MARK(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
AFIRST(s(X), cons(Y, Z)) -> MARK(Y)
MARK(first(X1, X2)) -> AFIRST(mark(X1), mark(X2))
MARK(dbl(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(sqr(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)


Rules:


aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil





The following Dependency Pairs can be strictly oriented using the given order.

MARK(first(X1, X2)) -> MARK(X2)
MARK(first(X1, X2)) -> MARK(X1)
MARK(first(X1, X2)) -> AFIRST(mark(X1), mark(X2))


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil
aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)


Used ordering:
Polynomial Order with Interpretation:

POL( MARK(x1) ) = x1

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

POL( add(x1, x2) ) = x1 + x2

POL( AADD(x1, x2) ) = x2

POL( mark(x1) ) = x1

POL( cons(x1, x2) ) = x1

POL( AFIRST(x1, x2) ) = x2

POL( dbl(x1) ) = x1

POL( sqr(x1) ) = x1

POL( terms(x1) ) = 0

POL( aterms(x1) ) = 0

POL( asqr(x1) ) = x1

POL( aadd(x1, x2) ) = x1 + x2

POL( adbl(x1) ) = x1

POL( afirst(x1, x2) ) = x1 + x2 + 1

POL( recip(x1) ) = 0

POL( s(x1) ) = 0

POL( 0 ) = 0

POL( nil ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
Neg POLO
           →DP Problem 2
DGraph
             ...
               →DP Problem 4
Dependency Graph


Dependency Pairs:

AFIRST(s(X), cons(Y, Z)) -> MARK(Y)
MARK(dbl(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(sqr(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)


Rules:


aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil





Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
Neg POLO
           →DP Problem 2
DGraph
             ...
               →DP Problem 5
Negative Polynomial Order


Dependency Pairs:

MARK(cons(X1, X2)) -> MARK(X1)
MARK(dbl(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(sqr(X)) -> MARK(X)


Rules:


aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil





The following Dependency Pair can be strictly oriented using the given order.

MARK(cons(X1, X2)) -> MARK(X1)


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil
aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)


Used ordering:
Polynomial Order with Interpretation:

POL( MARK(x1) ) = x1

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

POL( AADD(x1, x2) ) = x2

POL( add(x1, x2) ) = x1 + x2

POL( mark(x1) ) = x1

POL( dbl(x1) ) = x1

POL( sqr(x1) ) = x1

POL( terms(x1) ) = 1

POL( aterms(x1) ) = 1

POL( asqr(x1) ) = x1

POL( aadd(x1, x2) ) = x1 + x2

POL( adbl(x1) ) = x1

POL( first(x1, x2) ) = x2

POL( afirst(x1, x2) ) = x2

POL( recip(x1) ) = 0

POL( s(x1) ) = 0

POL( 0 ) = 0

POL( nil ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
Neg POLO
           →DP Problem 2
DGraph
             ...
               →DP Problem 6
Negative Polynomial Order


Dependency Pairs:

MARK(dbl(X)) -> MARK(X)
MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(sqr(X)) -> MARK(X)


Rules:


aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil





The following Dependency Pair can be strictly oriented using the given order.

MARK(dbl(X)) -> MARK(X)


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil
aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)


Used ordering:
Polynomial Order with Interpretation:

POL( MARK(x1) ) = x1

POL( dbl(x1) ) = x1 + 1

POL( add(x1, x2) ) = x1 + x2

POL( AADD(x1, x2) ) = x2

POL( mark(x1) ) = x1

POL( sqr(x1) ) = x1

POL( terms(x1) ) = 0

POL( aterms(x1) ) = 0

POL( asqr(x1) ) = x1

POL( aadd(x1, x2) ) = x1 + x2

POL( adbl(x1) ) = x1 + 1

POL( first(x1, x2) ) = 0

POL( afirst(x1, x2) ) = 0

POL( cons(x1, x2) ) = 0

POL( recip(x1) ) = 0

POL( s(x1) ) = 0

POL( 0 ) = 0

POL( nil ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
Neg POLO
           →DP Problem 2
DGraph
             ...
               →DP Problem 7
Negative Polynomial Order


Dependency Pairs:

MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
AADD(0, X) -> MARK(X)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))
MARK(sqr(X)) -> MARK(X)


Rules:


aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil





The following Dependency Pairs can be strictly oriented using the given order.

MARK(add(X1, X2)) -> MARK(X2)
MARK(add(X1, X2)) -> MARK(X1)
MARK(add(X1, X2)) -> AADD(mark(X1), mark(X2))


Moreover, the following usable rules (regarding the implicit AFS) are oriented.

mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil
aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)


Used ordering:
Polynomial Order with Interpretation:

POL( MARK(x1) ) = x1

POL( add(x1, x2) ) = x1 + x2 + 1

POL( AADD(x1, x2) ) = x2

POL( mark(x1) ) = x1

POL( sqr(x1) ) = x1

POL( terms(x1) ) = 0

POL( aterms(x1) ) = 0

POL( asqr(x1) ) = x1

POL( aadd(x1, x2) ) = x1 + x2 + 1

POL( dbl(x1) ) = 0

POL( adbl(x1) ) = 0

POL( first(x1, x2) ) = 0

POL( afirst(x1, x2) ) = 0

POL( cons(x1, x2) ) = 0

POL( recip(x1) ) = 0

POL( s(x1) ) = 0

POL( 0 ) = 0

POL( nil ) = 0


This results in one new DP problem.


   R
DPs
       →DP Problem 1
Neg POLO
           →DP Problem 2
DGraph
             ...
               →DP Problem 8
Dependency Graph


Dependency Pairs:

AADD(0, X) -> MARK(X)
MARK(sqr(X)) -> MARK(X)


Rules:


aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil





Using the Dependency Graph the DP problem was split into 1 DP problems.


   R
DPs
       →DP Problem 1
Neg POLO
           →DP Problem 2
DGraph
             ...
               →DP Problem 9
Size-Change Principle


Dependency Pair:

MARK(sqr(X)) -> MARK(X)


Rules:


aterms(N) -> cons(recip(asqr(mark(N))), terms(s(N)))
aterms(X) -> terms(X)
asqr(0) -> 0
asqr(s(X)) -> s(add(sqr(X), dbl(X)))
asqr(X) -> sqr(X)
adbl(0) -> 0
adbl(s(X)) -> s(s(dbl(X)))
adbl(X) -> dbl(X)
aadd(0, X) -> mark(X)
aadd(s(X), Y) -> s(add(X, Y))
aadd(X1, X2) -> add(X1, X2)
afirst(0, X) -> nil
afirst(s(X), cons(Y, Z)) -> cons(mark(Y), first(X, Z))
afirst(X1, X2) -> first(X1, X2)
mark(terms(X)) -> aterms(mark(X))
mark(sqr(X)) -> asqr(mark(X))
mark(add(X1, X2)) -> aadd(mark(X1), mark(X2))
mark(dbl(X)) -> adbl(mark(X))
mark(first(X1, X2)) -> afirst(mark(X1), mark(X2))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(recip(X)) -> recip(mark(X))
mark(s(X)) -> s(X)
mark(0) -> 0
mark(nil) -> nil





We number the DPs as follows:
  1. MARK(sqr(X)) -> MARK(X)
and get the following Size-Change Graph(s):
{1} , {1}
1>1

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
sqr(x1) -> sqr(x1)

We obtain no new DP problems.

Termination of R successfully shown.
Duration:
0:03 minutes