The rewrite relation of the following TRS is considered.
first(0,X) | → | nil | (1) |
first(s(X),cons(Y,Z)) | → | cons(Y,n__first(X,activate(Z))) | (2) |
from(X) | → | cons(X,n__from(n__s(X))) | (3) |
first(X1,X2) | → | n__first(X1,X2) | (4) |
from(X) | → | n__from(X) | (5) |
s(X) | → | n__s(X) | (6) |
activate(n__first(X1,X2)) | → | first(activate(X1),activate(X2)) | (7) |
activate(n__from(X)) | → | from(activate(X)) | (8) |
activate(n__s(X)) | → | s(activate(X)) | (9) |
activate(X) | → | X | (10) |
first#(s(X),cons(Y,Z)) | → | activate#(Z) | (11) |
activate#(n__first(X1,X2)) | → | first#(activate(X1),activate(X2)) | (12) |
activate#(n__first(X1,X2)) | → | activate#(X1) | (13) |
activate#(n__first(X1,X2)) | → | activate#(X2) | (14) |
activate#(n__from(X)) | → | from#(activate(X)) | (15) |
activate#(n__from(X)) | → | activate#(X) | (16) |
activate#(n__s(X)) | → | s#(activate(X)) | (17) |
activate#(n__s(X)) | → | activate#(X) | (18) |
The dependency pairs are split into 1 component.
activate#(n__first(X1,X2)) | → | first#(activate(X1),activate(X2)) | (12) |
first#(s(X),cons(Y,Z)) | → | activate#(Z) | (11) |
activate#(n__first(X1,X2)) | → | activate#(X1) | (13) |
activate#(n__first(X1,X2)) | → | activate#(X2) | (14) |
activate#(n__from(X)) | → | activate#(X) | (16) |
activate#(n__s(X)) | → | activate#(X) | (18) |
[first#(x1, x2)] | = | 1 + x1 + x2 |
[activate(x1)] | = | x1 |
[n__first(x1, x2)] | = | 1 + x1 + x2 |
[first(x1, x2)] | = | 1 + x1 + x2 |
[n__from(x1)] | = | 2 + x1 |
[from(x1)] | = | 2 + x1 |
[n__s(x1)] | = | 1 + x1 |
[s(x1)] | = | 1 + x1 |
[cons(x1, x2)] | = | -2 + x2 |
[0] | = | 0 |
[nil] | = | 1 |
[activate#(x1)] | = | x1 |
activate#(n__first(X1,X2)) | → | activate#(X1) | (13) |
activate#(n__first(X1,X2)) | → | activate#(X2) | (14) |
activate#(n__from(X)) | → | activate#(X) | (16) |
activate#(n__s(X)) | → | activate#(X) | (18) |
prec(n__first) | = | 2 | weight(n__first) | = | 2 | ||||
prec(activate) | = | 7 | weight(activate) | = | 0 | ||||
prec(first) | = | 4 | weight(first) | = | 2 | ||||
prec(n__from) | = | 3 | weight(n__from) | = | 2 | ||||
prec(from) | = | 5 | weight(from) | = | 2 | ||||
prec(n__s) | = | 0 | weight(n__s) | = | 1 | ||||
prec(s) | = | 1 | weight(s) | = | 1 | ||||
prec(nil) | = | 6 | weight(nil) | = | 2 |
π(activate#) | = | 1 |
π(n__first) | = | [2] |
π(first#) | = | 2 |
π(activate) | = | [1] |
π(cons) | = | 2 |
π(first) | = | [2] |
π(n__from) | = | [] |
π(from) | = | [] |
π(n__s) | = | [] |
π(s) | = | [] |
π(nil) | = | [] |
activate#(n__first(X1,X2)) | → | first#(activate(X1),activate(X2)) | (12) |
[s(x1)] | = | 1 · x1 |
[cons(x1, x2)] | = | 1 · x1 + 1 · x2 |
[activate#(x1)] | = | 1 · x1 |
[first#(x1, x2)] | = | 1 · x1 + 1 · x2 |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
first#(s(X),cons(Y,Z)) | → | activate#(Z) | (11) |
2 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.