The rewrite relation of the following TRS is considered.
| -(0,y) | → | 0 | (1) |
| -(x,0) | → | x | (2) |
| -(x,s(y)) | → | if(greater(x,s(y)),s(-(x,p(s(y)))),0) | (3) |
| p(0) | → | 0 | (4) |
| p(s(x)) | → | x | (5) |
| -#(x,s(y)) | → | -#(x,p(s(y))) | (6) |
| -#(x,s(y)) | → | p#(s(y)) | (7) |
The dependency pairs are split into 1 component.
| -#(x,s(y)) | → | -#(x,p(s(y))) | (6) |
| [p(x1)] | = | 1 · x1 |
| [s(x1)] | = | 1 · x1 |
| [-#(x1, x2)] | = | 1 · x1 + 1 · x2 |
| p(s(x)) | → | x | (5) |
20
Hence, it suffices to show innermost termination in the following.| [p(x1)] | = | 1 · x1 |
| [s(x1)] | = | 2 + 1 · x1 |
| [-#(x1, x2)] | = | 1 · x1 + 2 · x2 |
| p(s(x)) | → | x | (5) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
| -#(x,s(y)) | → | -#(x,p(s(y))) | (6) |
| 1 | ≥ | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.