The rewrite relation of the following TRS is considered.
p(s(x)) | → | x | (1) |
fac(0) | → | s(0) | (2) |
fac(s(x)) | → | times(s(x),fac(p(s(x)))) | (3) |
The TRS is overlay and locally confluent:
10Hence, it suffices to show innermost termination in the following.
fac#(s(x)) | → | fac#(p(s(x))) | (4) |
fac#(s(x)) | → | p#(s(x)) | (5) |
The dependency pairs are split into 1 component.
fac#(s(x)) | → | fac#(p(s(x))) | (4) |
We restrict the rewrite rules to the following usable rules of the DP problem.
p(s(x)) | → | x | (1) |
We restrict the innermost strategy to the following left hand sides.
p(s(x0)) |
[p(x1)] | = | 1 · x1 |
[s(x1)] | = | 2 + 1 · x1 |
[fac#(x1)] | = | 2 · x1 |
p(s(x)) | → | x | (1) |
fac(0) | → | s(0) | (2) |
fac(s(x)) | → | times(s(x),fac(p(s(x)))) | (3) |
final states:
{0, 1, 2}
transitions:
fac#0(0) | → | 0 |
fac#0(1) | → | 0 |
fac#0(2) | → | 0 |
s0(0) | → | 1 |
s0(1) | → | 1 |
s0(2) | → | 1 |
p0(0) | → | 2 |
p0(1) | → | 2 |
p0(2) | → | 2 |
s1(0) | → | 4 |
p1(4) | → | 3 |
fac#1(3) | → | 0 |
s1(1) | → | 4 |
s1(2) | → | 4 |