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)


Additionally, the following rules can be oriented:

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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(a__inf(x1))=  0  
  POL(a__length(x1))=  1  
  POL(false)=  0  
  POL(take(x1, x2))=  0  
  POL(true)=  0  
  POL(A__EQ(x1, x2))=  x1  
  POL(mark(x1))=  1 + x1  
  POL(0)=  0  
  POL(eq(x1, x2))=  0  
  POL(a__take(x1, x2))=  0  
  POL(cons(x1, x2))=  0  
  POL(inf(x1))=  0  
  POL(nil)=  0  
  POL(s(x1))=  1 + x1  
  POL(a__eq(x1, x2))=  0  
  POL(length(x1))=  0  

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(inf(X)) -> MARK(X)


Additionally, the following rules can be oriented:

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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(a__inf(x1))=  1 + x1  
  POL(MARK(x1))=  x1  
  POL(a__length(x1))=  x1  
  POL(false)=  0  
  POL(take(x1, x2))=  x1 + x2  
  POL(true)=  0  
  POL(mark(x1))=  x1  
  POL(0)=  0  
  POL(eq(x1, x2))=  0  
  POL(a__take(x1, x2))=  x1 + x2  
  POL(cons(x1, x2))=  0  
  POL(inf(x1))=  1 + x1  
  POL(nil)=  0  
  POL(s(x1))=  0  
  POL(a__eq(x1, x2))=  0  
  POL(length(x1))=  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(length(X)) -> MARK(X)
MARK(take(X1, X2)) -> MARK(X2)
MARK(take(X1, X2)) -> MARK(X1)


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)


Additionally, the following rules can be oriented:

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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(a__inf(x1))=  0  
  POL(MARK(x1))=  x1  
  POL(a__length(x1))=  1 + x1  
  POL(false)=  0  
  POL(take(x1, x2))=  x1 + x2  
  POL(true)=  0  
  POL(mark(x1))=  x1  
  POL(0)=  0  
  POL(eq(x1, x2))=  0  
  POL(a__take(x1, x2))=  x1 + x2  
  POL(cons(x1, x2))=  0  
  POL(inf(x1))=  0  
  POL(nil)=  0  
  POL(s(x1))=  0  
  POL(a__eq(x1, x2))=  0  
  POL(length(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 5
Polynomial Ordering


Dependency Pairs:

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


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)


Additionally, the following rules can be oriented:

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


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(a__inf(x1))=  0  
  POL(MARK(x1))=  x1  
  POL(a__length(x1))=  0  
  POL(false)=  0  
  POL(take(x1, x2))=  1 + x1 + x2  
  POL(true)=  0  
  POL(mark(x1))=  x1  
  POL(0)=  0  
  POL(eq(x1, x2))=  0  
  POL(a__take(x1, x2))=  1 + x1 + x2  
  POL(cons(x1, x2))=  0  
  POL(inf(x1))=  0  
  POL(nil)=  0  
  POL(s(x1))=  0  
  POL(a__eq(x1, x2))=  0  
  POL(length(x1))=  0  

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