(0) Obligation:

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

f(x, c(x), c(y)) → f(y, y, f(y, x, y))
f(s(x), y, z) → f(x, s(c(y)), c(z))
f(c(x), x, y) → c(y)
g(x, y) → x
g(x, y) → y

Q is empty.