(0) Obligation:

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

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

Q is empty.