The rewrite relation of the following TRS is considered.
terms(N) | → | cons(recip(sqr(N)),n__terms(s(N))) | (1) |
sqr(0) | → | 0 | (2) |
sqr(s(X)) | → | s(add(sqr(X),dbl(X))) | (3) |
dbl(0) | → | 0 | (4) |
dbl(s(X)) | → | s(s(dbl(X))) | (5) |
add(0,X) | → | X | (6) |
add(s(X),Y) | → | s(add(X,Y)) | (7) |
first(0,X) | → | nil | (8) |
first(s(X),cons(Y,Z)) | → | cons(Y,n__first(X,activate(Z))) | (9) |
half(0) | → | 0 | (10) |
half(s(0)) | → | 0 | (11) |
half(s(s(X))) | → | s(half(X)) | (12) |
half(dbl(X)) | → | X | (13) |
terms(X) | → | n__terms(X) | (14) |
first(X1,X2) | → | n__first(X1,X2) | (15) |
activate(n__terms(X)) | → | terms(X) | (16) |
activate(n__first(X1,X2)) | → | first(X1,X2) | (17) |
activate(X) | → | X | (18) |
prec(half) | = | 8 | status(half) | = | [1] | list-extension(half) | = | Lex | ||
prec(n__first) | = | 0 | status(n__first) | = | [2, 1] | list-extension(n__first) | = | Lex | ||
prec(activate) | = | 10 | status(activate) | = | [1] | list-extension(activate) | = | Lex | ||
prec(nil) | = | 0 | status(nil) | = | [] | list-extension(nil) | = | Lex | ||
prec(first) | = | 1 | status(first) | = | [2, 1] | list-extension(first) | = | Lex | ||
prec(add) | = | 1 | status(add) | = | [1, 2] | list-extension(add) | = | Lex | ||
prec(dbl) | = | 1 | status(dbl) | = | [1] | list-extension(dbl) | = | Lex | ||
prec(0) | = | 0 | status(0) | = | [] | list-extension(0) | = | Lex | ||
prec(cons) | = | 0 | status(cons) | = | [2, 1] | list-extension(cons) | = | Lex | ||
prec(n__terms) | = | 0 | status(n__terms) | = | [1] | list-extension(n__terms) | = | Lex | ||
prec(s) | = | 0 | status(s) | = | [1] | list-extension(s) | = | Lex | ||
prec(recip) | = | 0 | status(recip) | = | [1] | list-extension(recip) | = | Lex | ||
prec(sqr) | = | 3 | status(sqr) | = | [1] | list-extension(sqr) | = | Lex | ||
prec(terms) | = | 9 | status(terms) | = | [1] | list-extension(terms) | = | Lex |
[half(x1)] | = | max(2, 6 + 1 · x1) |
[n__first(x1, x2)] | = | max(0, 0 + 1 · x1, 1 + 1 · x2) |
[activate(x1)] | = | 0 + 1 · x1 |
[nil] | = | max(0) |
[first(x1, x2)] | = | max(0, 0 + 1 · x1, 1 + 1 · x2) |
[add(x1, x2)] | = | max(0, 0 + 1 · x1, 0 + 1 · x2) |
[dbl(x1)] | = | max(0, 0 + 1 · x1) |
[0] | = | max(7) |
[cons(x1, x2)] | = | max(0, 0 + 1 · x1, 0 + 1 · x2) |
[n__terms(x1)] | = | max(0, 0 + 1 · x1) |
[s(x1)] | = | max(0, 0 + 1 · x1) |
[recip(x1)] | = | 0 + 1 · x1 |
[sqr(x1)] | = | max(0, 0 + 1 · x1) |
[terms(x1)] | = | max(0, 0 + 1 · x1) |
terms(N) | → | cons(recip(sqr(N)),n__terms(s(N))) | (1) |
sqr(0) | → | 0 | (2) |
sqr(s(X)) | → | s(add(sqr(X),dbl(X))) | (3) |
dbl(0) | → | 0 | (4) |
dbl(s(X)) | → | s(s(dbl(X))) | (5) |
add(0,X) | → | X | (6) |
add(s(X),Y) | → | s(add(X,Y)) | (7) |
first(0,X) | → | nil | (8) |
first(s(X),cons(Y,Z)) | → | cons(Y,n__first(X,activate(Z))) | (9) |
half(0) | → | 0 | (10) |
half(s(0)) | → | 0 | (11) |
half(s(s(X))) | → | s(half(X)) | (12) |
half(dbl(X)) | → | X | (13) |
terms(X) | → | n__terms(X) | (14) |
first(X1,X2) | → | n__first(X1,X2) | (15) |
activate(n__terms(X)) | → | terms(X) | (16) |
activate(n__first(X1,X2)) | → | first(X1,X2) | (17) |
activate(X) | → | X | (18) |
There are no rules in the TRS. Hence, it is terminating.