The rewrite relation of the following TRS is considered.
minus(0,y) | → | 0 | (1) |
minus(s(x),0) | → | s(x) | (2) |
minus(s(x),s(y)) | → | minus(x,y) | (3) |
le(0,y) | → | true | (4) |
le(s(x),0) | → | false | (5) |
le(s(x),s(y)) | → | le(x,y) | (6) |
if(true,x,y) | → | x | (7) |
if(false,x,y) | → | y | (8) |
perfectp(0) | → | false | (9) |
perfectp(s(x)) | → | f(x,s(0),s(x),s(x)) | (10) |
f(0,y,0,u) | → | true | (11) |
f(0,y,s(z),u) | → | false | (12) |
f(s(x),0,z,u) | → | f(x,u,minus(z,s(x)),u) | (13) |
f(s(x),s(y),z,u) | → | if(le(x,y),f(s(x),minus(y,x),z,u),f(x,u,z,u)) | (14) |
minus#(s(x),s(y)) | → | minus#(x,y) | (15) |
le#(s(x),s(y)) | → | le#(x,y) | (16) |
perfectp#(s(x)) | → | f#(x,s(0),s(x),s(x)) | (17) |
f#(s(x),0,z,u) | → | minus#(z,s(x)) | (18) |
f#(s(x),0,z,u) | → | f#(x,u,minus(z,s(x)),u) | (19) |
f#(s(x),s(y),z,u) | → | f#(x,u,z,u) | (20) |
f#(s(x),s(y),z,u) | → | minus#(y,x) | (21) |
f#(s(x),s(y),z,u) | → | f#(s(x),minus(y,x),z,u) | (22) |
f#(s(x),s(y),z,u) | → | le#(x,y) | (23) |
f#(s(x),s(y),z,u) | → | if#(le(x,y),f(s(x),minus(y,x),z,u),f(x,u,z,u)) | (24) |
The dependency pairs are split into 3 components.
f#(s(x),s(y),z,u) | → | f#(s(x),minus(y,x),z,u) | (22) |
f#(s(x),s(y),z,u) | → | f#(x,u,z,u) | (20) |
f#(s(x),0,z,u) | → | f#(x,u,minus(z,s(x)),u) | (19) |
π(f#) | = | { 1 } |
f#(s(x),s(y),z,u) | → | f#(x,u,z,u) | (20) |
f#(s(x),0,z,u) | → | f#(x,u,minus(z,s(x)),u) | (19) |
π(f#) | = | { 2 } |
π(minus) | = | { 1 } |
f#(s(x),s(y),z,u) | → | f#(s(x),minus(y,x),z,u) | (22) |
There are no pairs anymore.
minus#(s(x),s(y)) | → | minus#(x,y) | (15) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
minus#(s(x),s(y)) | → | minus#(x,y) | (15) |
2 | > | 2 | |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
le#(s(x),s(y)) | → | le#(x,y) | (16) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
le#(s(x),s(y)) | → | le#(x,y) | (16) |
2 | > | 2 | |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.