Term Rewriting System R:
[X, Y, X1, X2, L]
aeq(0, 0) -> true
aeq(s(X), s(Y)) -> aeq(X, Y)
aeq(X, Y) -> false
aeq(X1, X2) -> eq(X1, X2)
ainf(X) -> cons(X, inf(s(X)))
ainf(X) -> inf(X)
atake(0, X) -> nil
atake(s(X), cons(Y, L)) -> cons(Y, take(X, L))
atake(X1, X2) -> take(X1, X2)
alength(nil) -> 0
alength(cons(X, L)) -> s(length(L))
alength(X) -> length(X)
mark(eq(X1, X2)) -> aeq(X1, X2)
mark(inf(X)) -> ainf(mark(X))
mark(take(X1, X2)) -> atake(mark(X1), mark(X2))
mark(length(X)) -> alength(mark(X))
mark(0) -> 0
mark(true) -> true
mark(s(X)) -> s(X)
mark(false) -> false
mark(cons(X1, X2)) -> cons(X1, X2)
mark(nil) -> nil

Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

AEQ(s(X), s(Y)) -> AEQ(X, Y)
MARK(eq(X1, X2)) -> AEQ(X1, X2)
MARK(inf(X)) -> AINF(mark(X))
MARK(inf(X)) -> MARK(X)
MARK(take(X1, X2)) -> ATAKE(mark(X1), mark(X2))
MARK(take(X1, X2)) -> MARK(X1)
MARK(take(X1, X2)) -> MARK(X2)
MARK(length(X)) -> ALENGTH(mark(X))
MARK(length(X)) -> MARK(X)

Furthermore, R contains two SCCs.


   R
DPs
       →DP Problem 1
Polynomial Ordering
       →DP Problem 2
Polo


Dependency Pair:

AEQ(s(X), s(Y)) -> AEQ(X, Y)


Rules:


aeq(0, 0) -> true
aeq(s(X), s(Y)) -> aeq(X, Y)
aeq(X, Y) -> false
aeq(X1, X2) -> eq(X1, X2)
ainf(X) -> cons(X, inf(s(X)))
ainf(X) -> inf(X)
atake(0, X) -> nil
atake(s(X), cons(Y, L)) -> cons(Y, take(X, L))
atake(X1, X2) -> take(X1, X2)
alength(nil) -> 0
alength(cons(X, L)) -> s(length(L))
alength(X) -> length(X)
mark(eq(X1, X2)) -> aeq(X1, X2)
mark(inf(X)) -> ainf(mark(X))
mark(take(X1, X2)) -> atake(mark(X1), mark(X2))
mark(length(X)) -> alength(mark(X))
mark(0) -> 0
mark(true) -> true
mark(s(X)) -> s(X)
mark(false) -> false
mark(cons(X1, X2)) -> cons(X1, X2)
mark(nil) -> nil





The following dependency pair can be strictly oriented:

AEQ(s(X), s(Y)) -> AEQ(X, Y)


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(s(x1))=  1 + x1  
  POL(A__EQ(x1, x2))=  x1  

resulting in one new DP problem.



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


Dependency Pair:


Rules:


aeq(0, 0) -> true
aeq(s(X), s(Y)) -> aeq(X, Y)
aeq(X, Y) -> false
aeq(X1, X2) -> eq(X1, X2)
ainf(X) -> cons(X, inf(s(X)))
ainf(X) -> inf(X)
atake(0, X) -> nil
atake(s(X), cons(Y, L)) -> cons(Y, take(X, L))
atake(X1, X2) -> take(X1, X2)
alength(nil) -> 0
alength(cons(X, L)) -> s(length(L))
alength(X) -> length(X)
mark(eq(X1, X2)) -> aeq(X1, X2)
mark(inf(X)) -> ainf(mark(X))
mark(take(X1, X2)) -> atake(mark(X1), mark(X2))
mark(length(X)) -> alength(mark(X))
mark(0) -> 0
mark(true) -> true
mark(s(X)) -> s(X)
mark(false) -> false
mark(cons(X1, X2)) -> cons(X1, X2)
mark(nil) -> nil





Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polynomial Ordering


Dependency Pairs:

MARK(length(X)) -> MARK(X)
MARK(take(X1, X2)) -> MARK(X2)
MARK(take(X1, X2)) -> MARK(X1)
MARK(inf(X)) -> MARK(X)


Rules:


aeq(0, 0) -> true
aeq(s(X), s(Y)) -> aeq(X, Y)
aeq(X, Y) -> false
aeq(X1, X2) -> eq(X1, X2)
ainf(X) -> cons(X, inf(s(X)))
ainf(X) -> inf(X)
atake(0, X) -> nil
atake(s(X), cons(Y, L)) -> cons(Y, take(X, L))
atake(X1, X2) -> take(X1, X2)
alength(nil) -> 0
alength(cons(X, L)) -> s(length(L))
alength(X) -> length(X)
mark(eq(X1, X2)) -> aeq(X1, X2)
mark(inf(X)) -> ainf(mark(X))
mark(take(X1, X2)) -> atake(mark(X1), mark(X2))
mark(length(X)) -> alength(mark(X))
mark(0) -> 0
mark(true) -> true
mark(s(X)) -> s(X)
mark(false) -> false
mark(cons(X1, X2)) -> cons(X1, X2)
mark(nil) -> nil





The following dependency pair can be strictly oriented:

MARK(length(X)) -> MARK(X)


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(take(x1, x2))=  x1 + x2  
  POL(inf(x1))=  x1  
  POL(length(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 4
Polynomial Ordering


Dependency Pairs:

MARK(take(X1, X2)) -> MARK(X2)
MARK(take(X1, X2)) -> MARK(X1)
MARK(inf(X)) -> MARK(X)


Rules:


aeq(0, 0) -> true
aeq(s(X), s(Y)) -> aeq(X, Y)
aeq(X, Y) -> false
aeq(X1, X2) -> eq(X1, X2)
ainf(X) -> cons(X, inf(s(X)))
ainf(X) -> inf(X)
atake(0, X) -> nil
atake(s(X), cons(Y, L)) -> cons(Y, take(X, L))
atake(X1, X2) -> take(X1, X2)
alength(nil) -> 0
alength(cons(X, L)) -> s(length(L))
alength(X) -> length(X)
mark(eq(X1, X2)) -> aeq(X1, X2)
mark(inf(X)) -> ainf(mark(X))
mark(take(X1, X2)) -> atake(mark(X1), mark(X2))
mark(length(X)) -> alength(mark(X))
mark(0) -> 0
mark(true) -> true
mark(s(X)) -> s(X)
mark(false) -> false
mark(cons(X1, X2)) -> cons(X1, X2)
mark(nil) -> nil





The following dependency pairs can be strictly oriented:

MARK(take(X1, X2)) -> MARK(X2)
MARK(take(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(take(x1, x2))=  1 + x1 + x2  
  POL(inf(x1))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 4
Polo
             ...
               →DP Problem 5
Polynomial Ordering


Dependency Pair:

MARK(inf(X)) -> MARK(X)


Rules:


aeq(0, 0) -> true
aeq(s(X), s(Y)) -> aeq(X, Y)
aeq(X, Y) -> false
aeq(X1, X2) -> eq(X1, X2)
ainf(X) -> cons(X, inf(s(X)))
ainf(X) -> inf(X)
atake(0, X) -> nil
atake(s(X), cons(Y, L)) -> cons(Y, take(X, L))
atake(X1, X2) -> take(X1, X2)
alength(nil) -> 0
alength(cons(X, L)) -> s(length(L))
alength(X) -> length(X)
mark(eq(X1, X2)) -> aeq(X1, X2)
mark(inf(X)) -> ainf(mark(X))
mark(take(X1, X2)) -> atake(mark(X1), mark(X2))
mark(length(X)) -> alength(mark(X))
mark(0) -> 0
mark(true) -> true
mark(s(X)) -> s(X)
mark(false) -> false
mark(cons(X1, X2)) -> cons(X1, X2)
mark(nil) -> nil





The following dependency pair can be strictly oriented:

MARK(inf(X)) -> MARK(X)


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(inf(x1))=  1 + x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 4
Polo
             ...
               →DP Problem 6
Dependency Graph


Dependency Pair:


Rules:


aeq(0, 0) -> true
aeq(s(X), s(Y)) -> aeq(X, Y)
aeq(X, Y) -> false
aeq(X1, X2) -> eq(X1, X2)
ainf(X) -> cons(X, inf(s(X)))
ainf(X) -> inf(X)
atake(0, X) -> nil
atake(s(X), cons(Y, L)) -> cons(Y, take(X, L))
atake(X1, X2) -> take(X1, X2)
alength(nil) -> 0
alength(cons(X, L)) -> s(length(L))
alength(X) -> length(X)
mark(eq(X1, X2)) -> aeq(X1, X2)
mark(inf(X)) -> ainf(mark(X))
mark(take(X1, X2)) -> atake(mark(X1), mark(X2))
mark(length(X)) -> alength(mark(X))
mark(0) -> 0
mark(true) -> true
mark(s(X)) -> s(X)
mark(false) -> false
mark(cons(X1, X2)) -> cons(X1, X2)
mark(nil) -> nil





Using the Dependency Graph resulted in no new DP problems.

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