(0) Obligation:

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

cond(true, x, y) → cond(gr(x, y), p(x), y)
gr(0, x) → false
gr(s(x), 0) → true
gr(s(x), s(y)) → gr(x, y)
p(0) → 0
p(s(x)) → x

Q is empty.