(0) Obligation:

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

f(x, x) → f(i(x), g(g(x)))
f(x, y) → x
g(x) → i(x)
f(x, i(x)) → f(x, x)
f(i(x), i(g(x))) → a

Q is empty.