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 r1, r2, r3, r4 Take the reduction pair: generalized weighted path order (>=MG, >MG) base order 1: max/plus interpretation on natural numbers: append#_A(x1,x2) = max{3, x1 - 2} ifappend#_A(x1,x2,x3) = max{1, x3 - 3} cons_A(x1,x2) = max{17, x1 + 7, x2 + 2} is_empty_A(x1) = max{1, x1 - 8} nil_A = 1 true_A = 0 false_A = 8 hd_A(x1) = x1 tl_A(x1) = x1 base order 2: precedence: append# = cons = is_empty = nil = hd = tl > ifappend# = true = false partial status: pi(append#) = [] pi(ifappend#) = [] pi(cons) = [2] pi(is_empty) = [] pi(nil) = [] pi(true) = [] pi(false) = [] pi(hd) = [1] pi(tl) = [1] The following rules are removed: p1 -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: 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: (no SCCs)