(0) Obligation:

Q restricted rewrite system:
The TRS R consists of the following rules:

f(f(X)) → f(a(b(f(X))))
f(a(g(X))) → b(X)
b(X) → a(X)

Q is empty.