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