Consider the TRS R consisting of the rewrite rules
1: fac(s(x)) -> fac(p(s(x))) * s(x)
2: p(s(0)) -> 0
3: p(s(s(x))) -> s(p(s(x)))
There are 3 dependency pairs:
4: FAC(s(x)) -> FAC(p(s(x)))
5: FAC(s(x)) -> P(s(x))
6: P(s(s(x))) -> P(s(x))
The approximated dependency graph contains 2 SCCs:
{6}
and {4}.
- Consider the SCC {6}.
There are no usable rules.
By taking the polynomial interpretation
[P](x) = [s](x) = x + 1,
rule 6
is strictly decreasing.
- Consider the SCC {4}.
The usable rules are {2,3}.
By taking the polynomial interpretation
[0] = 0,
[FAC](x) = x,
[s](x) = x + 1
and [p](x) = x - 1,
we obtain a quasi-model of the usable rules.
Furthermore, dependency pair 4
is strictly decreasing.
Hence the TRS is terminating.