We consider the TRS containing the following rules:
-(0,0) | → | 0 | (1) |
-(s(x),0) | → | s(x) | (2) |
-(x,s(y)) | → | -(d(x),y) | (3) |
d(s(x)) | → | x | (4) |
-(s(x),s(y)) | → | -(x,y) | (5) |
-(d(x),y) | → | -(x,s(y)) | (6) |
The underlying signature is as follows:
{-/2, 0/0, s/1, d/1}To prove that the TRS is (non-)confluent, we show (non-)confluence of the following modified system:
-(0,0) | → | 0 | (1) |
-(s(x),0) | → | s(x) | (2) |
d(s(x)) | → | x | (4) |
-(s(x),s(y)) | → | -(x,y) | (5) |
-(d(x),y) | → | -(x,s(y)) | (6) |
All redundant rules that were added or removed can be simulated in 4 steps .
Confluence is proven using the following terminating critical-pair-closing-system R:
-(s(x),s(y)) | → | -(x,y) | (5) |
[-(x1, x2)] | = | 3 · x1 + 6 · x2 + 0 |
[s(x1)] | = | 1 · x1 + 3 |
-(s(x),s(y)) | → | -(x,y) | (5) |
There are no rules in the TRS. Hence, it is terminating.