We consider the TRS containing the following rules:
foo(0(x)) | → | 0(s(p(p(p(s(s(s(p(s(x)))))))))) | (1) |
foo(s(x)) | → | p(s(p(p(p(s(s(p(s(s(p(s(foo(p(p(s(s(p(s(bar(p(p(s(s(p(s(x)))))))))))))))))))))))))) | (2) |
bar(0(x)) | → | 0(p(s(s(s(x))))) | (3) |
bar(s(x)) | → | p(s(p(p(s(s(foo(s(p(p(s(s(x)))))))))))) | (4) |
p(p(s(x))) | → | p(x) | (5) |
p(s(x)) | → | x | (6) |
p(0(x)) | → | 0(s(s(s(s(x))))) | (7) |
The underlying signature is as follows:
{foo/1, 0/1, s/1, p/1, bar/1}To prove that the TRS is (non-)confluent, we show (non-)confluence of the following modified system:
foo(0(x)) | → | 0(s(p(p(p(s(s(s(p(s(x)))))))))) | (1) |
foo(s(x)) | → | p(s(p(p(p(s(s(p(s(s(p(s(foo(p(p(s(s(p(s(bar(p(p(s(s(p(s(x)))))))))))))))))))))))))) | (2) |
bar(0(x)) | → | 0(p(s(s(s(x))))) | (3) |
bar(s(x)) | → | p(s(p(p(s(s(foo(s(p(p(s(s(x)))))))))))) | (4) |
p(s(x)) | → | x | (6) |
p(0(x)) | → | 0(s(s(s(s(x))))) | (7) |
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:
There are no rules.
There are no rules in the TRS. Hence, it is terminating.