(0) Obligation:

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

a__g(X) → a__h(X)
a__cd
a__h(d) → a__g(c)
mark(g(X)) → a__g(X)
mark(h(X)) → a__h(X)
mark(c) → a__c
mark(d) → d
a__g(X) → g(X)
a__h(X) → h(X)
a__cc

Q is empty.

(1) DirectTerminationProof (EQUIVALENT transformation)

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

Knuth-Bendix order [KBO] with precedence:
d > mark1 > g1 > ah1 > h1 > ag1 > c > ac

and weight map:

a__c=3
d=2
c=1
a__g_1=3
a__h_1=2
mark_1=3
g_1=1
h_1=1

The variable weight is 1

(2) TRUE