YES

We show the termination of the TRS R:

  app(app(map(),f),nil()) -> nil()
  app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs))
  app(app(le(),|0|()),y) -> true()
  app(app(le(),app(s(),x)),|0|()) -> false()
  app(app(le(),app(s(),x)),app(s(),y)) -> app(app(le(),x),y)
  app(app(maxlist(),x),app(app(cons(),y),ys)) -> app(app(if(),app(app(le(),x),y)),app(app(maxlist(),y),ys))
  app(app(maxlist(),x),nil()) -> x
  app(height(),app(app(node(),x),xs)) -> app(s(),app(app(maxlist(),|0|()),app(app(map(),height()),xs)))

-- SCC decomposition.

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

p1: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(cons(),app(f,x)),app(app(map(),f),xs))
p2: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(cons(),app(f,x))
p3: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x)
p4: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs)
p5: app#(app(le(),app(s(),x)),app(s(),y)) -> app#(app(le(),x),y)
p6: app#(app(le(),app(s(),x)),app(s(),y)) -> app#(le(),x)
p7: app#(app(maxlist(),x),app(app(cons(),y),ys)) -> app#(app(if(),app(app(le(),x),y)),app(app(maxlist(),y),ys))
p8: app#(app(maxlist(),x),app(app(cons(),y),ys)) -> app#(if(),app(app(le(),x),y))
p9: app#(app(maxlist(),x),app(app(cons(),y),ys)) -> app#(app(le(),x),y)
p10: app#(app(maxlist(),x),app(app(cons(),y),ys)) -> app#(le(),x)
p11: app#(app(maxlist(),x),app(app(cons(),y),ys)) -> app#(app(maxlist(),y),ys)
p12: app#(app(maxlist(),x),app(app(cons(),y),ys)) -> app#(maxlist(),y)
p13: app#(height(),app(app(node(),x),xs)) -> app#(s(),app(app(maxlist(),|0|()),app(app(map(),height()),xs)))
p14: app#(height(),app(app(node(),x),xs)) -> app#(app(maxlist(),|0|()),app(app(map(),height()),xs))
p15: app#(height(),app(app(node(),x),xs)) -> app#(maxlist(),|0|())
p16: app#(height(),app(app(node(),x),xs)) -> app#(app(map(),height()),xs)
p17: app#(height(),app(app(node(),x),xs)) -> app#(map(),height())

and R consists of:

r1: app(app(map(),f),nil()) -> nil()
r2: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs))
r3: app(app(le(),|0|()),y) -> true()
r4: app(app(le(),app(s(),x)),|0|()) -> false()
r5: app(app(le(),app(s(),x)),app(s(),y)) -> app(app(le(),x),y)
r6: app(app(maxlist(),x),app(app(cons(),y),ys)) -> app(app(if(),app(app(le(),x),y)),app(app(maxlist(),y),ys))
r7: app(app(maxlist(),x),nil()) -> x
r8: app(height(),app(app(node(),x),xs)) -> app(s(),app(app(maxlist(),|0|()),app(app(map(),height()),xs)))

The estimated dependency graph contains the following SCCs:

  {p3, p4, p16}
  {p11}
  {p5}


-- Reduction pair.

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

p1: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(f,x)
p2: app#(height(),app(app(node(),x),xs)) -> app#(app(map(),height()),xs)
p3: app#(app(map(),f),app(app(cons(),x),xs)) -> app#(app(map(),f),xs)

and R consists of:

r1: app(app(map(),f),nil()) -> nil()
r2: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs))
r3: app(app(le(),|0|()),y) -> true()
r4: app(app(le(),app(s(),x)),|0|()) -> false()
r5: app(app(le(),app(s(),x)),app(s(),y)) -> app(app(le(),x),y)
r6: app(app(maxlist(),x),app(app(cons(),y),ys)) -> app(app(if(),app(app(le(),x),y)),app(app(maxlist(),y),ys))
r7: app(app(maxlist(),x),nil()) -> x
r8: app(height(),app(app(node(),x),xs)) -> app(s(),app(app(maxlist(),|0|()),app(app(map(),height()),xs)))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^4
    order: lexicographic order
    interpretations:
      app#_A(x1,x2) = ((1,0,0,0),(0,0,0,0),(0,0,0,0),(1,0,0,0)) x1 + ((1,0,0,0),(0,0,0,0),(0,1,0,0),(0,0,1,0)) x2
      app_A(x1,x2) = ((1,0,0,0),(0,1,0,0),(0,1,1,0),(0,0,0,0)) x1 + x2 + (0,0,0,1)
      map_A() = (4,1,1,1)
      cons_A() = (1,1,1,0)
      height_A() = (1,1,1,1)
      node_A() = (5,1,1,0)

The next rules are strictly ordered:

  p1, p2, p3

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: app#(app(maxlist(),x),app(app(cons(),y),ys)) -> app#(app(maxlist(),y),ys)

and R consists of:

r1: app(app(map(),f),nil()) -> nil()
r2: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs))
r3: app(app(le(),|0|()),y) -> true()
r4: app(app(le(),app(s(),x)),|0|()) -> false()
r5: app(app(le(),app(s(),x)),app(s(),y)) -> app(app(le(),x),y)
r6: app(app(maxlist(),x),app(app(cons(),y),ys)) -> app(app(if(),app(app(le(),x),y)),app(app(maxlist(),y),ys))
r7: app(app(maxlist(),x),nil()) -> x
r8: app(height(),app(app(node(),x),xs)) -> app(s(),app(app(maxlist(),|0|()),app(app(map(),height()),xs)))

The set of usable rules consists of

  (no rules)

Take the monotone reduction pair:

  matrix interpretations:
  
    carrier: N^4
    order: lexicographic order
    interpretations:
      app#_A(x1,x2) = ((1,0,0,0),(0,1,0,0),(0,0,1,0),(1,1,1,1)) x1 + ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x2
      app_A(x1,x2) = ((1,0,0,0),(0,1,0,0),(1,0,1,0),(0,0,0,1)) x1 + ((1,0,0,0),(1,1,0,0),(1,1,1,0),(1,1,1,1)) x2
      maxlist_A() = (0,0,0,0)
      cons_A() = (1,1,1,1)

The next rules are strictly ordered:

  p1
  r1, r2, r3, r4, r5, r6, r7, r8

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: app#(app(le(),app(s(),x)),app(s(),y)) -> app#(app(le(),x),y)

and R consists of:

r1: app(app(map(),f),nil()) -> nil()
r2: app(app(map(),f),app(app(cons(),x),xs)) -> app(app(cons(),app(f,x)),app(app(map(),f),xs))
r3: app(app(le(),|0|()),y) -> true()
r4: app(app(le(),app(s(),x)),|0|()) -> false()
r5: app(app(le(),app(s(),x)),app(s(),y)) -> app(app(le(),x),y)
r6: app(app(maxlist(),x),app(app(cons(),y),ys)) -> app(app(if(),app(app(le(),x),y)),app(app(maxlist(),y),ys))
r7: app(app(maxlist(),x),nil()) -> x
r8: app(height(),app(app(node(),x),xs)) -> app(s(),app(app(maxlist(),|0|()),app(app(map(),height()),xs)))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^4
    order: lexicographic order
    interpretations:
      app#_A(x1,x2) = ((1,0,0,0),(1,1,0,0),(0,1,1,0),(0,0,1,1)) x1 + ((1,0,0,0),(1,1,0,0),(1,0,1,0),(1,1,1,1)) x2
      app_A(x1,x2) = ((1,0,0,0),(0,1,0,0),(1,1,1,0),(1,1,1,1)) x2 + (1,1,0,1)
      le_A() = (1,1,1,1)
      s_A() = (1,1,1,1)

The next rules are strictly ordered:

  p1

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