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