YES We show the termination of the TRS R: purge(nil()) -> nil() purge(.(x,y)) -> .(x,purge(remove(x,y))) remove(x,nil()) -> nil() remove(x,.(y,z)) -> if(=(x,y),remove(x,z),.(y,remove(x,z))) -- SCC decomposition. Consider the dependency pair problem (P, R), where P consists of p1: purge#(.(x,y)) -> purge#(remove(x,y)) p2: purge#(.(x,y)) -> remove#(x,y) p3: remove#(x,.(y,z)) -> remove#(x,z) and R consists of: r1: purge(nil()) -> nil() r2: purge(.(x,y)) -> .(x,purge(remove(x,y))) r3: remove(x,nil()) -> nil() r4: remove(x,.(y,z)) -> if(=(x,y),remove(x,z),.(y,remove(x,z))) The estimated dependency graph contains the following SCCs: {p1} {p3} -- Reduction pair. Consider the dependency pair problem (P, R), where P consists of p1: purge#(.(x,y)) -> purge#(remove(x,y)) and R consists of: r1: purge(nil()) -> nil() r2: purge(.(x,y)) -> .(x,purge(remove(x,y))) r3: remove(x,nil()) -> nil() r4: remove(x,.(y,z)) -> if(=(x,y),remove(x,z),.(y,remove(x,z))) The set of usable rules consists of r3, r4 Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: purge#_A(x1) = x1 + 2 ._A(x1,x2) = max{x1 + 4, x2 - 1} remove_A(x1,x2) = max{x1 + 4, x2 - 2} nil_A = 1 if_A(x1,x2,x3) = max{1, x1 - 4, x2 - 1, x3 - 6} =_A(x1,x2) = x2 + 6 2. max/plus interpretations on natural numbers: purge#_A(x1) = max{0, x1 - 2} ._A(x1,x2) = 3 remove_A(x1,x2) = 1 nil_A = 0 if_A(x1,x2,x3) = 0 =_A(x1,x2) = 0 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: remove#(x,.(y,z)) -> remove#(x,z) and R consists of: r1: purge(nil()) -> nil() r2: purge(.(x,y)) -> .(x,purge(remove(x,y))) r3: remove(x,nil()) -> nil() r4: remove(x,.(y,z)) -> if(=(x,y),remove(x,z),.(y,remove(x,z))) The set of usable rules consists of (no rules) Take the reduction pair: lexicographic combination of reduction pairs: 1. max/plus interpretations on natural numbers: remove#_A(x1,x2) = x2 ._A(x1,x2) = max{x1 + 1, x2 + 1} 2. max/plus interpretations on natural numbers: remove#_A(x1,x2) = 0 ._A(x1,x2) = 0 The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.