The rewrite relation of the following TRS is considered.
half(0) | → | 0 | (1) |
half(s(0)) | → | 0 | (2) |
half(s(s(x))) | → | s(half(x)) | (3) |
bits(0) | → | 0 | (4) |
bits(s(x)) | → | s(bits(half(s(x)))) | (5) |
half(0'(x)) | → | 0'(x) | (6) |
half(s(0'(x))) | → | 0'(x) | (7) |
half(s(s(x))) | → | s(half(x)) | (3) |
bits(0'(x)) | → | 0'(x) | (8) |
bits(s(x)) | → | s(bits(half(s(x)))) | (5) |
0'(half(x)) | → | 0'(x) | (9) |
0'(s(half(x))) | → | 0'(x) | (10) |
s(s(half(x))) | → | half(s(x)) | (11) |
0'(bits(x)) | → | 0'(x) | (12) |
s(bits(x)) | → | s(half(bits(s(x)))) | (13) |
[0'(x1)] | = | 1 · x1 |
[half(x1)] | = | 1 · x1 |
[s(x1)] | = | 1 · x1 |
[bits(x1)] | = | 1 · x1 + 1 |
0'(bits(x)) | → | 0'(x) | (12) |
The TRS is overlay and locally confluent:
10Hence, it suffices to show innermost termination in the following.
0'#(half(x)) | → | 0'#(x) | (14) |
0'#(s(half(x))) | → | 0'#(x) | (15) |
s#(s(half(x))) | → | s#(x) | (16) |
s#(bits(x)) | → | s#(half(bits(s(x)))) | (17) |
s#(bits(x)) | → | s#(x) | (18) |
The dependency pairs are split into 2 components.
s#(bits(x)) | → | s#(x) | (18) |
s#(s(half(x))) | → | s#(x) | (16) |
We restrict the rewrite rules to the following usable rules of the DP problem.
There are no rules.
We restrict the innermost strategy to the following left hand sides.
s(s(half(x0))) |
s(bits(x0)) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
s#(bits(x)) | → | s#(x) | (18) |
1 | > | 1 | |
s#(s(half(x))) | → | s#(x) | (16) |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.
0'#(s(half(x))) | → | 0'#(x) | (15) |
0'#(half(x)) | → | 0'#(x) | (14) |
We restrict the rewrite rules to the following usable rules of the DP problem.
There are no rules.
We restrict the innermost strategy to the following left hand sides.
s(s(half(x0))) |
s(bits(x0)) |
Using size-change termination in combination with the subterm criterion one obtains the following initial size-change graphs.
0'#(s(half(x))) | → | 0'#(x) | (15) |
1 | > | 1 | |
0'#(half(x)) | → | 0'#(x) | (14) |
1 | > | 1 |
As there is no critical graph in the transitive closure, there are no infinite chains.