Consider the TRS R consisting of the rewrite rules

1: f(s(x)) -> s(f(f(p(s(x)))))
2: f(0) -> 0
3: p(s(x)) -> x

There are 3 dependency pairs:

4: F(s(x)) -> F(f(p(s(x))))
5: F(s(x)) -> F(p(s(x)))
6: F(s(x)) -> P(s(x))

The approximated dependency graph contains one SCC:
{4,5}.

- Consider the SCC {4,5}.
By taking the polynomial interpretation
[0] = 0,
[f](x) = [F](x) = x,
[s](x) = x + 1
and [p](x) = x - 1,
we obtain a quasi-model of RR.
Furthermore, the dependency pairs in {4,5}
are strictly decreasing.

Hence the TRS is terminating.