The rewrite relation of the following TRS is considered.
perfectp(0) | → | false | (1) |
perfectp(s(x)) | → | f(x,s(0),s(x),s(x)) | (2) |
f(0,y,0,u) | → | true | (3) |
f(0,y,s(z),u) | → | false | (4) |
f(s(x),0,z,u) | → | f(x,u,minus(z,s(x)),u) | (5) |
f(s(x),s(y),z,u) | → | if(le(x,y),f(s(x),minus(y,x),z,u),f(x,u,z,u)) | (6) |
perfectp#(s(x)) | → | f#(x,s(0),s(x),s(x)) | (7) |
f#(s(x),0,z,u) | → | f#(x,u,minus(z,s(x)),u) | (8) |
f#(s(x),s(y),z,u) | → | f#(x,u,z,u) | (9) |
f#(s(x),s(y),z,u) | → | f#(s(x),minus(y,x),z,u) | (10) |
The dependency pairs are split into 1 component.
f#(s(x),s(y),z,u) | → | f#(x,u,z,u) | (9) |
f#(s(x),0,z,u) | → | f#(x,u,minus(z,s(x)),u) | (8) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
f#(s(x),s(y),z,u) | → | f#(x,u,z,u) | (9) |
4 | ≥ | 4 | |
4 | ≥ | 2 | |
3 | ≥ | 3 | |
1 | > | 1 | |
f#(s(x),0,z,u) | → | f#(x,u,minus(z,s(x)),u) | (8) |
4 | ≥ | 4 | |
4 | ≥ | 2 | |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.