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(app(.,app(app(.,x),y)),z) | → | app(app(.,x),app(app(.,y),z)) | (7) |
app(i,1) | → | 1 | (8) |
app(i,app(i,x)) | → | x | (9) |
app(i,app(app(.,x),y)) | → | app(app(.,app(i,y)),app(i,x)) | (10) |
app(app(map,f),nil) | → | nil | (11) |
app(app(map,f),app(app(cons,x),xs)) | → | app(app(cons,app(f,x)),app(app(map,f),xs)) | (12) |
app(app(filter,f),nil) | → | nil | (13) |
app(app(filter,f),app(app(cons,x),xs)) | → | app(app(app(app(filter2,app(f,x)),f),x),xs) | (14) |
app(app(app(app(filter2,true),f),x),xs) | → | app(app(cons,x),app(app(filter,f),xs)) | (15) |
app(app(app(app(filter2,false),f),x),xs) | → | app(app(filter,f),xs) | (16) |
app#(app(.,app(app(.,x),y)),z) | → | app#(.,y) | (17) |
app#(app(.,app(app(.,x),y)),z) | → | app#(app(.,y),z) | (18) |
app#(app(.,app(app(.,x),y)),z) | → | app#(app(.,x),app(app(.,y),z)) | (19) |
app#(i,app(app(.,x),y)) | → | app#(i,x) | (20) |
app#(i,app(app(.,x),y)) | → | app#(i,y) | (21) |
app#(i,app(app(.,x),y)) | → | app#(.,app(i,y)) | (22) |
app#(i,app(app(.,x),y)) | → | app#(app(.,app(i,y)),app(i,x)) | (23) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(app(map,f),xs) | (24) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(f,x) | (25) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(cons,app(f,x)) | (26) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(app(cons,app(f,x)),app(app(map,f),xs)) | (27) |
app#(app(filter,f),app(app(cons,x),xs)) | → | app#(f,x) | (28) |
app#(app(filter,f),app(app(cons,x),xs)) | → | app#(filter2,app(f,x)) | (29) |
app#(app(filter,f),app(app(cons,x),xs)) | → | app#(app(filter2,app(f,x)),f) | (30) |
app#(app(filter,f),app(app(cons,x),xs)) | → | app#(app(app(filter2,app(f,x)),f),x) | (31) |
app#(app(filter,f),app(app(cons,x),xs)) | → | app#(app(app(app(filter2,app(f,x)),f),x),xs) | (32) |
app#(app(app(app(filter2,true),f),x),xs) | → | app#(filter,f) | (33) |
app#(app(app(app(filter2,true),f),x),xs) | → | app#(app(filter,f),xs) | (34) |
app#(app(app(app(filter2,true),f),x),xs) | → | app#(cons,x) | (35) |
app#(app(app(app(filter2,true),f),x),xs) | → | app#(app(cons,x),app(app(filter,f),xs)) | (36) |
app#(app(app(app(filter2,false),f),x),xs) | → | app#(filter,f) | (37) |
app#(app(app(app(filter2,false),f),x),xs) | → | app#(app(filter,f),xs) | (38) |
The dependency pairs are split into 3 components.
app#(app(filter,f),app(app(cons,x),xs)) | → | app#(app(app(app(filter2,app(f,x)),f),x),xs) | (32) |
app#(app(app(app(filter2,false),f),x),xs) | → | app#(app(filter,f),xs) | (38) |
app#(app(filter,f),app(app(cons,x),xs)) | → | app#(f,x) | (28) |
app#(app(app(app(filter2,true),f),x),xs) | → | app#(app(filter,f),xs) | (34) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(f,x) | (25) |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(app(map,f),xs) | (24) |
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) | (32) |
2 | > | 2 | |
app#(app(app(app(filter2,false),f),x),xs) | → | app#(app(filter,f),xs) | (38) |
2 | ≥ | 2 | |
app#(app(filter,f),app(app(cons,x),xs)) | → | app#(f,x) | (28) |
2 | > | 2 | |
1 | > | 1 | |
app#(app(app(app(filter2,true),f),x),xs) | → | app#(app(filter,f),xs) | (34) |
2 | ≥ | 2 | |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(f,x) | (25) |
2 | > | 2 | |
1 | > | 1 | |
app#(app(map,f),app(app(cons,x),xs)) | → | app#(app(map,f),xs) | (24) |
2 | > | 2 | |
1 | ≥ | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
app#(i,app(app(.,x),y)) | → | app#(i,y) | (21) |
app#(i,app(app(.,x),y)) | → | app#(i,x) | (20) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
app#(i,app(app(.,x),y)) | → | app#(i,y) | (21) |
2 | > | 2 | |
1 | ≥ | 1 | |
app#(i,app(app(.,x),y)) | → | app#(i,x) | (20) |
2 | > | 2 | |
1 | ≥ | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
app#(app(.,app(app(.,x),y)),z) | → | app#(app(.,x),app(app(.,y),z)) | (19) |
app#(app(.,app(app(.,x),y)),z) | → | app#(app(.,y),z) | (18) |
[1] | = | 0 |
[i] | = | 3 |
[.] | = | 2 |
[app#(x1, x2)] | = | 0 · x1 + -∞ · x2 + 0 |
[app(x1, x2)] | = | 1 · x1 + 0 · x2 + 4 |
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(app(.,app(app(.,x),y)),z) | → | app(app(.,x),app(app(.,y),z)) | (7) |
app#(app(.,app(app(.,x),y)),z) | → | app#(app(.,x),app(app(.,y),z)) | (19) |
prec(app#) | = | 0 | stat(app#) | = | lex | |
prec(app) | = | 1 | stat(app) | = | lex | |
prec(.) | = | 0 | stat(.) | = | lex |
π(app#) | = | [1] |
π(app) | = | [2] |
π(.) | = | [] |
app#(app(.,app(app(.,x),y)),z) | → | app#(app(.,y),z) | (18) |
There are no pairs anymore.