Term Rewriting System R:
[X, Y, L]
eq(0, 0) -> true
eq(s(X), s(Y)) -> eq(X, Y)
eq(X, Y) -> false
inf(X) -> cons(X, inf(s(X)))
take(0, X) -> nil
take(s(X), cons(Y, L)) -> cons(Y, take(X, L))
length(nil) -> 0
length(cons(X, L)) -> s(length(L))

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

EQ(s(X), s(Y)) -> EQ(X, Y)
INF(X) -> INF(s(X))
TAKE(s(X), cons(Y, L)) -> TAKE(X, L)
LENGTH(cons(X, L)) -> LENGTH(L)

Furthermore, R contains four SCCs.


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


Dependency Pair:

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


Rules:


eq(0, 0) -> true
eq(s(X), s(Y)) -> eq(X, Y)
eq(X, Y) -> false
inf(X) -> cons(X, inf(s(X)))
take(0, X) -> nil
take(s(X), cons(Y, L)) -> cons(Y, take(X, L))
length(nil) -> 0
length(cons(X, L)) -> s(length(L))


Strategy:

innermost




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


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


Dependency Pair:

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


Rule:

none


Strategy:

innermost




We number the DPs as follows:
  1. EQ(s(X), s(Y)) -> EQ(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 Pair:

INF(X) -> INF(s(X))


Rules:


eq(0, 0) -> true
eq(s(X), s(Y)) -> eq(X, Y)
eq(X, Y) -> false
inf(X) -> cons(X, inf(s(X)))
take(0, X) -> nil
take(s(X), cons(Y, L)) -> cons(Y, take(X, L))
length(nil) -> 0
length(cons(X, L)) -> s(length(L))


Strategy:

innermost




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


   R
DPs
       →DP Problem 1
UsableRules
       →DP Problem 2
UsableRules
           →DP Problem 6
Non Termination


Dependency Pair:

INF(X) -> INF(s(X))


Rule:

none


Strategy:

innermost




Found an infinite P-chain over R:
P =

INF(X) -> INF(s(X))

R = none

s = INF(X)
evaluates to t =INF(s(X))

Thus, s starts an infinite chain as s matches t.

Innermost Non-Termination of R could be shown.
Duration:
0:01 minutes