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

Innermost 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
Argument Filtering and Ordering
       →DP Problem 2
AFS


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


Strategy:

innermost




The following dependency pair can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
AEQ(x1, x2) -> AEQ(x1, x2)
s(x1) -> s(x1)


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


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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
Argument Filtering and 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


Strategy:

innermost




The following dependency pairs can be strictly oriented:

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


There are no usable rules for innermost w.r.t. to the AFS that need to be oriented.
Used ordering: Homeomorphic Embedding Order with EMB
resulting in one new DP problem.
Used Argument Filtering System:
MARK(x1) -> MARK(x1)
inf(x1) -> inf(x1)
take(x1, x2) -> take(x1, x2)
length(x1) -> length(x1)


   R
DPs
       →DP Problem 1
AFS
       →DP Problem 2
AFS
           →DP Problem 4
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


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

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