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