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. weighted path order base order: max/plus interpretations on natural numbers: lessleaves#_A(x1,x2) = max{x1 + 2, x2 + 4} cons_A(x1,x2) = max{x1 + 6, x2} concat_A(x1,x2) = max{x1 + 6, x2} leaf_A = 0 precedence: lessleaves# > cons = concat = leaf partial status: pi(lessleaves#) = [2] pi(cons) = [1, 2] pi(concat) = [1, 2] pi(leaf) = [] 2. weighted path order base order: max/plus interpretations on natural numbers: lessleaves#_A(x1,x2) = max{13, x2 + 5} cons_A(x1,x2) = max{8, x1 + 3} concat_A(x1,x2) = max{7, x1} leaf_A = 0 precedence: cons = concat > lessleaves# = leaf partial status: pi(lessleaves#) = [2] pi(cons) = [1] pi(concat) = [] pi(leaf) = [] 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. weighted path order base order: max/plus interpretations on natural numbers: concat#_A(x1,x2) = x1 + 1 cons_A(x1,x2) = max{x1, x2 + 1} precedence: concat# = cons partial status: pi(concat#) = [1] pi(cons) = [1, 2] 2. weighted path order base order: max/plus interpretations on natural numbers: concat#_A(x1,x2) = max{0, x1 - 1} cons_A(x1,x2) = max{x1, x2} precedence: concat# = cons partial status: pi(concat#) = [] pi(cons) = [1, 2] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.