(0) Obligation:

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

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

Q is empty.