The rewrite relation of the following TRS is considered.
app(app(map,f),nil) | → | nil | (1) |
app(app(map,f),app(app(cons,x),xs)) | → | app(app(cons,app(f,x)),app(app(map,f),xs)) | (2) |
app(flatten,app(app(node,x),xs)) | → | app(app(cons,x),app(concat,app(app(map,flatten),xs))) | (3) |
app(concat,nil) | → | nil | (4) |
app(concat,app(app(cons,x),xs)) | → | app(app(append,x),app(concat,xs)) | (5) |
app(app(append,nil),xs) | → | xs | (6) |
app(app(append,app(app(cons,x),xs)),ys) | → | app(app(cons,x),app(app(append,xs),ys)) | (7) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(app(map,f),xs) | (8) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(f,x) | (9) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(cons,app(f,x)) | (10) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(app(cons,app(f,x)),app(app(map,f),xs)) | (11) |
app#(flatten,app(app(node,x),xs)) | → | app#(map,flatten) | (12) |
app#(flatten,app(app(node,x),xs)) | → | app#(app(map,flatten),xs) | (13) |
app#(flatten,app(app(node,x),xs)) | → | app#(concat,app(app(map,flatten),xs)) | (14) |
app#(flatten,app(app(node,x),xs)) | → | app#(cons,x) | (15) |
app#(flatten,app(app(node,x),xs)) | → | app#(app(cons,x),app(concat,app(app(map,flatten),xs))) | (16) |
app#(concat,app(app(cons,x),xs)) | → | app#(concat,xs) | (17) |
app#(concat,app(app(cons,x),xs)) | → | app#(append,x) | (18) |
app#(concat,app(app(cons,x),xs)) | → | app#(app(append,x),app(concat,xs)) | (19) |
app#(app(append,app(app(cons,x),xs)),ys) | → | app#(append,xs) | (20) |
app#(app(append,app(app(cons,x),xs)),ys) | → | app#(app(append,xs),ys) | (21) |
app#(app(append,app(app(cons,x),xs)),ys) | → | app#(app(cons,x),app(app(append,xs),ys)) | (22) |
The dependency pairs are split into 3 components.
app#(flatten,app(app(node,x),xs)) | → | app#(app(map,flatten),xs) | (13) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(f,x) | (9) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(app(map,f),xs) | (8) |
π(app#) | = | 2 |
app#(flatten,app(app(node,x),xs)) | → | app#(app(map,flatten),xs) | (13) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(f,x) | (9) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(app(map,f),xs) | (8) |
There are no pairs anymore.
app#(concat,app(app(cons,x),xs)) | → | app#(concat,xs) | (17) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
app#(concat,app(app(cons,x),xs)) | → | app#(concat,xs) | (17) |
2 | > | 2 | |
1 | ≥ | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
app#(app(append,app(app(cons,x),xs)),ys) | → | app#(app(append,xs),ys) | (21) |
prec(app#) | = | 0 | stat(app#) | = | lex | |
prec(append) | = | 0 | stat(append) | = | lex | |
prec(cons) | = | 0 | stat(cons) | = | lex | |
prec(app) | = | 1 | stat(app) | = | lex |
π(app#) | = | [1] |
π(append) | = | [] |
π(cons) | = | [] |
π(app) | = | [2] |
app#(app(append,app(app(cons,x),xs)),ys) | → | app#(app(append,xs),ys) | (21) |
There are no pairs anymore.