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