(0) Obligation:

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

f(f(a, a), x) → f(a, f(b, f(a, x)))
f(x, f(y, z)) → f(f(x, y), z)

Q is empty.