Term Rewriting System R:
[N, X, Y, Z]
terms(N) -> cons(recip(sqr(N)), terms(s(N)))
sqr(0) -> 0
sqr(s(X)) -> s(add(sqr(X), dbl(X)))
dbl(0) -> 0
dbl(s(X)) -> s(s(dbl(X)))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
half(0) -> 0
half(s(0)) -> 0
half(s(s(X))) -> s(half(X))
half(dbl(X)) -> X
Termination of R to be shown.
R
↳Dependency Pair Analysis
R contains the following Dependency Pairs:
TERMS(N) -> SQR(N)
TERMS(N) -> TERMS(s(N))
SQR(s(X)) -> ADD(sqr(X), dbl(X))
SQR(s(X)) -> SQR(X)
SQR(s(X)) -> DBL(X)
DBL(s(X)) -> DBL(X)
ADD(s(X), Y) -> ADD(X, Y)
FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)
HALF(s(s(X))) -> HALF(X)
Furthermore, R contains six SCCs.
R
↳DPs
→DP Problem 1
↳Size-Change Principle
→DP Problem 2
↳SCP
→DP Problem 3
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳SCP
→DP Problem 6
↳MRR
Dependency Pair:
ADD(s(X), Y) -> ADD(X, Y)
Rules:
terms(N) -> cons(recip(sqr(N)), terms(s(N)))
sqr(0) -> 0
sqr(s(X)) -> s(add(sqr(X), dbl(X)))
dbl(0) -> 0
dbl(s(X)) -> s(s(dbl(X)))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
half(0) -> 0
half(s(0)) -> 0
half(s(s(X))) -> s(half(X))
half(dbl(X)) -> X
We number the DPs as follows:
- ADD(s(X), Y) -> ADD(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
↳Size-Change Principle
→DP Problem 3
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳SCP
→DP Problem 6
↳MRR
Dependency Pair:
DBL(s(X)) -> DBL(X)
Rules:
terms(N) -> cons(recip(sqr(N)), terms(s(N)))
sqr(0) -> 0
sqr(s(X)) -> s(add(sqr(X), dbl(X)))
dbl(0) -> 0
dbl(s(X)) -> s(s(dbl(X)))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
half(0) -> 0
half(s(0)) -> 0
half(s(s(X))) -> s(half(X))
half(dbl(X)) -> X
We number the DPs as follows:
- DBL(s(X)) -> DBL(X)
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
↳SCP
→DP Problem 3
↳Size-Change Principle
→DP Problem 4
↳SCP
→DP Problem 5
↳SCP
→DP Problem 6
↳MRR
Dependency Pair:
FIRST(s(X), cons(Y, Z)) -> FIRST(X, Z)
Rules:
terms(N) -> cons(recip(sqr(N)), terms(s(N)))
sqr(0) -> 0
sqr(s(X)) -> s(add(sqr(X), dbl(X)))
dbl(0) -> 0
dbl(s(X)) -> s(s(dbl(X)))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
half(0) -> 0
half(s(0)) -> 0
half(s(s(X))) -> s(half(X))
half(dbl(X)) -> X
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
↳SCP
→DP Problem 4
↳Size-Change Principle
→DP Problem 5
↳SCP
→DP Problem 6
↳MRR
Dependency Pair:
HALF(s(s(X))) -> HALF(X)
Rules:
terms(N) -> cons(recip(sqr(N)), terms(s(N)))
sqr(0) -> 0
sqr(s(X)) -> s(add(sqr(X), dbl(X)))
dbl(0) -> 0
dbl(s(X)) -> s(s(dbl(X)))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
half(0) -> 0
half(s(0)) -> 0
half(s(s(X))) -> s(half(X))
half(dbl(X)) -> X
We number the DPs as follows:
- HALF(s(s(X))) -> HALF(X)
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
↳SCP
→DP Problem 3
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳Size-Change Principle
→DP Problem 6
↳MRR
Dependency Pair:
SQR(s(X)) -> SQR(X)
Rules:
terms(N) -> cons(recip(sqr(N)), terms(s(N)))
sqr(0) -> 0
sqr(s(X)) -> s(add(sqr(X), dbl(X)))
dbl(0) -> 0
dbl(s(X)) -> s(s(dbl(X)))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
half(0) -> 0
half(s(0)) -> 0
half(s(s(X))) -> s(half(X))
half(dbl(X)) -> X
We number the DPs as follows:
- SQR(s(X)) -> SQR(X)
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
↳SCP
→DP Problem 3
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳SCP
→DP Problem 6
↳Modular Removal of Rules
Dependency Pair:
TERMS(N) -> TERMS(s(N))
Rules:
terms(N) -> cons(recip(sqr(N)), terms(s(N)))
sqr(0) -> 0
sqr(s(X)) -> s(add(sqr(X), dbl(X)))
dbl(0) -> 0
dbl(s(X)) -> s(s(dbl(X)))
add(0, X) -> X
add(s(X), Y) -> s(add(X, Y))
first(0, X) -> nil
first(s(X), cons(Y, Z)) -> cons(Y, first(X, Z))
half(0) -> 0
half(s(0)) -> 0
half(s(s(X))) -> s(half(X))
half(dbl(X)) -> X
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(TERMS(x1)) | = x1 |
POL(s(x1)) | = x1 |
We have the following set D of usable symbols: {TERMS, s}
No Dependency Pairs can be deleted.
13 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
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳SCP
→DP Problem 6
↳MRR
→DP Problem 7
↳Non-Overlappingness Check
Dependency Pair:
TERMS(N) -> TERMS(s(N))
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
↳SCP
→DP Problem 4
↳SCP
→DP Problem 5
↳SCP
→DP Problem 6
↳MRR
→DP Problem 7
↳NOC
...
→DP Problem 8
↳Non Termination
Dependency Pair:
TERMS(N) -> TERMS(s(N))
Rule:
none
Strategy:
innermost
Found an infinite P-chain over R:
P =
TERMS(N) -> TERMS(s(N))
R = none
s = TERMS(N)
evaluates to t =TERMS(s(N))
Thus, s starts an infinite chain as s matches t.
Non-Termination of R could be shown.
Duration:
0:01 minutes