(0) Obligation:

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

f(0) → true
f(1) → false
f(s(x)) → f(x)
if(true, x, y) → x
if(false, x, y) → y
g(s(x), s(y)) → if(f(x), s(x), s(y))
g(x, c(y)) → g(x, g(s(c(y)), y))

Q is empty.