Consider the TRS R consisting of the rewrite rule

1: f(a,f(x,a)) -> f(a,f(x,f(f(a,a),a)))

There are 4 dependency pairs:

2: F(a,f(x,a)) -> F(a,f(x,f(f(a,a),a)))
3: F(a,f(x,a)) -> F(x,f(f(a,a),a))
4: F(a,f(x,a)) -> F(f(a,a),a)
5: F(a,f(x,a)) -> F(a,a)

The approximated dependency graph contains one SCC:
{2,3}.

- Consider the SCC {2,3}.
By taking the polynomial interpretation
[a] = 2,
[F](x,y) = y
and [f](x,y) = y - 1,
we obtain a quasi-model of RR.
Furthermore, dependency pair 3
is weakly decreasing and
dependency pair 2
is strictly decreasing.
There is one new SCC.

- Consider the SCC {3}.
By taking the polynomial interpretation
[a] = 2,
[F](x,y) = x + y
and [f](x,y) = x - 1,
we obtain a quasi-model of RR.
Furthermore, dependency pair 3
is strictly decreasing.


Hence the TRS is terminating.