(0) Obligation:

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

g(a) → g(b)
bf(a, a)
f(a, a) → g(d)

Q is empty.