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. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: purge#_A(x1) = ((0,0),(1,0)) x1 + (3,0) ._A(x1,x2) = ((1,0),(1,1)) x1 + (4,3) remove_A(x1,x2) = (2,2) nil_A() = (1,1) if_A(x1,x2,x3) = (0,0) =_A(x1,x2) = (1,1) precedence: . > purge# = nil = if > remove = = partial status: pi(purge#) = [] pi(.) = [1] pi(remove) = [] pi(nil) = [] pi(if) = [] pi(=) = [] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: purge#_A(x1) = (0,0) ._A(x1,x2) = x1 + (2,2) remove_A(x1,x2) = (3,0) nil_A() = (0,1) if_A(x1,x2,x3) = (0,0) =_A(x1,x2) = (1,1) precedence: remove > nil > purge# = . = if = = partial status: pi(purge#) = [] pi(.) = [1] pi(remove) = [] pi(nil) = [] pi(if) = [] pi(=) = [] 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. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: remove#_A(x1,x2) = x1 + ((0,0),(1,0)) x2 + (2,2) ._A(x1,x2) = x1 + ((1,0),(0,0)) x2 + (1,1) precedence: remove# > . partial status: pi(remove#) = [1] pi(.) = [1] 2. weighted path order base order: matrix interpretations: carrier: N^2 order: lexicographic order interpretations: remove#_A(x1,x2) = x1 ._A(x1,x2) = x1 + (1,1) precedence: remove# = . partial status: pi(remove#) = [1] pi(.) = [1] The next rules are strictly ordered: p1 We remove them from the problem. Then no dependency pair remains.