YES

We show the termination of the TRS R:

  +(a(),b()) -> +(b(),a())
  +(a(),+(b(),z)) -> +(b(),+(a(),z))
  +(+(x,y),z) -> +(x,+(y,z))
  f(a(),y) -> a()
  f(b(),y) -> b()
  f(+(x,y),z) -> +(f(x,z),f(y,z))

-- SCC decomposition.

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

p1: +#(a(),b()) -> +#(b(),a())
p2: +#(a(),+(b(),z)) -> +#(b(),+(a(),z))
p3: +#(a(),+(b(),z)) -> +#(a(),z)
p4: +#(+(x,y),z) -> +#(x,+(y,z))
p5: +#(+(x,y),z) -> +#(y,z)
p6: f#(+(x,y),z) -> +#(f(x,z),f(y,z))
p7: f#(+(x,y),z) -> f#(x,z)
p8: f#(+(x,y),z) -> f#(y,z)

and R consists of:

r1: +(a(),b()) -> +(b(),a())
r2: +(a(),+(b(),z)) -> +(b(),+(a(),z))
r3: +(+(x,y),z) -> +(x,+(y,z))
r4: f(a(),y) -> a()
r5: f(b(),y) -> b()
r6: f(+(x,y),z) -> +(f(x,z),f(y,z))

The estimated dependency graph contains the following SCCs:

  {p7, p8}
  {p4, p5}
  {p3}


-- Reduction pair.

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

p1: f#(+(x,y),z) -> f#(y,z)
p2: f#(+(x,y),z) -> f#(x,z)

and R consists of:

r1: +(a(),b()) -> +(b(),a())
r2: +(a(),+(b(),z)) -> +(b(),+(a(),z))
r3: +(+(x,y),z) -> +(x,+(y,z))
r4: f(a(),y) -> a()
r5: f(b(),y) -> b()
r6: f(+(x,y),z) -> +(f(x,z),f(y,z))

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,x2) = x1
      +_A(x1,x2) = ((1,0),(1,1)) x1 + ((1,0),(1,1)) x2 + (1,1)

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

and R consists of:

r1: +(a(),b()) -> +(b(),a())
r2: +(a(),+(b(),z)) -> +(b(),+(a(),z))
r3: +(+(x,y),z) -> +(x,+(y,z))
r4: f(a(),y) -> a()
r5: f(b(),y) -> b()
r6: f(+(x,y),z) -> +(f(x,z),f(y,z))

The set of usable rules consists of

  r1, r2, r3

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^2
    order: lexicographic order
    interpretations:
      +#_A(x1,x2) = ((1,0),(1,1)) x1
      +_A(x1,x2) = ((1,0),(1,1)) x1 + x2 + (1,1)
      a_A() = (1,0)
      b_A() = (0,1)

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: +#(a(),+(b(),z)) -> +#(a(),z)

and R consists of:

r1: +(a(),b()) -> +(b(),a())
r2: +(a(),+(b(),z)) -> +(b(),+(a(),z))
r3: +(+(x,y),z) -> +(x,+(y,z))
r4: f(a(),y) -> a()
r5: f(b(),y) -> b()
r6: f(+(x,y),z) -> +(f(x,z),f(y,z))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  matrix interpretations:
  
    carrier: N^2
    order: lexicographic order
    interpretations:
      +#_A(x1,x2) = ((0,0),(1,0)) x2
      a_A() = (0,0)
      +_A(x1,x2) = ((1,0),(1,1)) x2 + (1,0)
      b_A() = (1,1)

The next rules are strictly ordered:

  p1

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