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