YES

We show the termination of the TRS R:

  concat(leaf(),Y) -> Y
  concat(cons(U,V),Y) -> cons(U,concat(V,Y))
  lessleaves(X,leaf()) -> false()
  lessleaves(leaf(),cons(W,Z)) -> true()
  lessleaves(cons(U,V),cons(W,Z)) -> lessleaves(concat(U,V),concat(W,Z))

-- SCC decomposition.

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

p1: concat#(cons(U,V),Y) -> concat#(V,Y)
p2: lessleaves#(cons(U,V),cons(W,Z)) -> lessleaves#(concat(U,V),concat(W,Z))
p3: lessleaves#(cons(U,V),cons(W,Z)) -> concat#(U,V)
p4: lessleaves#(cons(U,V),cons(W,Z)) -> concat#(W,Z)

and R consists of:

r1: concat(leaf(),Y) -> Y
r2: concat(cons(U,V),Y) -> cons(U,concat(V,Y))
r3: lessleaves(X,leaf()) -> false()
r4: lessleaves(leaf(),cons(W,Z)) -> true()
r5: lessleaves(cons(U,V),cons(W,Z)) -> lessleaves(concat(U,V),concat(W,Z))

The estimated dependency graph contains the following SCCs:

  {p2}
  {p1}


-- Reduction pair.

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

p1: lessleaves#(cons(U,V),cons(W,Z)) -> lessleaves#(concat(U,V),concat(W,Z))

and R consists of:

r1: concat(leaf(),Y) -> Y
r2: concat(cons(U,V),Y) -> cons(U,concat(V,Y))
r3: lessleaves(X,leaf()) -> false()
r4: lessleaves(leaf(),cons(W,Z)) -> true()
r5: lessleaves(cons(U,V),cons(W,Z)) -> lessleaves(concat(U,V),concat(W,Z))

The set of usable rules consists of

  r1, r2

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        lessleaves#_A(x1,x2) = ((0,1),(0,0)) x1 + ((1,0),(1,0)) x2
        cons_A(x1,x2) = x1 + x2 + (3,0)
        concat_A(x1,x2) = x1 + x2 + (1,1)
        leaf_A() = (1,1)
    
    2. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        lessleaves#_A(x1,x2) = ((1,1),(1,1)) x2
        cons_A(x1,x2) = ((1,1),(0,0)) x1 + (2,1)
        concat_A(x1,x2) = x1 + ((1,1),(1,1)) x2 + (1,1)
        leaf_A() = (1,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: concat#(cons(U,V),Y) -> concat#(V,Y)

and R consists of:

r1: concat(leaf(),Y) -> Y
r2: concat(cons(U,V),Y) -> cons(U,concat(V,Y))
r3: lessleaves(X,leaf()) -> false()
r4: lessleaves(leaf(),cons(W,Z)) -> true()
r5: lessleaves(cons(U,V),cons(W,Z)) -> lessleaves(concat(U,V),concat(W,Z))

The set of usable rules consists of

  (no rules)

Take the reduction pair:

  lexicographic combination of reduction pairs:
  
    1. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        concat#_A(x1,x2) = ((1,1),(1,1)) x1 + x2
        cons_A(x1,x2) = ((1,1),(1,1)) x1 + ((1,1),(1,1)) x2 + (1,1)
    
    2. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        concat#_A(x1,x2) = ((0,1),(1,0)) x1 + x2
        cons_A(x1,x2) = ((0,1),(0,1)) x1 + ((0,0),(1,0)) x2 + (1,1)
    

The next rules are strictly ordered:

  p1

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