YES

We show the termination of the TRS R:

  f(s(X)) -> f(X)
  g(cons(|0|(),Y)) -> g(Y)
  g(cons(s(X),Y)) -> s(X)
  h(cons(X,Y)) -> h(g(cons(X,Y)))

-- SCC decomposition.

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

p1: f#(s(X)) -> f#(X)
p2: g#(cons(|0|(),Y)) -> g#(Y)
p3: h#(cons(X,Y)) -> h#(g(cons(X,Y)))
p4: h#(cons(X,Y)) -> g#(cons(X,Y))

and R consists of:

r1: f(s(X)) -> f(X)
r2: g(cons(|0|(),Y)) -> g(Y)
r3: g(cons(s(X),Y)) -> s(X)
r4: h(cons(X,Y)) -> h(g(cons(X,Y)))

The estimated dependency graph contains the following SCCs:

  {p1}
  {p3}
  {p2}


-- Reduction pair.

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

p1: f#(s(X)) -> f#(X)

and R consists of:

r1: f(s(X)) -> f(X)
r2: g(cons(|0|(),Y)) -> g(Y)
r3: g(cons(s(X),Y)) -> s(X)
r4: h(cons(X,Y)) -> h(g(cons(X,Y)))

The set of usable rules consists of

  (no rules)

Take the monotone reduction pair:

  matrix interpretations:
  
    carrier: N^1
    order: standard order
    interpretations:
      f#_A(x1) = x1
      s_A(x1) = x1 + 1

The next rules are strictly ordered:

  p1
  r1, r2, r3, r4

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

-- Reduction pair.

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

p1: h#(cons(X,Y)) -> h#(g(cons(X,Y)))

and R consists of:

r1: f(s(X)) -> f(X)
r2: g(cons(|0|(),Y)) -> g(Y)
r3: g(cons(s(X),Y)) -> s(X)
r4: h(cons(X,Y)) -> h(g(cons(X,Y)))

The set of usable rules consists of

  r2, r3

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^1
    order: standard order
    interpretations:
      h#_A(x1) = x1
      cons_A(x1,x2) = 2
      g_A(x1) = 1
      |0|_A() = 1
      s_A(x1) = 1

The next rules are strictly ordered:

  p1

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

-- Reduction pair.

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

p1: g#(cons(|0|(),Y)) -> g#(Y)

and R consists of:

r1: f(s(X)) -> f(X)
r2: g(cons(|0|(),Y)) -> g(Y)
r3: g(cons(s(X),Y)) -> s(X)
r4: h(cons(X,Y)) -> h(g(cons(X,Y)))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^1
    order: standard order
    interpretations:
      g#_A(x1) = x1
      cons_A(x1,x2) = x2 + 1
      |0|_A() = 0

The next rules are strictly ordered:

  p1

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