The rewrite relation of the following TRS is considered.
a__nats | → | cons(0,incr(nats)) | (1) |
a__pairs | → | cons(0,incr(odds)) | (2) |
a__odds | → | a__incr(a__pairs) | (3) |
a__incr(cons(X,XS)) | → | cons(s(mark(X)),incr(XS)) | (4) |
a__head(cons(X,XS)) | → | mark(X) | (5) |
a__tail(cons(X,XS)) | → | mark(XS) | (6) |
mark(nats) | → | a__nats | (7) |
mark(incr(X)) | → | a__incr(mark(X)) | (8) |
mark(pairs) | → | a__pairs | (9) |
mark(odds) | → | a__odds | (10) |
mark(head(X)) | → | a__head(mark(X)) | (11) |
mark(tail(X)) | → | a__tail(mark(X)) | (12) |
mark(cons(X1,X2)) | → | cons(mark(X1),X2) | (13) |
mark(0) | → | 0 | (14) |
mark(s(X)) | → | s(mark(X)) | (15) |
a__nats | → | nats | (16) |
a__incr(X) | → | incr(X) | (17) |
a__pairs | → | pairs | (18) |
a__odds | → | odds | (19) |
a__head(X) | → | head(X) | (20) |
a__tail(X) | → | tail(X) | (21) |
[a__nats] | = | 0 |
[cons(x1, x2)] | = | 1 · x1 + 2 · x2 |
[0] | = | 0 |
[incr(x1)] | = | 2 · x1 |
[nats] | = | 0 |
[a__pairs] | = | 0 |
[odds] | = | 0 |
[a__odds] | = | 0 |
[a__incr(x1)] | = | 2 · x1 |
[s(x1)] | = | 1 · x1 |
[mark(x1)] | = | 1 · x1 |
[a__head(x1)] | = | 1 + 1 · x1 |
[a__tail(x1)] | = | 1 · x1 |
[pairs] | = | 0 |
[head(x1)] | = | 1 + 1 · x1 |
[tail(x1)] | = | 1 · x1 |
a__head(cons(X,XS)) | → | mark(X) | (5) |
[a__nats] | = | 0 |
[cons(x1, x2)] | = | 1 · x1 + 2 · x2 |
[0] | = | 0 |
[incr(x1)] | = | 2 · x1 |
[nats] | = | 0 |
[a__pairs] | = | 0 |
[odds] | = | 0 |
[a__odds] | = | 0 |
[a__incr(x1)] | = | 2 · x1 |
[s(x1)] | = | 1 · x1 |
[mark(x1)] | = | 2 · x1 |
[a__tail(x1)] | = | 2 · x1 |
[pairs] | = | 0 |
[head(x1)] | = | 1 + 2 · x1 |
[a__head(x1)] | = | 1 + 2 · x1 |
[tail(x1)] | = | 2 · x1 |
mark(head(X)) | → | a__head(mark(X)) | (11) |
[a__nats] | = | 0 |
[cons(x1, x2)] | = | 2 · x1 + 2 · x2 |
[0] | = | 0 |
[incr(x1)] | = | 2 · x1 |
[nats] | = | 0 |
[a__pairs] | = | 0 |
[odds] | = | 0 |
[a__odds] | = | 0 |
[a__incr(x1)] | = | 2 · x1 |
[s(x1)] | = | 1 · x1 |
[mark(x1)] | = | 2 · x1 |
[a__tail(x1)] | = | 2 · x1 |
[pairs] | = | 0 |
[tail(x1)] | = | 2 · x1 |
[a__head(x1)] | = | 1 + 2 · x1 |
[head(x1)] | = | 2 · x1 |
a__head(X) | → | head(X) | (20) |
[a__nats] | = | 0 |
[cons(x1, x2)] | = | 2 · x1 + 2 · x2 |
[0] | = | 0 |
[incr(x1)] | = | 2 · x1 |
[nats] | = | 0 |
[a__pairs] | = | 0 |
[odds] | = | 0 |
[a__odds] | = | 0 |
[a__incr(x1)] | = | 2 · x1 |
[s(x1)] | = | 2 · x1 |
[mark(x1)] | = | 1 · x1 |
[a__tail(x1)] | = | 1 + 2 · x1 |
[pairs] | = | 0 |
[tail(x1)] | = | 1 + 2 · x1 |
a__tail(cons(X,XS)) | → | mark(XS) | (6) |
[a__nats] | = | 0 |
[cons(x1, x2)] | = | 1 · x1 + 2 · x2 |
[0] | = | 0 |
[incr(x1)] | = | 2 · x1 |
[nats] | = | 0 |
[a__pairs] | = | 0 |
[odds] | = | 0 |
[a__odds] | = | 0 |
[a__incr(x1)] | = | 2 · x1 |
[s(x1)] | = | 1 · x1 |
[mark(x1)] | = | 2 · x1 |
[pairs] | = | 0 |
[tail(x1)] | = | 1 + 2 · x1 |
[a__tail(x1)] | = | 1 + 2 · x1 |
mark(tail(X)) | → | a__tail(mark(X)) | (12) |
[a__nats] | = | 0 |
[cons(x1, x2)] | = | 2 · x1 + 2 · x2 |
[0] | = | 0 |
[incr(x1)] | = | 2 · x1 |
[nats] | = | 0 |
[a__pairs] | = | 0 |
[odds] | = | 0 |
[a__odds] | = | 0 |
[a__incr(x1)] | = | 2 · x1 |
[s(x1)] | = | 1 · x1 |
[mark(x1)] | = | 2 · x1 |
[pairs] | = | 0 |
[a__tail(x1)] | = | 1 + 1 · x1 |
[tail(x1)] | = | 1 · x1 |
a__tail(X) | → | tail(X) | (21) |
[a__nats] | = | 2 |
[cons(x1, x2)] | = | 1 · x1 + 1 · x2 |
[0] | = | 0 |
[incr(x1)] | = | 2 · x1 |
[nats] | = | 1 |
[a__pairs] | = | 0 |
[odds] | = | 0 |
[a__odds] | = | 0 |
[a__incr(x1)] | = | 2 · x1 |
[s(x1)] | = | 1 · x1 |
[mark(x1)] | = | 2 · x1 |
[pairs] | = | 0 |
a__nats | → | nats | (16) |
a__odds# | → | a__incr#(a__pairs) | (22) |
a__odds# | → | a__pairs# | (23) |
a__incr#(cons(X,XS)) | → | mark#(X) | (24) |
mark#(nats) | → | a__nats# | (25) |
mark#(incr(X)) | → | a__incr#(mark(X)) | (26) |
mark#(incr(X)) | → | mark#(X) | (27) |
mark#(pairs) | → | a__pairs# | (28) |
mark#(odds) | → | a__odds# | (29) |
mark#(cons(X1,X2)) | → | mark#(X1) | (30) |
mark#(s(X)) | → | mark#(X) | (31) |
The dependency pairs are split into 1 component.
a__incr#(cons(X,XS)) | → | mark#(X) | (24) |
mark#(incr(X)) | → | a__incr#(mark(X)) | (26) |
mark#(incr(X)) | → | mark#(X) | (27) |
mark#(odds) | → | a__odds# | (29) |
a__odds# | → | a__incr#(a__pairs) | (22) |
mark#(cons(X1,X2)) | → | mark#(X1) | (30) |
mark#(s(X)) | → | mark#(X) | (31) |
We restrict the innermost strategy to the following left hand sides.
a__nats |
a__pairs |
a__odds |
mark(nats) |
mark(incr(x0)) |
mark(pairs) |
mark(odds) |
mark(head(x0)) |
mark(tail(x0)) |
mark(cons(x0,x1)) |
mark(0) |
mark(s(x0)) |
a__incr(x0) |
[a__nats] | = | 0 |
[cons(x1, x2)] | = | 2 · x1 + 1 · x2 |
[0] | = | 0 |
[incr(x1)] | = | 1 · x1 |
[nats] | = | 0 |
[a__pairs] | = | 2 |
[odds] | = | 2 |
[a__odds] | = | 2 |
[a__incr(x1)] | = | 1 · x1 |
[s(x1)] | = | 1 · x1 |
[mark(x1)] | = | 1 · x1 |
[pairs] | = | 2 |
[a__incr#(x1)] | = | 1 · x1 |
[mark#(x1)] | = | 2 · x1 |
[a__odds#] | = | 2 |
mark#(odds) | → | a__odds# | (29) |
The dependency pairs are split into 1 component.
mark#(incr(X)) | → | a__incr#(mark(X)) | (26) |
a__incr#(cons(X,XS)) | → | mark#(X) | (24) |
mark#(incr(X)) | → | mark#(X) | (27) |
mark#(cons(X1,X2)) | → | mark#(X1) | (30) |
mark#(s(X)) | → | mark#(X) | (31) |
[a__incr#(x1)] | = | 2 · x1 |
[mark(x1)] | = | x1 |
[nats] | = | 0 |
[a__nats] | = | 0 |
[incr(x1)] | = | 1 + 2 · x1 |
[a__incr(x1)] | = | 1 + 2 · x1 |
[pairs] | = | 0 |
[a__pairs] | = | 0 |
[odds] | = | 1 |
[a__odds] | = | 1 |
[cons(x1, x2)] | = | x1 |
[0] | = | 0 |
[s(x1)] | = | 1 + x1 |
[mark#(x1)] | = | x1 |
mark#(incr(X)) | → | a__incr#(mark(X)) | (26) |
mark#(incr(X)) | → | mark#(X) | (27) |
mark#(s(X)) | → | mark#(X) | (31) |
The dependency pairs are split into 1 component.
mark#(cons(X1,X2)) | → | mark#(X1) | (30) |
We restrict the rewrite rules to the following usable rules of the DP problem.
There are no rules.
We restrict the innermost strategy to the following left hand sides.
There are no lhss.
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
mark#(cons(X1,X2)) | → | mark#(X1) | (30) |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.