The rewrite relation of the following TRS is considered.
| cond(true,x) | → | cond(and(even(x),gr(x,0)),p(x)) | (1) |
| and(x,false) | → | false | (2) |
| and(false,x) | → | false | (3) |
| and(true,true) | → | true | (4) |
| even(0) | → | true | (5) |
| even(s(0)) | → | false | (6) |
| even(s(s(x))) | → | even(x) | (7) |
| gr(0,x) | → | false | (8) |
| gr(s(x),0) | → | true | (9) |
| gr(s(x),s(y)) | → | gr(x,y) | (10) |
| p(0) | → | 0 | (11) |
| p(s(x)) | → | x | (12) |
| cond#(true,x) | → | p#(x) | (13) |
| cond#(true,x) | → | gr#(x,0) | (14) |
| cond#(true,x) | → | even#(x) | (15) |
| cond#(true,x) | → | and#(even(x),gr(x,0)) | (16) |
| cond#(true,x) | → | cond#(and(even(x),gr(x,0)),p(x)) | (17) |
| even#(s(s(x))) | → | even#(x) | (18) |
| gr#(s(x),s(y)) | → | gr#(x,y) | (19) |
The dependency pairs are split into 2 components.
| cond#(true,x) | → | cond#(and(even(x),gr(x,0)),p(x)) | (17) |
| [gr(x1, x2)] | = | -2 · x1 + 0 · x2 + 0 |
| [s(x1)] | = | 3 · x1 + 4 |
| [0] | = | 0 |
| [and(x1, x2)] | = | -∞ · x1 + 0 · x2 + 0 |
| [cond#(x1, x2)] | = | 0 · x1 + 0 · x2 + 1 |
| [true] | = | 2 |
| [false] | = | 0 |
| [p(x1)] | = | -3 · x1 + 0 |
| [even(x1)] | = | -∞ · x1 + 0 |
| p(0) | → | 0 | (11) |
| p(s(x)) | → | x | (12) |
| gr(0,x) | → | false | (8) |
| gr(s(x),0) | → | true | (9) |
| and(x,false) | → | false | (2) |
| and(false,x) | → | false | (3) |
| and(true,true) | → | true | (4) |
| cond#(true,x) | → | cond#(and(even(x),gr(x,0)),p(x)) | (17) |
There are no pairs anymore.
| even#(s(s(x))) | → | even#(x) | (18) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
| even#(s(s(x))) | → | even#(x) | (18) |
| 1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.