YES TRS: 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))) linear polynomial interpretations on N: purge_A(x1) = x1 + 1 purge#_A(x1) = x1 nil_A = 1 nil#_A = 2 ._A(x1,x2) = x1 + x2 + 4 .#_A(x1,x2) = 3 remove_A(x1,x2) = x2 remove#_A(x1,x2) = x1 + x2 + 2 if_A(x1,x2,x3) = 0 if#_A(x1,x2,x3) = 0 =_A(x1,x2) = x1 + 1 =#_A(x1,x2) = 0 precedence: . > remove = if > nil = = > purge