The rewrite relation of the following TRS is considered.
rev(nil) | → | nil | (1) |
rev(cons(x,l)) | → | cons(rev1(x,l),rev2(x,l)) | (2) |
rev1(0,nil) | → | 0 | (3) |
rev1(s(x),nil) | → | s(x) | (4) |
rev1(x,cons(y,l)) | → | rev1(y,l) | (5) |
rev2(x,nil) | → | nil | (6) |
rev2(x,cons(y,l)) | → | rev(cons(x,rev2(y,l))) | (7) |
rev#(cons(x,l)) | → | rev2#(x,l) | (8) |
rev#(cons(x,l)) | → | rev1#(x,l) | (9) |
rev1#(x,cons(y,l)) | → | rev1#(y,l) | (10) |
rev2#(x,cons(y,l)) | → | rev2#(y,l) | (11) |
rev2#(x,cons(y,l)) | → | rev#(cons(x,rev2(y,l))) | (12) |
The dependency pairs are split into 2 components.
rev2#(x,cons(y,l)) | → | rev2#(y,l) | (11) |
rev2#(x,cons(y,l)) | → | rev#(cons(x,rev2(y,l))) | (12) |
rev#(cons(x,l)) | → | rev2#(x,l) | (8) |
π(rev2#) | = | { 2, 2 } |
π(rev#) | = | { 1 } |
π(rev2) | = | { 2 } |
π(cons) | = | { 2, 2 } |
π(rev) | = | { 1 } |
rev2#(x,cons(y,l)) | → | rev2#(y,l) | (11) |
rev2#(x,cons(y,l)) | → | rev#(cons(x,rev2(y,l))) | (12) |
The dependency pairs are split into 0 components.
rev1#(x,cons(y,l)) | → | rev1#(y,l) | (10) |
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) | (10) |
2 | > | 2 | |
2 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.