YES

We show the termination of the TRS R:

  is_empty(nil()) -> true()
  is_empty(cons(x,l)) -> false()
  hd(cons(x,l)) -> x
  tl(cons(x,l)) -> l
  append(l1,l2) -> ifappend(l1,l2,l1)
  ifappend(l1,l2,nil()) -> l2
  ifappend(l1,l2,cons(x,l)) -> cons(x,append(l,l2))

-- SCC decomposition.

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

p1: append#(l1,l2) -> ifappend#(l1,l2,l1)
p2: ifappend#(l1,l2,cons(x,l)) -> append#(l,l2)

and R consists of:

r1: is_empty(nil()) -> true()
r2: is_empty(cons(x,l)) -> false()
r3: hd(cons(x,l)) -> x
r4: tl(cons(x,l)) -> l
r5: append(l1,l2) -> ifappend(l1,l2,l1)
r6: ifappend(l1,l2,nil()) -> l2
r7: ifappend(l1,l2,cons(x,l)) -> cons(x,append(l,l2))

The estimated dependency graph contains the following SCCs:

  {p1, p2}


-- Reduction pair.

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

p1: append#(l1,l2) -> ifappend#(l1,l2,l1)
p2: ifappend#(l1,l2,cons(x,l)) -> append#(l,l2)

and R consists of:

r1: is_empty(nil()) -> true()
r2: is_empty(cons(x,l)) -> false()
r3: hd(cons(x,l)) -> x
r4: tl(cons(x,l)) -> l
r5: append(l1,l2) -> ifappend(l1,l2,l1)
r6: ifappend(l1,l2,nil()) -> l2
r7: ifappend(l1,l2,cons(x,l)) -> cons(x,append(l,l2))

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:
        append#_A(x1,x2) = ((1,1),(1,1)) x1 + (1,0)
        ifappend#_A(x1,x2,x3) = ((1,1),(1,1)) x3
        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:
        append#_A(x1,x2) = (0,0)
        ifappend#_A(x1,x2,x3) = ((1,0),(1,0)) x3 + (1,1)
        cons_A(x1,x2) = ((1,1),(0,0)) x1 + ((1,1),(0,0)) x2 + (1,1)
    
    3. matrix interpretations:
    
      carrier: N^2
      order: standard order
      interpretations:
        append#_A(x1,x2) = (0,0)
        ifappend#_A(x1,x2,x3) = ((0,1),(1,1)) x3 + (1,1)
        cons_A(x1,x2) = ((1,1),(1,1)) x1 + ((1,1),(1,1)) x2 + (1,1)
    

The next rules are strictly ordered:

  p1, p2

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