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(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs))
  app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs)))
  app(app(plus(),|0|()),x) -> |0|()
  app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y))

-- 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#(sum(),app(app(cons(),x),xs)) -> app#(app(plus(),x),app(sum(),xs))
p6: app#(sum(),app(app(cons(),x),xs)) -> app#(plus(),x)
p7: app#(sum(),app(app(cons(),x),xs)) -> app#(sum(),xs)
p8: app#(size(),app(app(node(),x),xs)) -> app#(s(),app(sum(),app(app(map(),size()),xs)))
p9: app#(size(),app(app(node(),x),xs)) -> app#(sum(),app(app(map(),size()),xs))
p10: app#(size(),app(app(node(),x),xs)) -> app#(app(map(),size()),xs)
p11: app#(size(),app(app(node(),x),xs)) -> app#(map(),size())
p12: app#(app(plus(),app(s(),x)),y) -> app#(s(),app(app(plus(),x),y))
p13: app#(app(plus(),app(s(),x)),y) -> app#(app(plus(),x),y)
p14: app#(app(plus(),app(s(),x)),y) -> app#(plus(),x)

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(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs))
r4: app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs)))
r5: app(app(plus(),|0|()),x) -> |0|()
r6: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y))

The estimated dependency graph contains the following SCCs:

  {p3, p4, p10}
  {p7}
  {p13}


-- 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#(size(),app(app(node(),x),xs)) -> app#(app(map(),size()),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(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs))
r4: app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs)))
r5: app(app(plus(),|0|()),x) -> |0|()
r6: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. lexicographic path order with precedence:
    
      precedence:
      
        app > map > size > app# > node > cons
      
      argument filter:
    
        pi(app#) = [2]
        pi(app) = [1, 2]
        pi(map) = []
        pi(cons) = []
        pi(size) = []
        pi(node) = []
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        app > map > size > app# > node > cons
      
      argument filter:
    
        pi(app#) = 2
        pi(app) = [1, 2]
        pi(map) = []
        pi(cons) = []
        pi(size) = []
        pi(node) = []
    

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#(sum(),app(app(cons(),x),xs)) -> app#(sum(),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(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs))
r4: app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs)))
r5: app(app(plus(),|0|()),x) -> |0|()
r6: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. lexicographic path order with precedence:
    
      precedence:
      
        app# > sum > cons > app
      
      argument filter:
    
        pi(app#) = [1, 2]
        pi(sum) = []
        pi(app) = [1, 2]
        pi(cons) = []
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        sum > app# > cons > app
      
      argument filter:
    
        pi(app#) = 2
        pi(sum) = []
        pi(app) = [1, 2]
        pi(cons) = []
    

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: app#(app(plus(),app(s(),x)),y) -> app#(app(plus(),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(sum(),app(app(cons(),x),xs)) -> app(app(plus(),x),app(sum(),xs))
r4: app(size(),app(app(node(),x),xs)) -> app(s(),app(sum(),app(app(map(),size()),xs)))
r5: app(app(plus(),|0|()),x) -> |0|()
r6: app(app(plus(),app(s(),x)),y) -> app(s(),app(app(plus(),x),y))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. lexicographic path order with precedence:
    
      precedence:
      
        plus > app > app# > s
      
      argument filter:
    
        pi(app#) = [1, 2]
        pi(app) = 2
        pi(plus) = []
        pi(s) = []
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        app > plus > app# > s
      
      argument filter:
    
        pi(app#) = [1]
        pi(app) = [2]
        pi(plus) = []
        pi(s) = []
    

The next rules are strictly ordered:

  p1

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