YES

We show the termination of the TRS R:

  f(|0|()) -> |1|()
  f(s(x)) -> g(x,s(x))
  g(|0|(),y) -> y
  g(s(x),y) -> g(x,+(y,s(x)))
  +(x,|0|()) -> x
  +(x,s(y)) -> s(+(x,y))
  g(s(x),y) -> g(x,s(+(y,x)))

-- SCC decomposition.

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

p1: f#(s(x)) -> g#(x,s(x))
p2: g#(s(x),y) -> g#(x,+(y,s(x)))
p3: g#(s(x),y) -> +#(y,s(x))
p4: +#(x,s(y)) -> +#(x,y)
p5: g#(s(x),y) -> g#(x,s(+(y,x)))
p6: g#(s(x),y) -> +#(y,x)

and R consists of:

r1: f(|0|()) -> |1|()
r2: f(s(x)) -> g(x,s(x))
r3: g(|0|(),y) -> y
r4: g(s(x),y) -> g(x,+(y,s(x)))
r5: +(x,|0|()) -> x
r6: +(x,s(y)) -> s(+(x,y))
r7: g(s(x),y) -> g(x,s(+(y,x)))

The estimated dependency graph contains the following SCCs:

  {p2, p5}
  {p4}


-- Reduction pair.

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

p1: g#(s(x),y) -> g#(x,+(y,s(x)))
p2: g#(s(x),y) -> g#(x,s(+(y,x)))

and R consists of:

r1: f(|0|()) -> |1|()
r2: f(s(x)) -> g(x,s(x))
r3: g(|0|(),y) -> y
r4: g(s(x),y) -> g(x,+(y,s(x)))
r5: +(x,|0|()) -> x
r6: +(x,s(y)) -> s(+(x,y))
r7: g(s(x),y) -> g(x,s(+(y,x)))

The set of usable rules consists of

  r5, r6

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        g#_A(x1,x2) = x1
        s_A(x1) = x1 + 1
        +_A(x1,x2) = x1 + x2 + 1
        |0|_A() = 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        |0| > + > s > g#
      
      argument filter:
    
        pi(g#) = 1
        pi(s) = 1
        pi(+) = 2
        pi(|0|) = []
    

The next rules are strictly ordered:

  p1, p2

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

and R consists of:

r1: f(|0|()) -> |1|()
r2: f(s(x)) -> g(x,s(x))
r3: g(|0|(),y) -> y
r4: g(s(x),y) -> g(x,+(y,s(x)))
r5: +(x,|0|()) -> x
r6: +(x,s(y)) -> s(+(x,y))
r7: g(s(x),y) -> g(x,s(+(y,x)))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. matrix interpretations:
    
      carrier: N^1
      order: standard order
      interpretations:
        +#_A(x1,x2) = x2
        s_A(x1) = x1 + 1
    
    2. lexicographic path order with precedence:
    
      precedence:
      
        s > +#
      
      argument filter:
    
        pi(+#) = 2
        pi(s) = 1
    

The next rules are strictly ordered:

  p1

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