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