YES

We show the termination of the TRS R:

  a__f(X) -> g(h(f(X)))
  mark(f(X)) -> a__f(mark(X))
  mark(g(X)) -> g(X)
  mark(h(X)) -> h(mark(X))
  a__f(X) -> f(X)

-- SCC decomposition.

Consider the dependency pair problem (P, R), where P consists of

p1: mark#(f(X)) -> a__f#(mark(X))
p2: mark#(f(X)) -> mark#(X)
p3: mark#(h(X)) -> mark#(X)

and R consists of:

r1: a__f(X) -> g(h(f(X)))
r2: mark(f(X)) -> a__f(mark(X))
r3: mark(g(X)) -> g(X)
r4: mark(h(X)) -> h(mark(X))
r5: a__f(X) -> f(X)

The estimated dependency graph contains the following SCCs:

  {p2, p3}


-- Reduction pair.

Consider the dependency pair problem (P, R), where P consists of

p1: mark#(f(X)) -> mark#(X)
p2: mark#(h(X)) -> mark#(X)

and R consists of:

r1: a__f(X) -> g(h(f(X)))
r2: mark(f(X)) -> a__f(mark(X))
r3: mark(g(X)) -> g(X)
r4: mark(h(X)) -> h(mark(X))
r5: a__f(X) -> f(X)

The set of usable rules consists of

  (no rules)

Take the monotone reduction pair:

  matrix interpretations:
  
    carrier: N^2
    order: lexicographic order
    interpretations:
      mark#_A(x1) = ((1,0),(1,1)) x1
      f_A(x1) = ((1,0),(1,1)) x1 + (1,1)
      h_A(x1) = ((1,0),(1,1)) x1 + (1,1)

The next rules are strictly ordered:

  p1, p2
  r1, r2, r3, r4, r5

We remove them from the problem.  Then no dependency pair remains.