The rewrite relation of the following TRS is considered.
minus(x,0) | → | x | (1) |
minus(s(x),s(y)) | → | minus(x,y) | (2) |
quot(0,s(y)) | → | 0 | (3) |
quot(s(x),s(y)) | → | s(quot(minus(x,y),s(y))) | (4) |
plus(0,y) | → | y | (5) |
plus(s(x),y) | → | s(plus(x,y)) | (6) |
minus(minus(x,y),z) | → | minus(x,plus(y,z)) | (7) |
app(nil,k) | → | k | (8) |
app(l,nil) | → | l | (9) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (10) |
sum(cons(x,nil)) | → | cons(x,nil) | (11) |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (12) |
sum(app(l,cons(x,cons(y,k)))) | → | sum(app(l,sum(cons(x,cons(y,k))))) | (13) |
minus#(s(x),s(y)) | → | minus#(x,y) | (14) |
quot#(s(x),s(y)) | → | minus#(x,y) | (15) |
quot#(s(x),s(y)) | → | quot#(minus(x,y),s(y)) | (16) |
plus#(s(x),y) | → | plus#(x,y) | (17) |
minus#(minus(x,y),z) | → | plus#(y,z) | (18) |
minus#(minus(x,y),z) | → | minus#(x,plus(y,z)) | (19) |
app#(cons(x,l),k) | → | app#(l,k) | (20) |
sum#(cons(x,cons(y,l))) | → | plus#(x,y) | (21) |
sum#(cons(x,cons(y,l))) | → | sum#(cons(plus(x,y),l)) | (22) |
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(cons(x,cons(y,k))) | (23) |
sum#(app(l,cons(x,cons(y,k)))) | → | app#(l,sum(cons(x,cons(y,k)))) | (24) |
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(app(l,sum(cons(x,cons(y,k))))) | (25) |
The dependency pairs are split into 6 components.
quot#(s(x),s(y)) | → | quot#(minus(x,y),s(y)) | (16) |
π(quot#) | = | { 1 } |
π(minus) | = | { 1 } |
quot#(s(x),s(y)) | → | quot#(minus(x,y),s(y)) | (16) |
There are no pairs anymore.
minus#(minus(x,y),z) | → | minus#(x,plus(y,z)) | (19) |
minus#(s(x),s(y)) | → | minus#(x,y) | (14) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
minus#(minus(x,y),z) | → | minus#(x,plus(y,z)) | (19) |
1 | > | 1 | |
minus#(s(x),s(y)) | → | minus#(x,y) | (14) |
2 | > | 2 | |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(app(l,sum(cons(x,cons(y,k))))) | (25) |
[plus(x1, x2)] | = | 5 · x1 + 4 · x2 + 1 |
[sum(x1)] | = | 0 · x1 + 1 |
[nil] | = | 0 |
[0] | = | 2 |
[cons(x1, x2)] | = | 0 · x1 + 1 · x2 + 1 |
[sum#(x1)] | = | 4 · x1 + 4 |
[app(x1, x2)] | = | 4 · x1 + 2 · x2 + 0 |
[s(x1)] | = | 0 · x1 + 3 |
sum(cons(x,cons(y,l))) | → | sum(cons(plus(x,y),l)) | (12) |
sum(cons(x,nil)) | → | cons(x,nil) | (11) |
plus(0,y) | → | y | (5) |
plus(s(x),y) | → | s(plus(x,y)) | (6) |
app(nil,k) | → | k | (8) |
app(l,nil) | → | l | (9) |
app(cons(x,l),k) | → | cons(x,app(l,k)) | (10) |
sum#(app(l,cons(x,cons(y,k)))) | → | sum#(app(l,sum(cons(x,cons(y,k))))) | (25) |
There are no pairs anymore.
app#(cons(x,l),k) | → | app#(l,k) | (20) |
π(app#) | = | 1 |
app#(cons(x,l),k) | → | app#(l,k) | (20) |
There are no pairs anymore.
sum#(cons(x,cons(y,l))) | → | sum#(cons(plus(x,y),l)) | (22) |
[plus(x1, x2)] | = | -∞ · x1 + 0 · x2 + 1 |
[0] | = | 2 |
[cons(x1, x2)] | = | 0 · x1 + 3 · x2 + 1 |
[sum#(x1)] | = | 0 · x1 + 0 |
[s(x1)] | = | -∞ · x1 + 0 |
plus(0,y) | → | y | (5) |
plus(s(x),y) | → | s(plus(x,y)) | (6) |
sum#(cons(x,cons(y,l))) | → | sum#(cons(plus(x,y),l)) | (22) |
There are no pairs anymore.
plus#(s(x),y) | → | plus#(x,y) | (17) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
plus#(s(x),y) | → | plus#(x,y) | (17) |
2 | ≥ | 2 | |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.