(0) Obligation:

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

f(s(X), X) → f(X, a(X))
f(X, c(X)) → f(s(X), X)
f(X, X) → c(X)

Q is empty.