(0) Obligation:

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

f(1) → f(g(1))
f(f(x)) → f(x)
g(0) → g(f(0))
g(g(x)) → g(x)

Q is empty.