Term Rewriting System R:
[N, X, Y, Z, X1, X2]
terms(N) -> cons(recip(sqr(N)), nterms(ns(N)))
terms(X) -> nterms(X)
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, nfirst(X, activate(Z)))
first(X1, X2) -> nfirst(X1, X2)
half(0) -> 0
half(s(0)) -> 0
half(s(s(X))) -> s(half(X))
half(dbl(X)) -> X
s(X) -> ns(X)
activate(nterms(X)) -> terms(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X
Innermost Termination of R to be shown.
R
↳Removing Redundant Rules for Innermost Termination
Removing the following rules from R which left hand sides contain non normal subterms
sqr(s(X)) -> s(add(sqr(X), dbl(X)))
dbl(s(X)) -> s(s(dbl(X)))
add(s(X), Y) -> s(add(X, Y))
first(s(X), cons(Y, Z)) -> cons(Y, nfirst(X, activate(Z)))
half(s(0)) -> 0
half(s(s(X))) -> s(half(X))
R
↳RRRI
→TRS2
↳Dependency Pair Analysis
R contains the following Dependency Pairs:
TERMS(N) -> SQR(N)
ACTIVATE(nterms(X)) -> TERMS(activate(X))
ACTIVATE(nterms(X)) -> ACTIVATE(X)
ACTIVATE(ns(X)) -> S(activate(X))
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nfirst(X1, X2)) -> FIRST(activate(X1), activate(X2))
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
Furthermore, R contains one SCC.
R
↳RRRI
→TRS2
↳DPs
→DP Problem 1
↳Size-Change Principle
Dependency Pairs:
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
ACTIVATE(ns(X)) -> ACTIVATE(X)
ACTIVATE(nterms(X)) -> ACTIVATE(X)
Rules:
terms(N) -> cons(recip(sqr(N)), nterms(ns(N)))
terms(X) -> nterms(X)
sqr(0) -> 0
dbl(0) -> 0
add(0, X) -> X
first(0, X) -> nil
first(X1, X2) -> nfirst(X1, X2)
half(0) -> 0
half(dbl(X)) -> X
s(X) -> ns(X)
activate(nterms(X)) -> terms(activate(X))
activate(ns(X)) -> s(activate(X))
activate(nfirst(X1, X2)) -> first(activate(X1), activate(X2))
activate(X) -> X
We number the DPs as follows:
- ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X2)
- ACTIVATE(nfirst(X1, X2)) -> ACTIVATE(X1)
- ACTIVATE(ns(X)) -> ACTIVATE(X)
- ACTIVATE(nterms(X)) -> ACTIVATE(X)
and get the following Size-Change Graph(s): {4, 3, 2, 1} | , | {4, 3, 2, 1} |
---|
1 | > | 1 |
|
which lead(s) to this/these maximal multigraph(s): {4, 3, 2, 1} | , | {4, 3, 2, 1} |
---|
1 | > | 1 |
|
DP: empty set
Oriented Rules: none
We used the order Homeomorphic Embedding Order with Non-Strict Precedence.
trivial
with Argument Filtering System:
nterms(x1) -> nterms(x1)
ns(x1) -> ns(x1)
nfirst(x1, x2) -> nfirst(x1, x2)
We obtain no new DP problems.
Innermost Termination of R successfully shown.
Duration:
0:00 minutes