YES

We show the termination of the TRS R:

  f(f(X)) -> c(n__f(g(n__f(X))))
  c(X) -> d(activate(X))
  h(X) -> c(n__d(X))
  f(X) -> n__f(X)
  d(X) -> n__d(X)
  activate(n__f(X)) -> f(X)
  activate(n__d(X)) -> d(X)
  activate(X) -> X

-- SCC decomposition.

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

p1: f#(f(X)) -> c#(n__f(g(n__f(X))))
p2: c#(X) -> d#(activate(X))
p3: c#(X) -> activate#(X)
p4: h#(X) -> c#(n__d(X))
p5: activate#(n__f(X)) -> f#(X)
p6: activate#(n__d(X)) -> d#(X)

and R consists of:

r1: f(f(X)) -> c(n__f(g(n__f(X))))
r2: c(X) -> d(activate(X))
r3: h(X) -> c(n__d(X))
r4: f(X) -> n__f(X)
r5: d(X) -> n__d(X)
r6: activate(n__f(X)) -> f(X)
r7: activate(n__d(X)) -> d(X)
r8: activate(X) -> X

The estimated dependency graph contains the following SCCs:

  {p1, p3, p5}


-- Reduction pair.

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

p1: f#(f(X)) -> c#(n__f(g(n__f(X))))
p2: c#(X) -> activate#(X)
p3: activate#(n__f(X)) -> f#(X)

and R consists of:

r1: f(f(X)) -> c(n__f(g(n__f(X))))
r2: c(X) -> d(activate(X))
r3: h(X) -> c(n__d(X))
r4: f(X) -> n__f(X)
r5: d(X) -> n__d(X)
r6: activate(n__f(X)) -> f(X)
r7: activate(n__d(X)) -> d(X)
r8: activate(X) -> X

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^2
    order: lexicographic order
    interpretations:
      f#_A(x1) = x1
      f_A(x1) = x1 + (4,0)
      c#_A(x1) = x1 + (1,2)
      n__f_A(x1) = x1 + (1,1)
      g_A(x1) = x1 + (0,1)
      activate#_A(x1) = x1 + (0,1)

The next rules are strictly ordered:

  p1, p2, p3

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