(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, s(x), s(y)) → s(x)
if(false, s(x), s(y)) → s(y)
g(x, c(y)) → c(g(x, y))
g(x, c(y)) → g(x, if(f(x), c(g(s(x), y)), c(y)))

Q is empty.