Term Rewriting System R:
[y, z, x]
f(cons(nil, y)) -> y
f(cons(f(cons(nil, y)), z)) -> copy(n, y, z)
copy(0, y, z) -> f(z)
copy(s(x), y, z) -> copy(x, y, cons(f(y), z))

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

F(cons(f(cons(nil, y)), z)) -> COPY(n, y, z)
COPY(0, y, z) -> F(z)
COPY(s(x), y, z) -> COPY(x, y, cons(f(y), z))
COPY(s(x), y, z) -> F(y)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Polynomial Ordering


Dependency Pair:

COPY(s(x), y, z) -> COPY(x, y, cons(f(y), z))


Rules:


f(cons(nil, y)) -> y
f(cons(f(cons(nil, y)), z)) -> copy(n, y, z)
copy(0, y, z) -> f(z)
copy(s(x), y, z) -> copy(x, y, cons(f(y), z))





The following dependency pair can be strictly oriented:

COPY(s(x), y, z) -> COPY(x, y, cons(f(y), z))


Additionally, the following usable rules using the Ce-refinement can be oriented:

f(cons(nil, y)) -> y
f(cons(f(cons(nil, y)), z)) -> copy(n, y, z)
copy(0, y, z) -> f(z)
copy(s(x), y, z) -> copy(x, y, cons(f(y), z))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(copy(x1, x2, x3))=  x3  
  POL(0)=  0  
  POL(cons(x1, x2))=  x2  
  POL(COPY(x1, x2, x3))=  x1  
  POL(nil)=  0  
  POL(n)=  0  
  POL(s(x1))=  1 + x1  
  POL(f(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 2
Dependency Graph


Dependency Pair:


Rules:


f(cons(nil, y)) -> y
f(cons(f(cons(nil, y)), z)) -> copy(n, y, z)
copy(0, y, z) -> f(z)
copy(s(x), y, z) -> copy(x, y, cons(f(y), z))





Using the Dependency Graph resulted in no new DP problems.

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