(0) Obligation:

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

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

Q is empty.

(1) DirectTerminationProof (EQUIVALENT transformation)

We use [DIRECT_TERMINATION] with the following order to prove termination.

Knuth-Bendix order [KBO] with precedence:
top1 > proper1 > active1 > h1 > g1 > f1 > mark1 > ok1

and weight map:

active_1=5
f_1=7
mark_1=3
g_1=1
h_1=1
proper_1=2
ok_1=6
top_1=1

The variable weight is 1

(2) TRUE