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))
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
↳Size-Change Principle
→DP Problem 2
↳MRR
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))
We number the DPs as follows:
- EQ(s(X), s(Y)) -> EQ(X, Y)
and get the following Size-Change Graph(s):
which lead(s) to this/these maximal multigraph(s):
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
↳SCP
→DP Problem 2
↳Modular Removal of Rules
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))
We have the following set of usable rules:
none
To remove rules and DPs from this DP problem we used the following monotonic and CE-compatible order: Polynomial ordering.
Polynomial interpretation:
POL(INF(x1)) | = x1 |
POL(s(x1)) | = x1 |
We have the following set D of usable symbols: {INF, s}
No Dependency Pairs can be deleted.
8 non usable rules have been deleted.
The result of this processor delivers one new DP problem.
R
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳MRR
→DP Problem 5
↳Non-Overlappingness Check
Dependency Pair:
INF(X) -> INF(s(X))
Rule:
none
R does not overlap into P. Moreover, R is locally confluent (all critical pairs are trivially joinable).Hence we can switch to innermost.
The transformation is resulting in one subcycle:
R
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳MRR
→DP Problem 5
↳NOC
...
→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.
Non-Termination of R could be shown.
Duration:
0:01 minutes