The rewrite relation of the following TRS is considered.
app(app(plus,0),y) | → | y | (1) |
app(app(plus,app(s,x)),y) | → | app(s,app(app(plus,x),y)) | (2) |
app(app(sumwith,f),nil) | → | nil | (3) |
app(app(sumwith,f),app(app(cons,x),xs)) | → | app(app(plus,app(f,x)),app(app(sumwith,f),xs)) | (4) |
app#(app(plus,app(s,x)),y) | → | app#(plus,x) | (5) |
app#(app(plus,app(s,x)),y) | → | app#(app(plus,x),y) | (6) |
app#(app(plus,app(s,x)),y) | → | app#(s,app(app(plus,x),y)) | (7) |
app#(app(sumwith,f),app(app(cons,x),xs)) | → | app#(app(sumwith,f),xs) | (8) |
app#(app(sumwith,f),app(app(cons,x),xs)) | → | app#(f,x) | (9) |
app#(app(sumwith,f),app(app(cons,x),xs)) | → | app#(plus,app(f,x)) | (10) |
app#(app(sumwith,f),app(app(cons,x),xs)) | → | app#(app(plus,app(f,x)),app(app(sumwith,f),xs)) | (11) |
The dependency pairs are split into 2 components.
app#(app(sumwith,f),app(app(cons,x),xs)) | → | app#(app(sumwith,f),xs) | (8) |
app#(app(sumwith,f),app(app(cons,x),xs)) | → | app#(f,x) | (9) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
app#(app(sumwith,f),app(app(cons,x),xs)) | → | app#(app(sumwith,f),xs) | (8) |
2 | > | 2 | |
1 | ≥ | 1 | |
app#(app(sumwith,f),app(app(cons,x),xs)) | → | app#(f,x) | (9) |
2 | > | 2 | |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
app#(app(plus,app(s,x)),y) | → | app#(app(plus,x),y) | (6) |
prec(app#) | = | 0 | stat(app#) | = | lex | |
prec(s) | = | 0 | stat(s) | = | lex | |
prec(app) | = | 1 | stat(app) | = | lex | |
prec(plus) | = | 0 | stat(plus) | = | lex |
π(app#) | = | [1] |
π(s) | = | [] |
π(app) | = | [2] |
π(plus) | = | [] |
app#(app(plus,app(s,x)),y) | → | app#(app(plus,x),y) | (6) |
There are no pairs anymore.