Term Rewriting System R:
[X, Y, Z]
sel(s(X), cons(Y, Z)) -> sel(X, Z)
sel(0, cons(X, Z)) -> X
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))
sel1(s(X), cons(Y, Z)) -> sel1(X, Z)
sel1(0, cons(X, Z)) -> quote(X)
first1(0, Z) -> nil1
first1(s(X), cons(Y, Z)) -> cons1(quote(Y), first1(X, Z))
quote(0) -> 01
quote(s(X)) -> s1(quote(X))
quote(sel(X, Z)) -> sel1(X, Z)
quote1(cons(X, Z)) -> cons1(quote(X), quote1(Z))
quote1(nil) -> nil1
quote1(first(X, Z)) -> first1(X, Z)
unquote(01) -> 0
unquote(s1(X)) -> s(unquote(X))
unquote1(nil1) -> nil
unquote1(cons1(X, Z)) -> fcons(unquote(X), unquote1(Z))
fcons(X, Z) -> cons(X, Z)
Termination of R to be shown.
R
↳Dependency Pair Analysis
R contains the following Dependency Pairs:
SEL(s(X), cons(Y, Z)) -> SEL(X, Z)
FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)
FROM(X) -> FROM(s(X))
SEL1(s(X), cons(Y, Z)) -> SEL1(X, Z)
SEL1(0, cons(X, Z)) -> QUOTE(X)
FIRST1(s(X), cons(Y, Z)) -> QUOTE(Y)
FIRST1(s(X), cons(Y, Z)) -> FIRST1(X, Z)
QUOTE(s(X)) -> QUOTE(X)
QUOTE(sel(X, Z)) -> SEL1(X, Z)
QUOTE1(cons(X, Z)) -> QUOTE(X)
QUOTE1(cons(X, Z)) -> QUOTE1(Z)
QUOTE1(first(X, Z)) -> FIRST1(X, Z)
UNQUOTE(s1(X)) -> UNQUOTE(X)
UNQUOTE1(cons1(X, Z)) -> FCONS(unquote(X), unquote1(Z))
UNQUOTE1(cons1(X, Z)) -> UNQUOTE(X)
UNQUOTE1(cons1(X, Z)) -> UNQUOTE1(Z)
Furthermore, R contains eight SCCs.
R
↳DPs
→DP Problem 1
↳Size-Change Principle
→DP Problem 2
↳SCP
→DP Problem 3
↳MRR
Dependency Pair:
SEL(s(X), cons(Y, Z)) -> SEL(X, Z)
Rules:
sel(s(X), cons(Y, Z)) -> sel(X, Z)
sel(0, cons(X, Z)) -> X
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))
sel1(s(X), cons(Y, Z)) -> sel1(X, Z)
sel1(0, cons(X, Z)) -> quote(X)
first1(0, Z) -> nil1
first1(s(X), cons(Y, Z)) -> cons1(quote(Y), first1(X, Z))
quote(0) -> 01
quote(s(X)) -> s1(quote(X))
quote(sel(X, Z)) -> sel1(X, Z)
quote1(cons(X, Z)) -> cons1(quote(X), quote1(Z))
quote1(nil) -> nil1
quote1(first(X, Z)) -> first1(X, Z)
unquote(01) -> 0
unquote(s1(X)) -> s(unquote(X))
unquote1(nil1) -> nil
unquote1(cons1(X, Z)) -> fcons(unquote(X), unquote1(Z))
fcons(X, Z) -> cons(X, Z)
We number the DPs as follows:
- SEL(s(X), cons(Y, Z)) -> SEL(X, Z)
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:
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s(x1)
We obtain no new DP problems.
R
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳Size-Change Principle
→DP Problem 3
↳MRR
Dependency Pair:
FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)
Rules:
sel(s(X), cons(Y, Z)) -> sel(X, Z)
sel(0, cons(X, Z)) -> X
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))
sel1(s(X), cons(Y, Z)) -> sel1(X, Z)
sel1(0, cons(X, Z)) -> quote(X)
first1(0, Z) -> nil1
first1(s(X), cons(Y, Z)) -> cons1(quote(Y), first1(X, Z))
quote(0) -> 01
quote(s(X)) -> s1(quote(X))
quote(sel(X, Z)) -> sel1(X, Z)
quote1(cons(X, Z)) -> cons1(quote(X), quote1(Z))
quote1(nil) -> nil1
quote1(first(X, Z)) -> first1(X, Z)
unquote(01) -> 0
unquote(s1(X)) -> s(unquote(X))
unquote1(nil1) -> nil
unquote1(cons1(X, Z)) -> fcons(unquote(X), unquote1(Z))
fcons(X, Z) -> cons(X, Z)
We number the DPs as follows:
- FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)
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:
cons(x1, x2) -> cons(x1, x2)
s(x1) -> s(x1)
We obtain no new DP problems.
R
↳DPs
→DP Problem 1
↳SCP
→DP Problem 2
↳SCP
→DP Problem 3
↳Modular Removal of Rules
Dependency Pair:
FROM(X) -> FROM(s(X))
Rules:
sel(s(X), cons(Y, Z)) -> sel(X, Z)
sel(0, cons(X, Z)) -> X
first(0, Z) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
from(X) -> cons(X, from(s(X)))
sel1(s(X), cons(Y, Z)) -> sel1(X, Z)
sel1(0, cons(X, Z)) -> quote(X)
first1(0, Z) -> nil1
first1(s(X), cons(Y, Z)) -> cons1(quote(Y), first1(X, Z))
quote(0) -> 01
quote(s(X)) -> s1(quote(X))
quote(sel(X, Z)) -> sel1(X, Z)
quote1(cons(X, Z)) -> cons1(quote(X), quote1(Z))
quote1(nil) -> nil1
quote1(first(X, Z)) -> first1(X, Z)
unquote(01) -> 0
unquote(s1(X)) -> s(unquote(X))
unquote1(nil1) -> nil
unquote1(cons1(X, Z)) -> fcons(unquote(X), unquote1(Z))
fcons(X, Z) -> cons(X, Z)
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(FROM(x1)) | = x1 |
POL(s(x1)) | = x1 |
We have the following set D of usable symbols: {FROM, s}
No Dependency Pairs can be deleted.
20 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
↳SCP
→DP Problem 3
↳MRR
→DP Problem 9
↳Non-Overlappingness Check
Dependency Pair:
FROM(X) -> FROM(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
↳SCP
→DP Problem 3
↳MRR
→DP Problem 9
↳NOC
...
→DP Problem 10
↳Non Termination
Dependency Pair:
FROM(X) -> FROM(s(X))
Rule:
none
Strategy:
innermost
Found an infinite P-chain over R:
P =
FROM(X) -> FROM(s(X))
R = none
s = FROM(X)
evaluates to t =FROM(s(X))
Thus, s starts an infinite chain as s matches t.
Non-Termination of R could be shown.
Duration:
0:02 minutes