(0) Obligation:

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

active(f(f(a))) → mark(f(g(f(a))))
active(f(X)) → f(active(X))
f(mark(X)) → mark(f(X))
proper(f(X)) → f(proper(X))
proper(a) → ok(a)
proper(g(X)) → g(proper(X))
f(ok(X)) → ok(f(X))
g(ok(X)) → ok(g(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.