The rewrite relation of the following TRS is considered.
concat(leaf,Y) | → | Y | (1) |
concat(cons(U,V),Y) | → | cons(U,concat(V,Y)) | (2) |
lessleaves(X,leaf) | → | false | (3) |
lessleaves(leaf,cons(W,Z)) | → | true | (4) |
lessleaves(cons(U,V),cons(W,Z)) | → | lessleaves(concat(U,V),concat(W,Z)) | (5) |
prec(true) | = | 4 | weight(true) | = | 1 | ||||
prec(false) | = | 0 | weight(false) | = | 1 | ||||
prec(lessleaves) | = | 7 | weight(lessleaves) | = | 2 | ||||
prec(cons) | = | 1 | weight(cons) | = | 4 | ||||
prec(concat) | = | 2 | weight(concat) | = | 0 | ||||
prec(leaf) | = | 3 | weight(leaf) | = | 5 |
concat(leaf,Y) | → | Y | (1) |
concat(cons(U,V),Y) | → | cons(U,concat(V,Y)) | (2) |
lessleaves(X,leaf) | → | false | (3) |
lessleaves(leaf,cons(W,Z)) | → | true | (4) |
lessleaves(cons(U,V),cons(W,Z)) | → | lessleaves(concat(U,V),concat(W,Z)) | (5) |
There are no rules in the TRS. Hence, it is terminating.