Term Rewriting System R:
[X, XS, X1, X2]
azeros -> cons(0, zeros)
azeros -> zeros
atail(cons(X, XS)) -> mark(XS)
atail(X) -> tail(X)
mark(zeros) -> azeros
mark(tail(X)) -> atail(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

ATAIL(cons(X, XS)) -> MARK(XS)
MARK(zeros) -> AZEROS
MARK(tail(X)) -> ATAIL(mark(X))
MARK(tail(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)

Furthermore, R contains one SCC.


   R
DPs
       →DP Problem 1
Narrowing Transformation


Dependency Pairs:

MARK(cons(X1, X2)) -> MARK(X1)
MARK(tail(X)) -> MARK(X)
MARK(tail(X)) -> ATAIL(mark(X))
ATAIL(cons(X, XS)) -> MARK(XS)


Rules:


azeros -> cons(0, zeros)
azeros -> zeros
atail(cons(X, XS)) -> mark(XS)
atail(X) -> tail(X)
mark(zeros) -> azeros
mark(tail(X)) -> atail(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(tail(X)) -> ATAIL(mark(X))
four new Dependency Pairs are created:

MARK(tail(zeros)) -> ATAIL(azeros)
MARK(tail(tail(X''))) -> ATAIL(atail(mark(X'')))
MARK(tail(cons(X1', X2'))) -> ATAIL(cons(mark(X1'), X2'))
MARK(tail(0)) -> ATAIL(0)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Narrowing Transformation


Dependency Pairs:

MARK(tail(cons(X1', X2'))) -> ATAIL(cons(mark(X1'), X2'))
MARK(tail(tail(X''))) -> ATAIL(atail(mark(X'')))
ATAIL(cons(X, XS)) -> MARK(XS)
MARK(tail(zeros)) -> ATAIL(azeros)
MARK(tail(X)) -> MARK(X)
MARK(cons(X1, X2)) -> MARK(X1)


Rules:


azeros -> cons(0, zeros)
azeros -> zeros
atail(cons(X, XS)) -> mark(XS)
atail(X) -> tail(X)
mark(zeros) -> azeros
mark(tail(X)) -> atail(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(tail(zeros)) -> ATAIL(azeros)
two new Dependency Pairs are created:

MARK(tail(zeros)) -> ATAIL(cons(0, zeros))
MARK(tail(zeros)) -> ATAIL(zeros)

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 3
Narrowing Transformation


Dependency Pairs:

MARK(tail(zeros)) -> ATAIL(cons(0, zeros))
MARK(tail(tail(X''))) -> ATAIL(atail(mark(X'')))
MARK(cons(X1, X2)) -> MARK(X1)
MARK(tail(X)) -> MARK(X)
ATAIL(cons(X, XS)) -> MARK(XS)
MARK(tail(cons(X1', X2'))) -> ATAIL(cons(mark(X1'), X2'))


Rules:


azeros -> cons(0, zeros)
azeros -> zeros
atail(cons(X, XS)) -> mark(XS)
atail(X) -> tail(X)
mark(zeros) -> azeros
mark(tail(X)) -> atail(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0





On this DP problem, a Narrowing SCC transformation can be performed.
As a result of transforming the rule

MARK(tail(tail(X''))) -> ATAIL(atail(mark(X'')))
five new Dependency Pairs are created:

MARK(tail(tail(X'''))) -> ATAIL(tail(mark(X''')))
MARK(tail(tail(zeros))) -> ATAIL(atail(azeros))
MARK(tail(tail(tail(X')))) -> ATAIL(atail(atail(mark(X'))))
MARK(tail(tail(cons(X1', X2')))) -> ATAIL(atail(cons(mark(X1'), X2')))
MARK(tail(tail(0))) -> ATAIL(atail(0))

The transformation is resulting in one new DP problem:



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 4
Polynomial Ordering


Dependency Pairs:

MARK(tail(tail(0))) -> ATAIL(atail(0))
MARK(tail(tail(cons(X1', X2')))) -> ATAIL(atail(cons(mark(X1'), X2')))
MARK(tail(tail(tail(X')))) -> ATAIL(atail(atail(mark(X'))))
MARK(tail(tail(zeros))) -> ATAIL(atail(azeros))
MARK(tail(cons(X1', X2'))) -> ATAIL(cons(mark(X1'), X2'))
MARK(cons(X1, X2)) -> MARK(X1)
MARK(tail(X)) -> MARK(X)
ATAIL(cons(X, XS)) -> MARK(XS)
MARK(tail(zeros)) -> ATAIL(cons(0, zeros))


Rules:


azeros -> cons(0, zeros)
azeros -> zeros
atail(cons(X, XS)) -> mark(XS)
atail(X) -> tail(X)
mark(zeros) -> azeros
mark(tail(X)) -> atail(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0





The following dependency pairs can be strictly oriented:

MARK(tail(tail(0))) -> ATAIL(atail(0))
MARK(tail(tail(cons(X1', X2')))) -> ATAIL(atail(cons(mark(X1'), X2')))
MARK(tail(tail(tail(X')))) -> ATAIL(atail(atail(mark(X'))))
MARK(tail(tail(zeros))) -> ATAIL(atail(azeros))
MARK(tail(cons(X1', X2'))) -> ATAIL(cons(mark(X1'), X2'))
MARK(tail(X)) -> MARK(X)
MARK(tail(zeros)) -> ATAIL(cons(0, zeros))


Additionally, the following usable rules w.r.t. to the implicit AFS can be oriented:

atail(cons(X, XS)) -> mark(XS)
atail(X) -> tail(X)
mark(zeros) -> azeros
mark(tail(X)) -> atail(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0
azeros -> cons(0, zeros)
azeros -> zeros


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(0)=  0  
  POL(MARK(x1))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(a__zeros)=  0  
  POL(tail(x1))=  1 + x1  
  POL(a__tail(x1))=  1 + x1  
  POL(mark(x1))=  x1  
  POL(zeros)=  0  
  POL(A__TAIL(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 5
Dependency Graph


Dependency Pairs:

MARK(cons(X1, X2)) -> MARK(X1)
ATAIL(cons(X, XS)) -> MARK(XS)


Rules:


azeros -> cons(0, zeros)
azeros -> zeros
atail(cons(X, XS)) -> mark(XS)
atail(X) -> tail(X)
mark(zeros) -> azeros
mark(tail(X)) -> atail(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0





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


   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 6
Polynomial Ordering


Dependency Pair:

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


Rules:


azeros -> cons(0, zeros)
azeros -> zeros
atail(cons(X, XS)) -> mark(XS)
atail(X) -> tail(X)
mark(zeros) -> azeros
mark(tail(X)) -> atail(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0





The following dependency pair can be strictly oriented:

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


There are no usable rules w.r.t. to the implicit AFS that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(MARK(x1))=  x1  
  POL(cons(x1, x2))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Nar
           →DP Problem 2
Nar
             ...
               →DP Problem 7
Dependency Graph


Dependency Pair:


Rules:


azeros -> cons(0, zeros)
azeros -> zeros
atail(cons(X, XS)) -> mark(XS)
atail(X) -> tail(X)
mark(zeros) -> azeros
mark(tail(X)) -> atail(mark(X))
mark(cons(X1, X2)) -> cons(mark(X1), X2)
mark(0) -> 0





Using the Dependency Graph resulted in no new DP problems.

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