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
Usable Rules (Innermost)
       →DP Problem 2
UsableRules


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




As we are in the innermost case, we can delete all 22 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
           →DP Problem 3
Size-Change Principle
       →DP Problem 2
UsableRules


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. AEQ(s(X), s(Y)) -> AEQ(X, Y)
and get the following Size-Change Graph(s):
{1} , {1}
1>1
2>2

which lead(s) to this/these maximal multigraph(s):
{1} , {1}
1>1
2>2

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
s(x1) -> s(x1)

We obtain no new DP problems.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
Usable Rules (Innermost)


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




As we are in the innermost case, we can delete all 22 non-usable-rules.


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 4
Size-Change Principle


Dependency Pairs:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. MARK(length(X)) -> MARK(X)
  2. MARK(take(X1, X2)) -> MARK(X2)
  3. MARK(take(X1, X2)) -> MARK(X1)
  4. MARK(inf(X)) -> MARK(X)
and get the following Size-Change Graph(s):
{1, 2, 3, 4} , {1, 2, 3, 4}
1>1

which lead(s) to this/these maximal multigraph(s):
{1, 2, 3, 4} , {1, 2, 3, 4}
1>1

DP: empty set
Oriented Rules: none

We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial

with Argument Filtering System:
take(x1, x2) -> take(x1, x2)
inf(x1) -> inf(x1)
length(x1) -> length(x1)

We obtain no new DP problems.

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