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