The rewrite relation of the following TRS is considered.
rev1(0,nil) | → | 0 | (1) |
rev1(s(X),nil) | → | s(X) | (2) |
rev1(X,cons(Y,L)) | → | rev1(Y,L) | (3) |
rev(nil) | → | nil | (4) |
rev(cons(X,L)) | → | cons(rev1(X,L),rev2(X,L)) | (5) |
rev2(X,nil) | → | nil | (6) |
rev2(X,cons(Y,L)) | → | rev(cons(X,rev(rev2(Y,L)))) | (7) |
rev1#(X,cons(Y,L)) | → | rev1#(Y,L) | (8) |
rev#(cons(X,L)) | → | rev2#(X,L) | (9) |
rev#(cons(X,L)) | → | rev1#(X,L) | (10) |
rev2#(X,cons(Y,L)) | → | rev2#(Y,L) | (11) |
rev2#(X,cons(Y,L)) | → | rev#(rev2(Y,L)) | (12) |
rev2#(X,cons(Y,L)) | → | rev#(cons(X,rev(rev2(Y,L)))) | (13) |
The dependency pairs are split into 2 components.
rev2#(X,cons(Y,L)) | → | rev2#(Y,L) | (11) |
rev2#(X,cons(Y,L)) | → | rev#(rev2(Y,L)) | (12) |
rev#(cons(X,L)) | → | rev2#(X,L) | (9) |
rev2#(X,cons(Y,L)) | → | rev#(cons(X,rev(rev2(Y,L)))) | (13) |
π(rev2#) | = | { 2, 2 } |
π(rev#) | = | { 1, 1 } |
π(rev2) | = | { 2 } |
π(rev) | = | { 1 } |
π(cons) | = | { 2, 2 } |
rev2#(X,cons(Y,L)) | → | rev2#(Y,L) | (11) |
rev2#(X,cons(Y,L)) | → | rev#(rev2(Y,L)) | (12) |
rev#(cons(X,L)) | → | rev2#(X,L) | (9) |
The dependency pairs are split into 0 components.
rev1#(X,cons(Y,L)) | → | rev1#(Y,L) | (8) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
rev1#(X,cons(Y,L)) | → | rev1#(Y,L) | (8) |
2 | > | 2 | |
2 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.