The rewrite relation of the following TRS is considered.
foo(0(x1)) | → | 0(s(p(p(p(s(s(s(p(s(x1)))))))))) | (1) |
foo(s(x1)) | → | 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(x1)))))))))))))))))))))))))) | (2) |
bar(0(x1)) | → | 0(p(s(s(s(x1))))) | (3) |
bar(s(x1)) | → | p(s(p(p(s(s(foo(s(p(p(s(s(x1)))))))))))) | (4) |
p(p(s(x1))) | → | p(x1) | (5) |
p(s(x1)) | → | x1 | (6) |
p(0(x1)) | → | 0(s(s(s(s(x1))))) | (7) |
foo#(0(x1)) | → | p#(p(p(s(s(s(p(s(x1)))))))) | (8) |
foo#(0(x1)) | → | p#(p(s(s(s(p(s(x1))))))) | (9) |
foo#(0(x1)) | → | p#(s(s(s(p(s(x1)))))) | (10) |
foo#(0(x1)) | → | p#(s(x1)) | (11) |
foo#(s(x1)) | → | 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(x1)))))))))))))))))))))))))) | (12) |
foo#(s(x1)) | → | p#(p(p(s(s(p(s(s(p(s(foo(p(p(s(s(p(s(bar(p(p(s(s(p(s(x1)))))))))))))))))))))))) | (13) |
foo#(s(x1)) | → | p#(p(s(s(p(s(s(p(s(foo(p(p(s(s(p(s(bar(p(p(s(s(p(s(x1))))))))))))))))))))))) | (14) |
foo#(s(x1)) | → | p#(s(s(p(s(s(p(s(foo(p(p(s(s(p(s(bar(p(p(s(s(p(s(x1)))))))))))))))))))))) | (15) |
foo#(s(x1)) | → | p#(s(s(p(s(foo(p(p(s(s(p(s(bar(p(p(s(s(p(s(x1))))))))))))))))))) | (16) |
foo#(s(x1)) | → | p#(s(foo(p(p(s(s(p(s(bar(p(p(s(s(p(s(x1)))))))))))))))) | (17) |
foo#(s(x1)) | → | foo#(p(p(s(s(p(s(bar(p(p(s(s(p(s(x1)))))))))))))) | (18) |
foo#(s(x1)) | → | p#(p(s(s(p(s(bar(p(p(s(s(p(s(x1))))))))))))) | (19) |
foo#(s(x1)) | → | p#(s(s(p(s(bar(p(p(s(s(p(s(x1)))))))))))) | (20) |
foo#(s(x1)) | → | p#(s(bar(p(p(s(s(p(s(x1))))))))) | (21) |
foo#(s(x1)) | → | bar#(p(p(s(s(p(s(x1))))))) | (22) |
foo#(s(x1)) | → | p#(p(s(s(p(s(x1)))))) | (23) |
foo#(s(x1)) | → | p#(s(s(p(s(x1))))) | (24) |
foo#(s(x1)) | → | p#(s(x1)) | (25) |
bar#(0(x1)) | → | p#(s(s(s(x1)))) | (26) |
bar#(s(x1)) | → | p#(s(p(p(s(s(foo(s(p(p(s(s(x1)))))))))))) | (27) |
bar#(s(x1)) | → | p#(p(s(s(foo(s(p(p(s(s(x1)))))))))) | (28) |
bar#(s(x1)) | → | p#(s(s(foo(s(p(p(s(s(x1))))))))) | (29) |
bar#(s(x1)) | → | foo#(s(p(p(s(s(x1)))))) | (30) |
bar#(s(x1)) | → | p#(p(s(s(x1)))) | (31) |
bar#(s(x1)) | → | p#(s(s(x1))) | (32) |
p#(p(s(x1))) | → | p#(x1) | (33) |
The dependency pairs are split into 2 components.
foo#(s(x1)) | → | bar#(p(p(s(s(p(s(x1))))))) | (22) |
bar#(s(x1)) | → | foo#(s(p(p(s(s(x1)))))) | (30) |
foo#(s(x1)) | → | foo#(p(p(s(s(p(s(bar(p(p(s(s(p(s(x1)))))))))))))) | (18) |
20
Hence, it suffices to show innermost termination in the following.We restrict the rewrite rules to the following usable rules of the DP problem.
p(s(x1)) | → | x1 | (6) |
p(0(x1)) | → | 0(s(s(s(s(x1))))) | (7) |
bar(0(x1)) | → | 0(p(s(s(s(x1))))) | (3) |
bar(s(x1)) | → | p(s(p(p(s(s(foo(s(p(p(s(s(x1)))))))))))) | (4) |
foo(s(x1)) | → | 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(x1)))))))))))))))))))))))))) | (2) |
foo(0(x1)) | → | 0(s(p(p(p(s(s(s(p(s(x1)))))))))) | (1) |
[bar#(x1)] | = | 2 + x1 |
[foo#(x1)] | = | 2 + x1 |
[p(x1)] | = | -2 + x1 |
[s(x1)] | = | 2 + x1 |
[0(x1)] | = | -2 |
[bar(x1)] | = | 1 + x1 |
[foo(x1)] | = | 2 |
foo#(s(x1)) | → | bar#(p(p(s(s(p(s(x1))))))) | (22) |
foo#(s(x1)) | → | foo#(p(p(s(s(p(s(bar(p(p(s(s(p(s(x1)))))))))))))) | (18) |
We restrict the rewrite rules to the following usable rules of the DP problem.
p(s(x1)) | → | x1 | (6) |
p(0(x1)) | → | 0(s(s(s(s(x1))))) | (7) |
We restrict the innermost strategy to the following left hand sides.
p(s(x0)) |
p(0(x0)) |
[bar#(x1)] | = | 1 + 1 · x1 |
[s(x1)] | = | 0 |
[foo#(x1)] | = | 0 |
[p(x1)] | = | 1 · x1 |
[0(x1)] | = | 1 + 1 · x1 |
bar#(s(x1)) | → | foo#(s(p(p(s(s(x1)))))) | (30) |
There are no pairs anymore.
p#(p(s(x1))) | → | p#(x1) | (33) |
[p(x1)] | = | 1 · x1 |
[s(x1)] | = | 1 · x1 |
[p#(x1)] | = | 1 · x1 |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
p#(p(s(x1))) | → | p#(x1) | (33) |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.