We consider the TRS containing the following rules:
s(p(x)) | → | x | (1) |
p(s(x)) | → | x | (2) |
+(x,0) | → | x | (3) |
+(x,s(y)) | → | s(+(x,y)) | (4) |
+(x,p(y)) | → | p(+(x,y)) | (5) |
-(0,0) | → | 0 | (6) |
-(x,s(y)) | → | p(-(x,y)) | (7) |
-(x,p(y)) | → | s(-(x,y)) | (8) |
-(p(x),y) | → | p(-(x,y)) | (9) |
-(s(x),y) | → | s(-(x,y)) | (10) |
The underlying signature is as follows:
{s/1, p/1, +/2, 0/0, -/2}[-(x1, x2)] | = | 2 · x1 + 2 · x2 + 6 |
[s(x1)] | = | 1 · x1 + 3 |
[+(x1, x2)] | = | 4 · x1 + 4 · x2 + 3 |
[p(x1)] | = | 1 · x1 + 4 |
[0] | = | 1 |
s(p(x)) | → | x | (1) |
p(s(x)) | → | x | (2) |
+(x,0) | → | x | (3) |
+(x,s(y)) | → | s(+(x,y)) | (4) |
+(x,p(y)) | → | p(+(x,y)) | (5) |
-(0,0) | → | 0 | (6) |
-(x,s(y)) | → | p(-(x,y)) | (7) |
-(x,p(y)) | → | s(-(x,y)) | (8) |
-(p(x),y) | → | p(-(x,y)) | (9) |
-(s(x),y) | → | s(-(x,y)) | (10) |
There are no rules in the TRS. Hence, it is terminating.