The rewrite relation of the following TRS is considered.
app(app(app(f,0),1),x) | → | app(app(app(f,app(s,x)),x),x) | (1) |
app(app(app(f,x),y),app(s,z)) | → | app(s,app(app(app(f,0),1),z)) | (2) |
app(app(map,fun),nil) | → | nil | (3) |
app(app(map,fun),app(app(cons,x),xs)) | → | app(app(cons,app(fun,x)),app(app(map,fun),xs)) | (4) |
app(app(filter,fun),nil) | → | nil | (5) |
app(app(filter,fun),app(app(cons,x),xs)) | → | app(app(app(app(filter2,app(fun,x)),fun),x),xs) | (6) |
app(app(app(app(filter2,true),fun),x),xs) | → | app(app(cons,x),app(app(filter,fun),xs)) | (7) |
app(app(app(app(filter2,false),fun),x),xs) | → | app(app(filter,fun),xs) | (8) |
app#(app(app(f,0),1),x) | → | app#(s,x) | (9) |
app#(app(app(f,0),1),x) | → | app#(f,app(s,x)) | (10) |
app#(app(app(f,0),1),x) | → | app#(app(f,app(s,x)),x) | (11) |
app#(app(app(f,0),1),x) | → | app#(app(app(f,app(s,x)),x),x) | (12) |
app#(app(app(f,x),y),app(s,z)) | → | app#(f,0) | (13) |
app#(app(app(f,x),y),app(s,z)) | → | app#(app(f,0),1) | (14) |
app#(app(app(f,x),y),app(s,z)) | → | app#(app(app(f,0),1),z) | (15) |
app#(app(app(f,x),y),app(s,z)) | → | app#(s,app(app(app(f,0),1),z)) | (16) |
app#(app(map,fun),app(app(cons,x),xs)) | → | app#(app(map,fun),xs) | (17) |
app#(app(map,fun),app(app(cons,x),xs)) | → | app#(fun,x) | (18) |
app#(app(map,fun),app(app(cons,x),xs)) | → | app#(cons,app(fun,x)) | (19) |
app#(app(map,fun),app(app(cons,x),xs)) | → | app#(app(cons,app(fun,x)),app(app(map,fun),xs)) | (20) |
app#(app(filter,fun),app(app(cons,x),xs)) | → | app#(fun,x) | (21) |
app#(app(filter,fun),app(app(cons,x),xs)) | → | app#(filter2,app(fun,x)) | (22) |
app#(app(filter,fun),app(app(cons,x),xs)) | → | app#(app(filter2,app(fun,x)),fun) | (23) |
app#(app(filter,fun),app(app(cons,x),xs)) | → | app#(app(app(filter2,app(fun,x)),fun),x) | (24) |
app#(app(filter,fun),app(app(cons,x),xs)) | → | app#(app(app(app(filter2,app(fun,x)),fun),x),xs) | (25) |
app#(app(app(app(filter2,true),fun),x),xs) | → | app#(filter,fun) | (26) |
app#(app(app(app(filter2,true),fun),x),xs) | → | app#(app(filter,fun),xs) | (27) |
app#(app(app(app(filter2,true),fun),x),xs) | → | app#(cons,x) | (28) |
app#(app(app(app(filter2,true),fun),x),xs) | → | app#(app(cons,x),app(app(filter,fun),xs)) | (29) |
app#(app(app(app(filter2,false),fun),x),xs) | → | app#(filter,fun) | (30) |
app#(app(app(app(filter2,false),fun),x),xs) | → | app#(app(filter,fun),xs) | (31) |
The dependency pairs are split into 2 components.
app#(app(filter,fun),app(app(cons,x),xs)) | → | app#(fun,x) | (21) |
app#(app(app(app(filter2,false),fun),x),xs) | → | app#(app(filter,fun),xs) | (31) |
app#(app(app(app(filter2,true),fun),x),xs) | → | app#(app(filter,fun),xs) | (27) |
app#(app(map,fun),app(app(cons,x),xs)) | → | app#(fun,x) | (18) |
app#(app(map,fun),app(app(cons,x),xs)) | → | app#(app(map,fun),xs) | (17) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
app#(app(filter,fun),app(app(cons,x),xs)) | → | app#(fun,x) | (21) |
2 | > | 2 | |
1 | > | 1 | |
app#(app(app(app(filter2,false),fun),x),xs) | → | app#(app(filter,fun),xs) | (31) |
2 | ≥ | 2 | |
app#(app(app(app(filter2,true),fun),x),xs) | → | app#(app(filter,fun),xs) | (27) |
2 | ≥ | 2 | |
app#(app(map,fun),app(app(cons,x),xs)) | → | app#(fun,x) | (18) |
2 | > | 2 | |
1 | > | 1 | |
app#(app(map,fun),app(app(cons,x),xs)) | → | app#(app(map,fun),xs) | (17) |
2 | > | 2 | |
1 | ≥ | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
app#(app(app(f,x),y),app(s,z)) | → | app#(app(app(f,0),1),z) | (15) |
app#(app(app(f,0),1),x) | → | app#(app(app(f,app(s,x)),x),x) | (12) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
app#(app(app(f,x),y),app(s,z)) | → | app#(app(app(f,0),1),z) | (15) |
2 | > | 2 | |
app#(app(app(f,0),1),x) | → | app#(app(app(f,app(s,x)),x),x) | (12) |
2 | ≥ | 2 |
As there is no critical graph in the transitive closure, there are no infinite chains.