The rewrite relation of the following TRS is considered.
| f(a) | → | g(h(a)) | (1) |
| h(g(x)) | → | g(h(f(x))) | (2) |
| k(x,h(x),a) | → | h(x) | (3) |
| k(f(x),y,x) | → | f(x) | (4) |
| [f(x1)] | = | 1 · x1 |
| [a] | = | 0 |
| [g(x1)] | = | 2 · x1 |
| [h(x1)] | = | 1 · x1 |
| [k(x1, x2, x3)] | = | 2 + 2 · x1 + 2 · x2 + 1 · x3 |
| k(x,h(x),a) | → | h(x) | (3) |
| k(f(x),y,x) | → | f(x) | (4) |
The TRS is overlay and locally confluent:
10Hence, it suffices to show innermost termination in the following.
| f#(a) | → | h#(a) | (5) |
| h#(g(x)) | → | h#(f(x)) | (6) |
| h#(g(x)) | → | f#(x) | (7) |
The dependency pairs are split into 1 component.
| h#(g(x)) | → | h#(f(x)) | (6) |
We restrict the rewrite rules to the following usable rules of the DP problem.
| f(a) | → | g(h(a)) | (1) |
final states:
{0, 1, 2, 3, 4}
transitions:
| f0(0) | → | 0 |
| f0(1) | → | 0 |
| f0(2) | → | 0 |
| f0(3) | → | 0 |
| f0(4) | → | 0 |
| a0 | → | 1 |
| g0(0) | → | 2 |
| g0(1) | → | 2 |
| g0(2) | → | 2 |
| g0(3) | → | 2 |
| g0(4) | → | 2 |
| h0(0) | → | 3 |
| h0(1) | → | 3 |
| h0(2) | → | 3 |
| h0(3) | → | 3 |
| h0(4) | → | 3 |
| h#0(0) | → | 4 |
| h#0(1) | → | 4 |
| h#0(2) | → | 4 |
| h#0(3) | → | 4 |
| h#0(4) | → | 4 |
| a1 | → | 6 |
| h1(6) | → | 5 |
| g1(5) | → | 0 |
| f1(0) | → | 7 |
| h#1(7) | → | 4 |
| f1(1) | → | 7 |
| f1(2) | → | 7 |
| f1(3) | → | 7 |
| f1(4) | → | 7 |
| f1(5) | → | 0 |
| f2(5) | → | 8 |
| h#2(8) | → | 4 |
| 0 | → | 7 |